| name | cursor-mcp |
| description | Configure MCP servers on Cursor SDK agents โ stdio subprocess, HTTP, and SSE transports, inline vs file-based config, and per-run overrides. Use when extending an agent's tools beyond the built-ins. |
| metadata | {"internal":false,"source":"https://cursor.com/docs/sdk/typescript"} |
cursor-mcp
MCP servers expose tools to the agent. Configure them on AgentOptions.mcpServers (or SendOptions.mcpServers for per-run override) as Record<string, McpServerConfig> โ the key is the server name.
Transports
- [[references/stdio]] โ
command, args, env, cwd
- [[references/http]] โ
url, headers, auth
- [[references/sse]] โ
url with SSE transport
Configuration patterns
- [[references/inline-config]] โ
mcpServers on Agent.create
- [[references/per-run-override]] โ
mcpServers on agent.send (replaces, doesn't merge)
- [[references/file-config]] โ
.cursor/mcp.json and settingSources
- [[references/persistence]] โ inline servers are not persisted across
Agent.resume
Auth
- [[references/oauth]] โ
auth.CLIENT_ID / CLIENT_SECRET / scopes for HTTP/SSE
Cross-links
- Tool calls in the stream โ [[../cursor-runs/references/sdk-message-types]]
- Subagent-scoped MCP โ [[../cursor-subagents/references/agent-definition]]
- Hooks for tool gating โ [[../cursor-hooks/SKILL]]
IntegrationNotConnectedError โ [[../cursor-errors/references/integration-not-connected]]