FastMCP server that wraps the Cursor agent headless CLI, enabling Claude Code to call Cursor Agent via the MCP protocol.
claude mcp add cursor -s user --transport stdio -- uvx --from git+https://github.com/GuDaStudio/cursormcp.git cursormcp- Python 3.12+
uv- Cursor Agent CLI (
agentbinary in PATH or%LOCALAPPDATA%\cursor-agent\agent.cmd)
The cursor MCP tool accepts:
| Parameter | Type | Default | Description |
|---|---|---|---|
PROMPT |
str |
required | Task instruction |
workspace |
Path |
required | Working directory |
force |
bool |
False |
Allow file writes (--force) |
SESSION_ID |
str |
"" |
Resume prior session |
mode |
"agent"|"plan"|"ask" |
"agent" |
Execution mode |
sandbox |
"enabled"|"disabled"|"" |
"" |
Sandbox policy |
model |
str |
"" |
Model override |
return_all_messages |
bool |
False |
Include raw JSONL |