How it works
agentsentinel-mcp is a stdio MCP server shipped in the Python SDK. Cursor launches it like any other MCP server. The proxy answers initialize itself and forwards tools/list and tools/call to the platform’s /mcp endpoint, authenticating with an agent-bound API key read from its environment.
The key travels only in the upstream Authorization header. It never appears in a tool list, a tool result, an error message or the proxy’s output, so the model never sees it. Upstream credentials for the tools themselves stay in AgentVault and are injected by the platform only after the gateway allows a call.
Install
The proxy needs Python 3.10 or later:agentsentinel-mcp command. Make sure it is on the PATH Cursor uses, or put its absolute path in command.
Register the server
Add this to~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
~/.cursor/mcp.json, and never commit a project-level file that contains it.
If the key is missing or the URL is not allowed,
agentsentinel-mcp exits non-zero with a one-line message on stderr (Cursor shows the server as failed, with the message in its MCP logs). The message never contains the key.
Walkthrough: a governed call, end to end
The operator steps (1–3, 5 and 6) use a user session: the registry, AgentVault and policy routes refuse API keys. In the commands below,$API is your platform API base URL and $SESSION_TOKEN is your console session token.
1. Create an agent-bound key
key (shown once) into AGENT_SENTINEL_API_KEY in your mcp.json.
2. Register a governed tool
target_url. Note the returned tool id. See Registering governed tools for the rules.
3. Bind a credential
Store the target’s credential in AgentVault and bind it to the tool, as described in AgentVault Credentials:4. Call it from Cursor
Open Cursor Settings → MCP, check that theagentsentinel server is enabled and lists send, then ask the agent:
Use the send tool to send a message to a@example.com.Cursor calls
tools/call. The proxy forwards it unchanged, the gateway decides, the platform injects the credential and runs the target, and the result comes back as an ordinary tool result. The model’s context holds the tool’s name, schema and result, never a key or token.
5. See a budget cap block a call
Cap the tool below its estimated cost with a policy for this agent:isError: true and the refusal’s reason code in structuredContent, which the proxy passes through unchanged:
monthly_budget_exceeded and kill_switch_active.
6. Verify the ledger
Both calls, the allowed one and the refused one, are recorded in the signed, hash-chained ledger. Verify the whole chain:"valid": true and "head_matches": true shows that no row was altered, removed or reordered. See GET /api/v1/ledger/verify.
Troubleshooting
Resources, prompts and the
/mcp/admin mount are not proxied.