Cursor Agent MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CURSOR_API_KEY | No | Cursor API key (crsr_...). Also accepted as CURSOR_AGENT_API_KEY. Required for bare_config mode. | |
| DEBUG_CURSOR_MCP | No | Set to '1' to enable debug diagnostics (API keys redacted). | 0 |
| CURSOR_AGENT_PATH | No | Absolute path to the agent CLI binary (default: 'agent' on PATH) | agent |
| CURSOR_AGENT_FORCE | No | Set to '1' or 'true' to inject --force flag. | 0 |
| CURSOR_AGENT_MODEL | No | Default model for the CLI (e.g., auto, gpt-5, composer-2). | auto |
| CURSOR_AGENT_TRUST | No | Set to '1' or 'true' to inject --trust flag (default true). | true |
| CURSOR_AGENT_API_KEY | No | Alternative environment variable for the Cursor API key. | |
| CURSOR_AGENT_CONFIG_DIR | No | Explicit CURSOR_CONFIG_DIR to use (overrides bare config logic). | |
| CURSOR_AGENT_TIMEOUT_MS | No | Hard runtime ceiling per call in milliseconds (0 disables, default 30000). | 30000 |
| CURSOR_AGENT_BARE_CONFIG | No | Set to '1' to use an isolated config directory for fast startup. Also accept CURSOR_AGENT_FAST. | 0 |
| CURSOR_AGENT_ECHO_PROMPT | No | Set to '1' to prepend the prompt to the result. | 0 |
| CURSOR_AGENT_ASYNC_MAX_MS | No | Max lifetime for async jobs in milliseconds (0 disables, default 1800000). | 1800000 |
| CURSOR_AGENT_IDLE_EXIT_MS | No | Idle kill threshold in milliseconds (0 disables). | 0 |
| CURSOR_AGENT_KEEP_TELEMETRY | No | Set to '1' to keep OpenTelemetry enabled in the child process (default off). | 0 |
| CURSOR_AGENT_BARE_CONFIG_DIR | No | Directory for the isolated bare config (default ~/.cursor-agent-mcp). | ~/.cursor-agent-mcp |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| cursor_agent_chatC | Chat with Cursor Agent. Supports model, api_key, and bare_config (fast isolated config). |
| cursor_agent_edit_fileC | Edit a file with an instruction (prompt-based wrapper). |
| cursor_agent_analyze_filesC | Analyze one or more paths; optional prompt. |
| cursor_agent_search_repoC | Search repository code with include/exclude patterns. |
| cursor_agent_plan_taskC | Generate a plan for a goal with optional constraints. |
| cursor_agent_rawC | Advanced: raw argv after common flags (e.g. ["--help"]). print defaults to false. |
| cursor_agent_startA | Start a long-running prompt in the background; returns job_id immediately. Poll with cursor_agent_check. |
| cursor_agent_checkB | Poll status/output of a job from cursor_agent_start. |
| cursor_agent_cancelA | Kill a running job started with cursor_agent_start. |
| cursor_agent_runC | Legacy single-shot chat (prompt as positional). Prefer cursor_agent_chat. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Most tools have distinct purposes (chat, edit, analyze, search, plan, raw, async start/check/cancel). However, cursor_agent_chat and cursor_agent_run both perform chat, though the latter is marked as legacy, causing potential confusion.
All tools share the 'cursor_agent_' prefix and use snake_case. Most follow a verb_noun pattern (e.g., chat, edit_file, analyze_files, search_repo, plan_task), but 'raw' and 'run' are verb-only, which is a minor inconsistency.
With 10 tools, the set is well-scoped for the domain of interacting with a Cursor agent. It covers common operations without being too sparse or overwhelming.
The tool set covers core interactions (chat, file editing, code search, analysis, planning, async jobs, raw access). There are no obvious dead ends, though some advanced IDE operations might be missing, but they are not central to the agent's purpose.