Cursor MCP

How MCP works inside Cursor: where the config lives, the three transports, the JSON shape for local and remote servers, static OAuth credentials and the enterprise controls, read from the Cursor documentation on 2 September 2026.

Interactive examples · No account is connected on this page

Updated

Cursor MCP is Cursor's support for the Model Context Protocol. You install servers from the Cursor Marketplace or configure them in mcp.json, either per project at .cursor/mcp.json or globally at ~/.cursor/mcp.json. Cursor supports three transports — stdio, SSE and Streamable HTTP — and supports tools, prompts, resources, roots, elicitation and the MCP Apps extension for interactive UI.

Try a Cursor MCP task

Pick an example to see which Cursor MCP tools a task would call and what the result looks like. Examples are illustrative; nothing on this page connects to Cursor.

Cursor

Add an MCP server to Cursor

Cursor reads MCP servers from mcp.json: .cursor/mcp.json in the project root for one project, or ~/.cursor/mcp.json for every project. A local server is a command Cursor starts; a remote server is a URL plus optional headers or an auth object. Secrets belong in config interpolation such as ${env:NAME}, and tool calls ask for approval by default.

Decide where the config lives

Two locations, and the choice is about scope rather than syntax. A .cursor/mcp.json in the project root gives that project its own tools, which is what you commit for a team. A ~/.cursor/mcp.json in your home directory makes a server available everywhere. Team admins have a third route and can distribute servers through a team marketplace, where they appear in Customize alongside personal and workspace servers.

.cursor/mcp.json      # this project
~/.cursor/mcp.json    # every project

Add a local stdio server

A stdio server is a command Cursor starts and manages for you. command is required and must be on your system path or given in full; args and env are optional. envFile is stdio-only — remote servers cannot use it, and the docs point those at config interpolation instead.

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "mcp-server"],
      "env": {
        "API_KEY": "value"
      }
    }
  }
}

Add a remote HTTP or SSE server

A remote server is a url plus optional headers. Cursor supports both SSE and Streamable HTTP for remote endpoints, and both are multi-user: the server is deployed once and several people point at it, with OAuth rather than a manually pasted key.

{
  "mcpServers": {
    "server-name": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "API_KEY": "value"
      }
    }
  }
}

Use static OAuth credentials when the provider needs them

Some providers hand you a fixed client ID, require a whitelisted redirect URL, or do not support OAuth 2.0 Dynamic Client Registration at all — Cursor's docs name Figma and Linear as redirect-whitelisting examples. For those, add an auth object to the remote entry. Omit scopes and Cursor discovers them from the server's /.well-known/oauth-authorization-server metadata.

{
  "mcpServers": {
    "oauth-server": {
      "url": "https://api.example.com/mcp",
      "auth": {
        "CLIENT_ID": "your-oauth-client-id",
        "CLIENT_SECRET": "your-client-secret",
        "scopes": ["read", "write"]
      }
    }
  }
}

Register both redirect URLs on the provider side

Cursor uses fixed OAuth redirect URLs, and they differ by surface: web and Cursor Agents come back to the cursor.com callback, while the desktop app comes back to localhost. If your users authenticate from both, register both as allowed redirect URIs. The docs note the server is identified through the OAuth state parameter, so these two URLs serve every MCP server.

https://www.cursor.com/agents/mcp/oauth/callback
http://localhost:8787/callback

Interpolate secrets instead of hardcoding them

Cursor resolves variables in command, args, env, url and headers. ${env:NAME} pulls from the environment, and ${workspaceFolder}, ${userHome}, ${workspaceFolderBasename}, ${pathSeparator} and ${/} cover paths. This is the documented way to keep a client ID or a bearer token out of a file you commit.

{
  "mcpServers": {
    "remote-server": {
      "url": "https://api.example.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:MY_SERVICE_TOKEN}"
      }
    }
  }
}

Enable it, then watch the approvals

Servers are toggled on and off from Customize in the sidebar, and Cursor picks up MCP tools listed under Available Tools when they are relevant, including in Plan Mode. Tool calls ask for approval by default, and MCP follows the same Run Modes as terminal commands — in Auto-review, allowlisted tools run immediately and everything else goes through the classifier.

Customize → find the MCP server → toggle on

Official documentation: Read the Cursor MCP docs.

The three transports Cursor supports

Cursor supports three MCP transports, and the choice decides who runs the server and how it authenticates. stdio is a local command Cursor manages for a single user, authenticated through environment variables. SSE and Streamable HTTP are deployed servers that several people can share, authenticated with OAuth, and neither supports envFile, so secrets go through interpolation instead.

What differsstdioSSEStreamable HTTP
Execution environmentLocalLocal or remoteLocal or remote
DeploymentCursor manages the processDeploy as a serverDeploy as a server
UsersSingle userMultiple usersMultiple users
What you configureA shell commandA URL to an SSE endpointA URL to an HTTP endpoint
AuthenticationManual, via envOAuthOAuth
envFile supportYesNo; use config interpolationNo; use config interpolation

Transport table, config shapes and redirect URLs transcribed from the Cursor MCP documentation at cursor.com/docs/mcp, read 2026-09-02.

What Cursor supports beyond tool calls

Cursor supports more of the protocol than tool calls. The docs list prompts, resources, roots and elicitation, the MCP Apps extension for tools that return interactive UI, and images returned as context. Around that sit marketplace installs, a split between team distribution and enterprise allowlists, and per-server network modes for local command-based servers.

The full protocol surface, not only tools

Cursor lists tools, prompts, resources, roots and elicitation as supported. Roots let a server ask about URI or filesystem boundaries; elicitation lets a server ask the user for more information mid-call. A server that uses those is not limited to a single-shot function call.

MCP Apps: tools that return UI

Cursor supports the MCP Apps extension, so a tool can return an interactive view alongside its normal output. It follows progressive enhancement — a host that cannot render app UI still gets the same tool working through ordinary MCP responses.

Images as context

A server can return screenshots or diagrams as base64-encoded strings with an image content type. Cursor attaches them to the chat, and if the model supports images it analyses them.

One-click install from the marketplace

The Cursor Marketplace carries official plugins with one-click install from Customize, and cursor.directory collects community plugins and servers. Add to Cursor installs the entry and runs the OAuth flow.

Enterprise allowlists are separate from distribution

The docs draw a line most teams blur. Team admins distribute shared servers under Dashboard, Integrations and MCP. Enterprise admins separately set policy in Team Settings, MCP Configuration: command entries approve local stdio servers by command pattern, URL entries approve remote ones by URL pattern, and per-server tool allowlists restrict which tools run automatically. Allowlisting approves a configuration; it does not install anything.

Per-server network modes

Local command-based servers each carry a network mode: allow all, allowlist only, deny all outbound, or no sandbox. Remote MCP URLs are restricted to the configured URL entry pattern, and a User MCP Network Denylist can block destinations for servers users add themselves.

What is Cursor MCP?

Cursor MCP is Cursor’s client-side support for the Model Context Protocol. Cursor is the host: it loads servers from mcp.json or the Cursor Marketplace and lets the agent call their tools, prompts and resources while you work.

Cursor connects over stdio for local commands, and over SSE or Streamable HTTP for servers you deploy. Beyond tools it supports roots, elicitation and the MCP Apps extension, so a server can ask follow-up questions or return interactive UI.

How to connect Cursor MCP

  1. Choose project or global config

    .cursor/mcp.json for one project, ~/.cursor/mcp.json for all of them, or one-click install from the Marketplace.

  2. Add the entry for the right transport

    A command for stdio, a URL for SSE or Streamable HTTP, plus static OAuth details if the provider requires them.

  3. Enable the server and watch approvals

    Toggle it on in Customize and check which tool calls Cursor asks you to approve.

See the full Cursor MCP setup

Cursor MCP use cases

Let the Cursor agent read your repository host

Add a remote server such as GitHub MCP to .cursor/mcp.json so the agent can read issues and pull requests before it edits code. See the GitHub MCP guide.

Drive a real browser from the editor

Add Playwright MCP as a local stdio server so the agent can open and inspect pages through accessibility snapshots. See Playwright MCP.

Roll servers out to a team with guardrails

Admins distribute shared servers from the dashboard, while Enterprise allowlists approve commands and URLs separately and restrict which tools run automatically.

Cursor MCP questions

These answers cover the practical questions that come up after the first server works: where mcp.json lives, how to disable a server temporarily, where Cursor writes MCP logs, how to update an npm-based server, how to keep API keys out of a committed config, and whether Cursor asks before it runs an MCP tool.

Where does Cursor's mcp.json go?

Two places. .cursor/mcp.json in the project root configures servers for that project only. ~/.cursor/mcp.json in your home directory configures servers available in every project. Both use the same mcpServers object, so a config can be moved between them unchanged.

How do I temporarily disable an MCP server in Cursor?

Open Customize in the sidebar, find the server and use the toggle. Disabled servers do not load and do not appear in chat, which the docs suggest as a way to troubleshoot or to cut down tool clutter. You do not have to remove the entry from mcp.json.

Where are Cursor's MCP logs?

Open the Output panel with Cmd+Shift+U and select MCP Logs from the dropdown. The logs cover server initialisation, tool calls and error messages, which is where connection errors, authentication failures and crashes show up. If a server does crash, Cursor marks the tool call failed and isolates it, so other servers keep working.

How do I update an npm-based MCP server in Cursor?

The documented sequence is to remove the server from Customize, clear the npm cache with npm cache clean --force, then re-add it so the latest version is fetched. For a custom server you wrote, update the local files and restart Cursor.

Can I keep API keys out of a committed mcp.json?

Yes, using config interpolation. Cursor resolves variables in command, args, env, url and headers, so "Authorization": "Bearer ${env:MY_SERVICE_TOKEN}" reads from the environment instead of storing the token. The same works for static OAuth credentials via ${env:MCP_CLIENT_ID}. Note that envFile is stdio-only — remote servers have to use interpolation with variables set in your shell profile or system environment.

Does Cursor ask before running an MCP tool?

By default, yes: Cursor prompts for approval and you can expand the arrow next to the tool name to inspect the arguments. Beyond that, MCP follows the same Run Modes as terminal commands — in Auto-review, allowlisted tools run immediately and everything else is routed through the classifier. Enterprise tool allowlists narrow this further per server.

The editor is one host among several

The same servers you wire into Cursor have to run somewhere unattended eventually: on a schedule, on a webhook, with no one to approve each tool call. Moving from an editor session to a job that runs on its own means deciding triggers, retries and which steps still need a human to review them.