Skip to content
MCP Shelf

Set up your app

Adding MCP servers to Cursor

By Sophie Filer · Updated 1 Nov 2026

Cursor reads MCP servers from a file called mcp.json, and lists them on its Customize page, where you can switch each one on or off. You can add servers from there or edit the file directly; both end up in the same place.

Config file
~/.cursor/mcp.json
Per project
.cursor/mcp.json
Local servers
Yes
Remote URLs
Yes

At a glance

  1. 1. Pick a server

    Find one on the shelf and open its page.

  2. 2. Open mcp.json

    From Customize, or open ~/.cursor/mcp.json yourself.

  3. 3. Paste and save

    Add it inside "mcpServers".

  4. 4. Switch it on

    Check it lists tools, then ask the agent.

Pick the file

FileApplies to
~/.cursor/mcp.jsonEvery project you open
.cursor/mcp.json (inside a project)Only that project; can be committed for your team

If the file does not exist yet, create it. Where Cursor keeps mcp.json has the exact paths on each system.

Add a server

  1. Step 1: Open Customize in the sidebar and find the MCP servers. In older versions they are in Cursor Settings, under MCP or Tools & Integrations.
  2. Step 2: Add a custom server there, or open ~/.cursor/mcp.json (or .cursor/mcp.json in the project) yourself.
  3. Step 3: Paste the server inside "mcpServers" and save.
  4. Step 4: Check the server shows as switched on with a list of tools, then ask the agent something that needs it.
A local server
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    }
  }
}
A remote server
{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Every server page on MCP Shelf has a Cursor tab with the block to paste. Servers in the Cursor Marketplace also have an "Add to Cursor" button that installs them and starts the sign-in.

Keep keys out of the file

mcp.json is plain text, and the project version often ends up in git. Cursor can read a value from your environment instead of the file:

{
  "mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": { "FIRECRAWL_API_KEY": "${env:FIRECRAWL_API_KEY}" }
    }
  }
}

The same ${env:NAME} syntax works in command, args, url and headers, so a remote server can take "Authorization": "Bearer ${env:MY_TOKEN}". ${workspaceFolder} and ${userHome} fill in paths. Local servers can also load a whole file of keys with "envFile": ".env".

When the tools do not show up

  • Open the Output panel (Cmd/Ctrl + Shift + U) and choose MCP Logs from the dropdown. Start-up errors, sign-in problems and crashes show there.
  • Validate the JSON. One trailing comma stops every server in the file from loading.
  • Run the command yourself in a terminal. If npx or uvx cannot start it there, Cursor cannot either.
  • Check the server is switched on in Customize; Cursor lets you toggle each one.
  • Restart Cursor after big changes. It usually picks up edits, but not always.
  • Too many tools at once can push some out. Turn off servers you are not using.
  • To update an npm-based server, remove it, run npm cache clean --force, and add it again.

The error messages themselves are explained in Fixing MCP server errors.

Questions

Do configs from Claude Desktop work in Cursor?

Yes. Both use the same "mcpServers" shape, so you can copy entries between claude_desktop_config.json and mcp.json.

Can Cursor use remote MCP servers?

Yes. Give the server a "url" instead of a "command". Cursor handles OAuth sign-in for servers that need it.

Does Cursor ask before it runs an MCP tool?

By default, yes: it shows the tool and its arguments and waits. Cursor's run modes can let trusted tools run without asking.

Plant Your First Pea

Every server on the shelf has a tab with the exact config for your app.

Browse servers

For bots & AI agents

Machine-readable versions of this guide and MCP Shelf. Fetch these instead of parsing this page.

This guide (.md)llms.txtllms-full.txtai.txtFull catalog (.md)API specMCP serverMCP manifestDeveloper docs