Why the model is never the boundary
- Is the agent live and not quarantined? And has an operator suspended every agent in the organization?
- Is the estate credential it will act with usable (not revoked, expired or compromised)?
- Is this agent entitled to this tool? No entitlement, no call. That includes when none was ever declared.
- What does the tool actually do?
read,write,administrative, or not yet known. - How much does the target matter? A mutating action on a high or critical resource needs a person.
- How supervised is the agent? An autonomous agent’s mutating actions need a person, and so do an agent’s whose autonomy nobody has declared.
Connecting an MCP server
The MCP connector reads what a server publishes with the protocol’s own handshake (initialize, then tools/list), over streamable HTTP. It records tools and resources, not identities: an MCP server answers whoever authenticates and does not know its callers.
The console’s Connect an environment form does not offer MCP; create the connector through the API, with the fields, the stored-token handle and the host allow-list your operator must set described in Connectors → MCP tool servers. The MCP connector has been tested against a simulated server only.
authMode: "bearer"sends a token you stored with the connector’s credential (POST /nhi/api/v1/connectors/credential, value nametoken), referenced by the connector’scredentialsHandle. The connector needs only enough access to list tools, never to invoke them.authMode: "none"is for an unauthenticated development server.
Declaring what a tool does
A tool’s effect is one ofread, write, administrative, authenticate or unknown. The connector sets an initial effect from the publisher’s own annotation (readOnlyHint: true becomes read, readOnlyHint: false becomes write) and leaves everything else unknown. A server’s destructiveHint never makes a tool administrative; only a person does.
A third-party server’s annotations are a claim, so review them. Set or correct a tool’s effect in the console (Agents → Tools) or with PATCH /nhi/api/v1/tools/{toolId}/effect and {"effect": "administrative", "statement": "Drops tables in the production schema"}. The statement is required for every effect other than unknown, because every finding the rating governs quotes it.
The caller also declares an action class on each request, and the gate uses the stricter of that claim and the tool’s recorded effect: a runtime cannot downgrade a mutating tool by calling the action a read.
Entitling an agent to a tool
An agent starts with no tool entitlements, andtool_not_entitled denies every tool it has none for. Declare each one in the console or with POST /nhi/api/v1/tools/entitlements:
statement is required. An entitlement is to a tool, not to an action class or a resource: bound what a tool can reach by what the tool itself does, and by an access grant for anything high-impact.
These routes, like every NHI Security route except the gate itself, take your TRUSTIVAN session, not a bearer token. See Limitations. Declaring effects and entitlements needs agent:manage.
Asking before every call
When the model asks for a tool, the runtime asks the gate first, with its runtime credential:
Branch on
mayProceed. It is derived from the decision by NHI Security, so the runtime and the platform cannot disagree about what a challenge means.
allow: forward the call to the MCP server.challenge: do not call the tool. A person decides by approving an access grant in the console; the runtime cannot request one itself.challengeFornames a request already waiting, if somebody has asked. The next check after approval can allow, as long as nothing else still challenges.deny: do not call the tool, and tell the user it was refused. A refusal is stillHTTP 200.
requestId so a retry after a network failure returns the decision already made rather than a second one.
Reporting the outcome
After an allowed call, report what happened, once:Practices worth keeping
- Keep provider credentials away from the model. Give the runtime, not the model, whatever credential the MCP server or the provider needs. NHI Security does not issue or broker those credentials; the runtime credential it issues authenticates to NHI Security only.
- Rate destructive tools
administrative. Then no call to them proceeds without a grant, and a grant needs a second admin: self-approval is refused. - Always send
requestId. It makes retries safe. - Keep MCP servers off the public internet, reachable from your agent runtimes and not from wherever a model’s output could point a request.