MCP Overview

March 5, 2026 · View on GitHub

How Cursor Drive implements the Model Context Protocol (MCP). Maps our setup to the standard MCP concepts.


What is MCP?

MCP lets Cursor connect to external tools, data sources, and services. An MCP server exposes tools, resources, prompts, and apps that Cursor's Agent can use during conversations.


Core concepts — what Drive exposes

CapabilityDrive implementation
Tools40+ tools: TTS, Agent Screen, operators, pipeline, persistence, Cursor CLI, sync, connectors. See mcp-tools.md.
ResourcesOne MCP App resource: ui://cursor-drive/agent-screen (activity feed UI).
PromptsNone.
AppsYes. When cursorDrive.mcp.enableApps is true, agent_screen_activity, agent_screen_file, and agent_screen_decision return _meta.ui.resourceUri for inline UI in chat.

Transport

TransportUse caseDrive
stdioLocal server, single userNo
SSERemote server, OAuthNo
Streamable HTTPRemote server, OAuthYes — Drive uses Streamable HTTP

Drive's MCP server runs inside the VS Code extension host. It binds to 127.0.0.1 and uses StreamableHTTPServerTransport from @modelcontextprotocol/sdk. Cursor connects via url: "http://127.0.0.1:7891/mcp" — the port may be 7892, 7893, etc. if 7891 is in use.


Connecting your server to Cursor

Config locations

LocationScope
.cursor/mcp.jsonProject-specific (commit to git for team sharing)
~/.cursor/mcp.jsonGlobal

Drive MCP config

{
  "mcpServers": {
    "drive": {
      "url": "http://127.0.0.1:7891/mcp"
    }
  }
}

Registration methods

  1. Programmatic (Extension API) — When the extension activates and the API exists, Drive calls vscode.cursor.mcp.registerServer({ name: "drive", server: { url: "http://127.0.0.1:${port}/mcp" } }). No mcp.json edit needed.
  2. Plugin installerDrive: Install Drive Plugin to Workspace merges the Drive server into .cursor/mcp.json.
  3. MCP install deeplinkREADME includes a one-click link. First-run prompt also offers a deep link.
  4. Manual — Add the config above to .cursor/mcp.json or ~/.cursor/mcp.json.

Config interpolation

Cursor supports variable interpolation in mcp.json:

VariableDescription
${env:NAME}Environment variable
${workspaceFolder}Project root
${userHome}Home directory
${pathSeparator} or ${/}OS path separator

Drive's config does not use interpolation (no secrets). For other MCP servers you add, use ${env:API_KEY} etc. to avoid hardcoding.


MCP Apps (interactive UI in chat)

When cursorDrive.mcp.enableApps is true (default), these tools return interactive UI:

ToolReturns _meta.ui
agent_screen_activityYes
agent_screen_fileYes
agent_screen_decisionYes

The UI resource ui://cursor-drive/agent-screen is an activity feed. Requires Cursor 2.6+ (or another host that supports MCP Apps). Progressive enhancement: if the host cannot render Apps, tools still work with text output. See demo-mcp-apps.


Images

MCP tools can return images (base64). Drive does not return images; all tool returns use type: "text".


OAuth

Drive does not use OAuth. The server is localhost-only. For other MCP servers that require OAuth, use auth: { CLIENT_ID, CLIENT_SECRET, scopes } in mcp.json and register redirect URL cursor://anysphere.cursor-mcp/oauth/callback.


Security

PracticeDrive
No hardcoded API keysYes — no secrets in mcp.json
Localhost-onlyYes — binds to 127.0.0.1 only
Restricted API keysN/A — no external auth
envFile for stdioN/A — HTTP transport

Debugging

ActionHow
MCP logsOutput panel (Cmd+Shift+U / Ctrl+Shift+U) → select "MCP Logs"
Drive outputOutput panel → "Cursor Drive"
VerbosityDeveloper: Set Log Level… → Cursor Drive
Toggle serversSettings → Features → Model Context Protocol
DiagnoseDrive: Diagnose Drive APIs command

Further reading

DocContent
mcp-tools.mdFull tool reference
config-schema.mdcursorDrive.mcp.enableApps, cursorDrive.mcp.port
demo-mcp-appsMCP Apps setup and troubleshooting
MCP referenceCursor MCP docs
MCP Extension APIProgrammatic registration
MCP Apps specMCP Apps extension