cursor-agents-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cursor-agents-mcp spawn a background agent to fix the failing tests in src/, ping me when done"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cursor-agents-mcp
An MCP server that lets Claude Code delegate work to Cursor SDK agents — Grok by default — as detached, reusable, inspectable background jobs.
The point is cost. Frontier Claude models are expensive for work that does not need them. This hands that work to a cheaper model without giving up the orchestration, and without the orchestrator paying to read the result.
What it does
Async by default.
spawnreturns an id immediately. Nothing blocks.Agents are reusable.
follow_upsends another turn with the full prior conversation intact, instead of starting over.Agents are inspectable.
listfor the overview,inspectfor a compact per-agent digest that is never a transcript.Agents are steerable.
steerinjects into a live turn without discarding its work;stopcancels but leaves the agent resumable.Runs survive the session. Runners are detached, so closing Claude Code does not kill a refactor in progress.
Visible without asking. A background-task bridge puts each agent in Claude Code's task panel and notifies the orchestrator on completion; a status line shows what is running.
Project config is honored.
AGENTS.md,.cursor/rules,.agents/skillsand.cursor/mcp.jsonall work.
Related MCP server: opencode-mcp
Setup
Requires Node 22.13+ and a Cursor account.
npm installAuthenticate the SDK — note this is separate from the cursor-agent CLI
login, which it will not reuse:
node -e "import('@cursor/sdk').then(m => m.Cursor.auth.login({ apiKeyName: 'cursor-agents-mcp' }))"That mints a 90-day key into ~/.cursor/sdk/auth.json. A non-expiring key from
the Cursor dashboard in CURSOR_API_KEY works too.
Register with Claude Code, in ~/.claude.json:
{
"mcpServers": {
"cursor-agents": {
"type": "stdio",
"command": "node",
"args": ["/path/to/cursor-agents-mcp/src/mcp-server.js"]
}
}
}Defaults (model, effort, sandbox, fast-tier policy) are environment variables — see docs/configuration.md. For the status line, see docs/statusline.md.
Security
Worth reading before pointing this at a repo you care about.
Agents run with your permissions, not in a jail. By default spawn gives the
agent shell access and write access to its working directory — the same reach
Claude Code or the Cursor CLI already has. Nothing here asks you to approve
individual commands, because a headless run has nobody to ask.
The sandbox is off by default, deliberately. Turning it on
(sandbox: true) confines writes to cwd and blocks outbound shell network
access — but it also blocks every MCP tool call, because an approval-gated
call fails closed with no one to approve it. That trade is documented in
docs/sandbox-and-passthrough.md. Pick the
default that fits you; do not assume the shipped one is the safe one.
readOnly: true is the real containment switch. It runs the agent in plan
mode with edit, delete, applyAgentDiff, piEdit and piWrite withheld.
Use it for research, review, and anything you have not thought hard about.
Prompts are an injection surface. An agent that reads a web page, a
dependency's README, an issue body, or any other untrusted text may act on
instructions found there — with the shell access above. Treat a delegated agent
the way you would treat piping untrusted input into your own shell, and reach
for readOnly when the task involves reading things you did not write.
Runs outlive your session. Runners are detached on purpose, so closing
Claude Code does not stop an agent mid-write. Use cursor-agents ls --active to
see what is still going, and stop to end it.
Transcripts are stored in the clear. ~/.cursor-agents-mcp/agents/<id>/
holds every message of every run, including the contents of files the agent
read. If your repo contains credentials, they now also live there. Delete the
directory to clear it.
Your Cursor key is a real credential. Cursor.auth.login() writes a 90-day
key to ~/.cursor/sdk/auth.json in plaintext. Revoke it from the Cursor
dashboard's API-keys page if it leaks — deleting the local file alone does not
invalidate it.
Docs
Environment variables for every shipped default | |
Process model, the on-disk record, why runners are detached | |
The seven tools and their arguments | |
Why no tool returns a transcript | |
Model namespaces, the fast-tier trap, 4.5 vs 4.6 | |
Measured capability matrix; what loads automatically | |
Task panel bridge and status line setup |
Development
npm test # unit tests
npm run typecheckState lives in ~/.cursor-agents-mcp/, overridable with
CURSOR_AGENTS_STATE_ROOT.
License
MIT — see LICENSE.
Available Tools
7 toolsfollow_upA
Send another turn to an existing agent, keeping its full conversation. Use this instead of spawning a fresh agent whenever the work builds on what that agent already did — it keeps the context and costs far less. The agent must have finished; use steer for a live run.
Inputs: id (required), prompt (required).
inspectA
Show what one agent has done, as a compact digest — one line per tool call, not a transcript. Pass the since value from a previous call to get only new activity. The reply names the full transcript file; read it with shell tools only if the digest is genuinely insufficient.
Inputs: id (required), since, includeResult.
listB
List agents with their state, elapsed time, cost and latest activity. One line each.
Inputs: scope, activeOnly.
spawnA
Delegate a task to a Cursor agent (Grok by default) running detached in the background. Returns immediately with an agent id — it does NOT wait. The agent shares none of your context, so prompt must be a self-contained brief: name the files, the goal, and how to verify. Project AGENTS.md, .cursor/rules, .agents/skills and .cursor/mcp.json are honored automatically. After spawning, run the returned attachCommand via Bash with run_in_background:true, passing the returned attachDescription VERBATIM as the Bash tool's description. The task panel labels the row from that description, so a generic one hides what the agent is doing from the user. The task's exit notifies you when the agent finishes — do not poll.
Inputs: title (required), prompt (required), cwd, model, +4 more.
steerA
Inject a message into an agent's turn while it is still running, without killing its work. Use this to correct course mid-run — it is strictly better than stopping and re-prompting.
Inputs: id (required), text (required).
stopA
Cancel an agent's current run. The agent stays resumable via follow_up.
Inputs: id (required).
waitA
Block until the named agents finish. This blocks YOUR whole turn, so prefer the background-task bridge from spawn — use this only when there is genuinely nothing else to do. On timeout it returns progress rather than nothing.
Inputs: ids (required), mode, timeoutSec.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a clearly distinct action in the agent lifecycle. spawn creates, follow_up resumes finished agents, steer injects into live runs, stop cancels, list/inspect/wait provide distinct status, detail, and blocking behaviors. Descriptions explicitly disambiguate edge cases.
All tool names are lowercase snake_case and follow a consistent imperative verb style (spawn, follow_up, steer, stop, list, inspect, wait). The single multi-word name follow_up adheres to the same convention.
Seven tools precisely cover the core agent orchestration lifecycle without bloat. Each tool has a clear purpose and there are no redundant or missing operations for the stated scope.
The set covers spawn, monitor, interact, and stop comprehensively. Minor gap: there is no direct tool to retrieve an agent's final result or transcript as a first-class output—inspect provides a digest and directs users to shell tools, which is a small workaround.
Related MCP Connectors
AI cloud for agents: launch GPUs, run jobs that stop their own billing, schedule runs.
Durable background job execution, async task scheduling, and state persistence for AI agents.
Command center for developers coordinating AI coding agents across projects.
Build agents to automate any background task. Works with your ChatGPT/Claude subscription.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Codex to offload expensive code reading, editing, and checking to a worker agent via Claude Code, supporting async jobs and long-running tasks.MIT
- AlicenseAqualityBmaintenanceEnables Claude Code to delegate tasks to OpenCode subagents asynchronously, with tools for starting tasks, polling status, and fetching results.7309 npm6MIT
- AlicenseAqualityBmaintenanceEnables delegating coding tasks to Cursor Cloud Agents from Claude Code, Codex, or Grok, with scoped repository access, progress monitoring, follow-ups, and result reporting.23MIT
- AlicenseAqualityBmaintenanceEnables AI assistants and MCP clients to launch and manage Cursor Cloud Agents on repositories or without one, select models, follow up mid-run, retrieve or cancel results, and check usage and cost.9MIT