mcp-gate and every tool call will be evaluated against your Sentrail policies.
Prerequisites
- A Sentrail workspace with an MCP server connected (Tools → MCP → Connect)
- An API key with the
mcpscope
Configuration
Add the Sentrail MCP server to your Cursor MCP configuration. Open Cursor Settings → MCP or edit~/.cursor/mcp.json:
agk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your actual API key.
Verifying the connection
After saving, open the Cursor MCP panel. Thesentrail server should appear with a green status indicator and the list of tools from your upstream MCP server.
How it works
When Cursor’s agent invokes an MCP tool:- Cursor sends
tools/listtomcp-gate— gets back your upstream tool list (cached 60s) - Cursor sends
tools/calltomcp-gate mcp-gateevaluates the call against your Sentrail policies- On allow: call is forwarded to upstream; result returned to Cursor
- On block: Cursor receives a JSON-RPC error with the block reason
- On require_approval: Cursor receives a result with an approval message; the agent is paused until a reviewer decides
Agent identity
TheX-Agent-Id: cursor header is recorded in all audit log entries from Cursor. Use it in policy conditions to scope rules specifically to Cursor:
Project-level configuration
For team setups, commit a project-level config that references an environment variable:SENTRAIL_API_KEY in their shell profile. You can generate per-developer keys with the same scopes but different names for attribution in audit logs.
Troubleshooting
Server shows as disconnected
Server shows as disconnected
Confirm the Sentrail endpoint ends with
/mcp-gate/sse. Cursor does not support stdio transport for remote servers.Tools list is empty
Tools list is empty
The tool list is fetched from your upstream MCP server. If no tools appear, check that your MCP server is running and reachable at the URL configured in Sentrail → Tools → MCP.
Approval message appears in Cursor chat
Approval message appears in Cursor chat
This is expected behavior. When a
require_approval decision is returned, Cursor surfaces the message from _meta.sentrail. Open the Sentrail dashboard → Approvals to review and decide.