
Cursor Mcp
io.github.qmediatv1.2.0Updated Oct 6, 2026
Cursor's agent (cursor-agent CLI) through MCP: any model your plan offers, resumable sessions.
Overview
Wraps the Cursor CLI agent so an assistant can run Cursor coding prompts, resume sessions, list models, and check setup.
- What it does
- Exposes five tools around the local cursor-agent CLI: cursor_agent runs a prompt with a chosen model and mode, cursor_reply continues an existing session, cursor_models lists model ids the installed CLI offers, cursor_sessions lists sessions from this server instance, and cursor_health checks installation, auth, and config. Runs stream JSON output with session id, model, duration, tool calls, and changed files, and reports progress notifications. A semaphore limits concurrent agent processes.
- When to use it
- Useful when you want an assistant to delegate coding or code review to Cursor's agent, including running several models in parallel, or when Claude Code should supervise a Cursor model that does the editing. Also handy for read-only planning or exploration modes.
- Requirements
- Node.js 22 or newer, plus the Cursor CLI installed and authenticated with a Cursor account whose plan includes agent usage. Runs locally over stdio, typically via npx or a global install. Optional environment variables: CURSOR_MAX_CONCURRENCY, CURSOR_ALLOW_YOLO, CURSOR_SANDBOX, CURSOR_KILL_GRACE_MS.
Installation
In SourceWeft
- Open Cursor Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@qmediat.io/cursor-mcp
[npm version] [License: MIT] [TypeScript]
MCP server for the Cursor CLI (cursor-agent): run Cursor's agent with any model id your plan offers — the Composer, Claude, GPT, Gemini and Grok families — through the Model Context Protocol.
Why this server?
- Any Cursor model — the
modelid is passed tocursor-agent --modelas given;cursor_modelslists what your CLI offers (Composer, Claude, GPT, Gemini, Grok families on your plan) - 5 tools — agent execution, session continuation, model listing, session listing, health check
- Parallel execution — run multiple models simultaneously with built-in concurrency control (semaphore)
- Guarded execution —
spawnwithout a shell, auto-approve only through the operator's environment (never a tool parameter), the client's cancellation and the timeout kill the child and its process group (SIGTERM, SIGKILL 5 s later; on Windows cursor-agent itself only) - Minimal dependencies — only
@modelcontextprotocol/sdk+zod - Session management — resume conversations across calls
Quick Start
Prerequisites
- Node.js >= 22.0.0
- Cursor CLI installed and authenticated:
Requires Node.js 22 or newer.
Install
or by hand (below). npm install -g @qmediat.io/cursor-mcp installs the cursor-mcp command, which can replace the npx line in any config.
Configuration
Claude Code (~/.claude.json)
Claude Desktop (claude_desktop_config.json)
Local development
Environment Variables
Available Tools
Both agent tools run cursor-agent with --output-format stream-json: the answer, its session_id, request_id, the model cursor-agent reported, the duration, the number of tool calls and the files changed (write/edit targets, each once) come back as text and as structuredContent (outputSchema published). A client that sends a progress token on the request gets one notifications/progress per event (model, tool call, assistant message), so a ten-minute run never looks dead.
Models
model is passed to cursor-agent --model as given, so every id the installed CLI accepts works — the current list and prices are on cursor.com/docs/models-and-pricing, and cursor_models returns what your CLI reports (cursor-agent models). auto (the default) lets Cursor choose. This README names no ids on purpose: Cursor adds and retires models faster than this package releases, and a list here was what made 1.0.x reject every current model.
Modes
Parallel Execution
Run multiple models simultaneously by making parallel tool calls:
The built-in semaphore (default: 3) queues excess requests to prevent rate limit errors.
Security
- No shell execution —
child_process.spawnwith argument arrays; the prompt follows a--separator and the session id must be one word, so neither can read as acursor-agentoption (a prompt or session id of-fcannot turn into--force) - No credentials stored — cursor-agent handles its own OAuth
- No HTTP requests — pure CLI wrapper, no network access beyond cursor-agent
- Process cleanup — the client's cancellation (the MCP request signal) and the timeout kill the child and the helpers in its process group (POSIX; on Windows there is no group and only cursor-agent itself is signalled): SIGTERM, then SIGKILL after
CURSOR_KILL_GRACE_MS(5 s); the call and its concurrency slot are released only once the child itself has exited; the server's own shutdown ends every running group the same way, so no agent outlives it - Auto-approve gated —
--forcerequires explicitCURSOR_ALLOW_YOLO=trueenv var, never controllable by LLMs; without it the agent only proposes changes;CURSOR_SANDBOX=enabledconfines an auto-approved agent; it applies tocursor_agentandcursor_replyalike - Trusted workspace — every call runs
cursor-agent --truston the givenworkspace(the server's cwd by default), so the agent is not prompted about the directory: pointworkspaceonly at directories you intend it to operate in - Concurrency limited — semaphore prevents resource exhaustion
See SECURITY.md for full details.
Supervised Coding Skill
Optional Claude Code skill that lets Claude Code act as a supervisor while any Cursor model does the coding.
How it works: Claude Code analyzes the task, sends precise instructions to Cursor via cursor_agent, reviews the output by reading actual files from disk, and iterates with cursor_reply until satisfied (max 3 rounds).
Prerequisite: The
cursor-cliMCP server (this package) must be installed and configured in Claude Code first.
Usage
Run cursor_models to list the ids your CLI offers.
Install the skill
Create ~/.claude/skills/cursor-code/SKILL.md with the following content:
SKILL.md (click to expand)
Restart Claude Code after creating the skill file.
Development
See CONTRIBUTING.md for guidelines; npm test builds and runs the smoke and argv tests.
Trademarks and affiliation
Cursor is a trademark of Anysphere. This is an independent, community-maintained integration published by Quantum Media Technologies sp. z o.o.; it is not affiliated with, sponsored by or endorsed by Anysphere. Use of the Cursor API or CLI through this server is subject to Anysphere's own terms and to your own API key or account.
License
MIT - Quantum Media Technologies sp. z o.o.
Made by Quantum Media Technologies · more open source from qmediat
Source: README.md at commit 8fc3256
Tools
0Version history
1- v1.2.0LatestOct 6, 2026

