Norilu keeps remote MCP credentials in Agent Vault, gives each saved agent access to selected tools, and checks authorization when the agent calls one. The MCP server enforces which records the credential can read or change. To verify project isolation, connect two project-scoped accounts to the same endpoint and check the raw tool results for both.
MCP, the Model Context Protocol, gives agents a standard way to discover and call tools. A tool can read a project’s work orders, create a ticket or change a record. The tool’s input schema describes the arguments it accepts. Access to a particular record depends on the caller’s identity and the rules the service applies to it. Those checks matter even when two projects offer exactly the same tools.
Know which credential you are handling
There are three different connections you might set up while building with Norilu. Each has a credential for a different service and a different job.
| Connection | Credential | What it authorizes |
|---|---|---|
| Norilu calls an external MCP server | Provider OAuth token or API key | Operations and data the provider makes available to that account |
| A coding assistant connects to a Norilu workspace | Norilu OAuth authorization | Workspace operations within the granted scope and the user’s current access |
| Your backend calls a released Norilu agent | Scoped Norilu server API key | Allowed API operations for a specific agent release and that key’s conversations |
Enter a provider credential in the remote connection form. Keep a Norilu server API key in your backend’s secret store. Norilu’s guide to connection and action permissions
The distinction also matters when debugging. An MCP server can accept a connection and list its tools while still refusing a particular record. Your backend can start an agent session successfully while the agent lacks a grant to call an external tool. Find the step that failed before changing credentials or broadening access.
Connect the provider account
A remote connection starts with a public HTTPS URL that supports MCP Streamable HTTP. The workspace owner selects the authentication mode the server supports. Norilu accepts compatible OAuth, a bearer key, or a key in an allowed header. A public server can also connect without a provider credential. It still goes through Norilu’s tool selection and authorization checks.
OAuth connects the provider account through its consent screen. With PKCE, the connection broker proves it holds the verifier it generated at the start of authorization when it redeems the authorization code. Norilu validates a separate, browser-bound state for the callback. The broker exchanges the code with the selected authorization issuer and requests a token for the intended MCP resource. MCP authorization specification
Norilu stores the provider’s API key or OAuth tokens in Agent Vault. Connection records hold metadata such as the URL, tool definitions and grants. The authenticated connection broker retrieves the credential for the configured MCP server and uses the selected issuer’s endpoints for OAuth exchanges. The broker redacts known credential values from tool results before they reach the model. The agent receives the permitted tool definition and the result.
The broker also checks where it sends requests. It resolves and pins public network addresses, rejects private or reserved destinations, and stops on redirects. The same network checks apply to OAuth metadata and token requests. These checks matter because a connection starts with a URL entered by a workspace owner, and a remote service can return additional URLs during discovery. MCP security best practices
If your service issues a separate credential per project, you can use the same URL in two named connections. Each connection has independent credentials and grants. Check the account or project on the provider side before selecting the tools. If you reconnect an existing connection with a new account, Norilu clears its previous grants and asks you to choose access again. Disconnecting blocks new calls before credential cleanup. If a call was already sent, check the provider for its outcome.
Set MCP tool permissions for a saved agent
Connecting an account makes its tools available for review in Connections. The workspace owner selects individual tools for a saved agent. For a work-order summary, that might be the tools that list orders and read a single order. A tool that closes an order can stay outside the grant. This still matters if the provider credential can close orders, because the credential’s permissions and the agent’s grant are separate controls.
Norilu checks the saved agent’s binding, its current grant and the tool definition at dispatch. The broker rediscovers the remote tool and checks a fingerprint that covers its name, description, input schema and annotations. A changed definition blocks the old call until the owner reviews the new one. For example, a service can keep a familiar name while changing the arguments the tool accepts. Checking the definition gives the owner a chance to inspect that change.
Connection grants apply across versions of a saved agent. A released version can keep the same instructions while losing access after a grant is revoked. When a tool works in one rehearsal and becomes unavailable in another, check the current connection and the tool definition along with the release version. Review access again when you change the provider account or when a refresh detects a changed tool.
Descriptions and results supplied by the remote server are untrusted data. If a tool result asks the agent to invoke another action, the proposed call still goes through the same grant and approval checks. The provider must enforce its own access rules for each tool request and return only records that the connected account may see.
Decide which calls need approval
Remote MCP calls ask for approval by default. A tool grant makes the tool available to the agent. An approval authorizes a proposed call. For an action such as closing a work order, inspect the target and arguments in the request before deciding. In a rehearsal, you can leave the action unapproved and verify the work order stayed open.
A workspace owner who has verified that a tool only reads can set an expiring automatic read policy for that tool definition, saved agent and connection. A server’s read-only annotation can inform that review. At dispatch, Norilu checks the current policy, grant and tool definition. Before enabling the policy, check the tool’s behavior with test data and choose how long the agent needs automatic reads.
Keep per-call approval for tools that change data or have unclear effects. Image transfers require their own approval. If an approved write times out, its outcome can be unknown because the server may have received and applied it before the connection dropped. Norilu avoids automatically replaying a timed-out invocation. Check the destination’s current state or its audit history before approving a fresh write. For example, if a close request timed out, read the work order and check whether it is already closed.
Verify isolation with two projects
Suppose a maintenance team has two sites, North and South. Both are served by the same MCP endpoint. Each site has a visible work order and an internal note that only staff can see. The goal is to give a site assistant enough context to summarize open work while keeping the other site’s orders and staff notes outside the client view.
In a two-project rehearsal, we tested two credentials directly against the same MCP endpoint. Each returned its own project’s visible records and omitted staff-only records. Direct requests for the other project returned a tool error in both directions. In separate Norilu chats, each saved agent called only its assigned project and returned tool results with the same visibility limits.
- Give each project a separate connection. Create two named connections at the same URL with credentials that the provider restricts to North and South respectively. Give each saved test agent only the read tools it needs and open a fresh chat for each. Keep the prompt, tool list and sample records comparable so you can attribute differences to the credential and the provider’s access rules.
- Prove that each project works. Ask the North agent for North’s open orders and the South agent for South’s. Choose View activity on each saved reply and open the corresponding tool call. Check that its recorded result contains the expected visible order. Treat a shortened record as inconclusive. Rerun the chat with a small synthetic result or inspect the full response recorded by your test server for that call. This verifies that each saved agent can read its assigned project through Norilu.
- Test both directions at the provider. With synthetic data and permission to test the endpoint, use each credential to read its own project directly from the MCP server. Confirm the read returns the expected record. Repeat the same tool call with only the project changed. For each direction, require the provider’s documented access denial or intentional empty result. Treat a timeout, expired credential or invalid argument as inconclusive. An HTTP 200 can carry an MCP tool error, so inspect the JSON-RPC result.
- Check the internal record. Give each synthetic staff-only note a unique marker. Check that the marker is absent from the complete tool result and the visible order is still present. Test any search or list operation the agent will use, since a provider can apply different filtering to different tools.
- Change a grant and check the next call. First verify that each agent can read one visible order with the single-order tool. Remove that tool’s grant from the North agent, then repeat both reads. North’s tool should be unavailable and South’s should still return its own order. If you use automatic reads, also check that a stale or expired policy stops authorizing reads. In a test environment you control, repeat after a tool-definition change and confirm it needs review.
Record the provider response, Norilu’s tool decision and the final answer separately. A provider denial demonstrates provider-side scope for that request. A missing grant demonstrates the Norilu tool boundary. If you plan to add more tools, include each one in the rehearsal before granting access to production data. When a positive read fails, fix the setup and repeat the positive control before treating a denial as evidence.
Keep conversation access scoped in your app
The hosted agent API lets a trusted backend start and read conversations with a released agent. The server key is pinned to the release and scopes access to the conversations it creates. The agent still runs in the workspace owner’s context with the saved agent’s connections, memory and files. Creating several keys for the same agent therefore still uses that agent’s tool grants.
For a customer pilot using the current API, give each customer a separate workspace and a project-scoped provider connection. Your backend authenticates its users, verifies project membership and chooses the corresponding server key. It also checks ownership before returning conversation history, a live stream or a file. The backend determines which project the caller can access before using a project or conversation ID supplied by the caller.
In the test app, sign in as the South user and try to open North’s test conversation using its saved ID. Check that the backend denies access to North’s history, stream and files, and that South can still open its own conversation. This tests the app’s authorization independently of which records the MCP provider returns.
A shared agent that serves multiple customers needs a verified user and project binding. The integration has to carry that binding through conversation creation, tool execution and access to outputs. The remote MCP server still needs to enforce record-level access. A short-lived project credential is one way to carry provider-side authority when both services support that flow.
Before you widen access, save the successful and denied reads from both synthetic projects. Record whether the staff-only markers were absent and the revoked tool stopped working. Repeat those checks after a provider permission change, reconnection or tool-grant change.
Questions
Can I connect a localhost MCP server?
Norilu’s remote connection flow requires a publicly reachable HTTPS endpoint that supports MCP Streamable HTTP. A local stdio server needs a client that runs alongside it.
Written by The Norilu team.