Cursor setup
Cursor supports the Model Context Protocol, so InPolicy integrates the same way it does for Claude Desktop.
Prerequisites
Section titled “Prerequisites”- Cursor installed.
- Node.js 18+.
- An InPolicy API key.
One-user setup
Section titled “One-user setup”-
Open Cursor, then Settings → Cursor Settings → MCP (or Settings → Features → MCP Servers depending on Cursor version).
-
Click Add new MCP server and paste this config:
{"mcpServers": {"inpolicy": {"command": "npx","args": ["-y", "@inpolicy/mcp-server"],"env": {"INPOLICY_API_KEY": "inp_live_REPLACE_ME"}}}} -
Save. Cursor loads the server on the next chat panel open. You should see
inpolicylisted with a green status. -
Apply the system prompt template under Settings → Rules → User Rules (or at the project level in
.cursor/rules.md).
Fleet deployment (IT)
Section titled “Fleet deployment (IT)”Cursor’s MCP config location varies by platform:
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Cursor/User/globalStorage/mcp.json |
| Windows | %APPDATA%\Cursor\User\globalStorage\mcp.json |
| Linux | ~/.config/Cursor/User/globalStorage/mcp.json |
Ship the same JSON shown above to that file via your MDM or scripting layer, substituting the API key at deploy time.
For engineering-org-wide enforcement at the project level, check in a .cursor/rules.md at the repo root with the system prompt. Engineers pick it up as soon as they open the project.
Verify it’s working
Section titled “Verify it’s working”Open Cursor’s chat and ask:
“What InPolicy tools are available?”
Cursor should list the tools. If it doesn’t:
- Check Settings → MCP. The
inpolicyentry should show green. Yellow usually means Node isn’t available; red means bad config or a bad API key. - Restart Cursor (sometimes MCP servers need a full restart, not just a window reload).
- Run the server manually to test:
INPOLICY_API_KEY=... npx -y @inpolicy/mcp-server. It should print a readiness line to stderr and wait for stdin.
Cursor-specific notes
Section titled “Cursor-specific notes”- Cursor’s Composer mode (the multi-file agent) benefits most from InPolicy. That’s the context where the AI is making consequential changes and a policy nudge matters.
- Cursor’s Tab completion does not route through MCP, so InPolicy does not see those completions. That’s expected.
- Cursor’s agent has stronger tendency to invoke tools than Claude Desktop, so compliance with the system prompt is generally higher.