Skip to main content

Cursor Setup

Configure Cursor to use Comply as an MCP tool.

Prerequisites

  • Cursor 0.40 or higher (MCP support required)
  • Comply installed (see Installation)

Configuration

Create or edit .cursor/mcp.json in your home directory (global) or project root (project-scoped):

{
"mcpServers": {
"comply": {
"command": "/usr/local/bin/comply",
"args": ["mcp"],
"env": {
"OPENROUTER_API_KEY": "sk-or-your-key-here"
}
}
}
}

Replace /usr/local/bin/comply with the output of which comply.

Global vs project-scoped config

LocationScope
~/.cursor/mcp.jsonAvailable in all Cursor projects
<project>/.cursor/mcp.jsonAvailable only in this project

Use global config for a personal install. Use project-scoped config when different projects use different Comply configs.

Verify the connection

  1. Restart Cursor after saving the config
  2. Open the AI panel (Cmd+L or Ctrl+L)
  3. Ask: "Use comply_check to check /path/to/repo"

Cursor's AI will call the comply_check tool and return results inline.

Using with Cursor Agent

When Cursor Agent is writing or editing code, you can ask it to run a compliance check before finalizing:

"After making these changes, run comply_check on this repo and fix any FAIL results."

The agent will call Comply, read the JSON output, and address violations automatically.

Next steps

CI Integration to enforce compliance in GitHub Actions.