Cursor Integration

Cursor supports the Model Context Protocol (MCP) natively. By default, Cursor executes any MCP tool call immediately. By wrapping your MCP servers with dmint-mcp, every tool call proposed by Cursor’s AI model is intercepted and evaluated against your policy.json.

1. Generate Protection Configuration

First, generate your policy.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
Always use absolute paths in .cursor/mcp.json so Cursor can locate the configuration regardless of which subfolder is currently open.

3. Install the Policy Authoring Skill

To let Cursor help you author or update rules directly in the Cursor chat:
This installs the skill to .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

  1. Open Cursor and prompt the Agent:
  2. Cursor invokes the postgres_update tool through the gateway.
  3. The gateway evaluates policy.json. Seeing APPROVAL_REQUIRED, it halts execution and returns a message instructing the agent to await human review.
  4. Switch to http://127.0.0.1:8080, review the SQL update payload, and click Approve.
  5. Cursor automatically retries the call with the approved assertion. The query executes, and Cursor reports success!