Behavry Integration — Cursor
Cursor supports MCP servers natively via ~/.cursor/mcp.json. The configuration format is identical to Claude Code.
Prerequisites
- Behavry stack running (
make devordocker compose up) - Cursor installed
- Python 3.11+
Config File Location
~/.cursor/mcp.json
(Same location on macOS, Linux, and Windows.)
Quick Setup
make setup
This detects Cursor, provisions a cursor-local agent, and merges the MCP server config into ~/.cursor/mcp.json — all in one step.
To connect only Cursor:
cd backend && poetry run python ../demos/setup/create_dev_agent.py --client cursor
Activate in Cursor
- Open Cursor → Settings → Cursor Settings → MCP
- The Behavry servers should appear with a green status indicator
- If not visible, click Refresh or restart Cursor
Verify
- Open a project in Cursor and ask: "List the files in /workspace"
- Check http://localhost:5173 → Live Activity for the event
Token Refresh
Tokens expire in ~8 hours. Refresh all enrolled editors at once:
make tokens
Cursor picks up the new token without requiring a restart.
Troubleshooting
Servers showing as disconnected in Cursor MCP settings
Check the backend is running: curl http://localhost:8000/health
"Unauthorized" errors
Token expired. Run mcp_config.py --apply-cursor.
Config file conflicts
If you have an existing ~/.cursor/mcp.json, mcp_config.py merges under the mcpServers key — it does not overwrite the file. Existing entries are preserved.