Cursor Integration
Cursor supports the Model Context Protocol (MCP) natively. By default, Cursor executes any MCP tool call immediately. By wrapping your MCP servers withdmint-mcp, every tool call proposed by Cursor’s AI model is intercepted and evaluated against your policy.json.
1. Generate Protection Configuration
First, generate yourpolicy.json and mcp_protection.json using dmint-cli:
2. Configure .cursor/mcp.json
In your project root, create or edit .cursor/mcp.json. Replace the raw tool command with the dmint-mcp gateway runner:
.cursor/mcp.json
3. Install the Policy Authoring Skill
To let Cursor help you author or update rules directly in the Cursor chat:.agents/skills/dmint-policy-manager/, which Cursor automatically recognizes.
4. Launch the Approval Dashboard
Start the local approval dashboard in a background terminal:5. Experience the Flow in Cursor
- Open Cursor and prompt the Agent:
- Cursor invokes the
postgres_updatetool through the gateway. - The gateway evaluates
policy.json. SeeingAPPROVAL_REQUIRED, it halts execution and returns a message instructing the agent to await human review. - Switch to http://127.0.0.1:8080, review the SQL update payload, and click Approve.
- Cursor automatically retries the call with the approved assertion. The query executes, and Cursor reports success!