Use this guide to put Arbitus between Cursor and your upstream MCP server.
Official Cursor MCP docs: https://docs.cursor.com/context/model-context-protocol
For a local demo, use the included dummy server:
cargo run --bin dummy-serverFor a real deployment, set transport.upstream in the policy to your MCP server URL.
Use the Cursor starter policy:
arbitus policy init cursor --out gateway.yml
arbitus gateway.ymlDuring local development from source:
cargo run --bin arbitus -- policy init cursor --out gateway.yml
cargo run --bin arbitus -- gateway.ymlThis policy identifies Cursor by clientInfo.name: cursor, allows common read/search/edit tools, requires Human-in-the-Loop approval for edits, shadows command-like tools, redacts matching secrets, and logs every decision.
Cursor supports project-scoped MCP configuration at .cursor/mcp.json and global configuration at ~/.cursor/mcp.json.
Create .cursor/mcp.json in your project:
{
"mcpServers": {
"arbitus": {
"url": "http://localhost:4000/mcp"
}
}
}If your Cursor version requires an explicit transport type for HTTP servers, use:
{
"mcpServers": {
"arbitus": {
"type": "http",
"url": "http://localhost:4000/mcp"
}
}
}If Arbitus is protected by an API key, pass it as a header when your Cursor version supports headers for HTTP MCP servers:
{
"mcpServers": {
"arbitus": {
"type": "http",
"url": "http://localhost:4000/mcp",
"headers": {
"X-Api-Key": "${ARBITUS_AGENT_API_KEY}"
}
}
}
}Open Cursor settings or the chat tool list and confirm the arbitus MCP server is connected. Cursor's Agent can use MCP tools from the available tools list when relevant.
Run a safe tool first. Then test a blocked path using the Security demo.
Query audit events:
arbitus audit gateway-audit.db --agent cursor --limit 20- Keep
.cursor/mcp.jsonproject-specific when the MCP tools belong to a single repo. - Use
~/.cursor/mcp.jsononly for personal cross-project tools. - Keep auto-run disabled for high-risk tools unless Arbitus policy requires approval or shadow mode.
- Use the Arbitus policy as the source of truth; Cursor's UI toggles are useful, but the gateway enforces policy even if an agent guesses a tool name directly.