---
title: "Cursor MCP Setup: Add a Server with mcp.json"
url: "https://mcpshelf.co/guides/cursor"
description: "Add MCP servers to Cursor with mcp.json: global vs project files, local and remote examples, env variables for keys, MCP logs, and fixes for missing tools."
updated: "2026-11-01"
site: "MCP Shelf"
---

# 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. **Pick a server.** Find one on the [shelf](https://mcpshelf.co/servers) and open its page.
2. **Open mcp.json.** From Customize, or open `~/.cursor/mcp.json` yourself.
3. **Paste and save.** Add it inside `"mcpServers"`.
4. **Switch it on.** Check it lists tools, then ask the agent.

## Pick the file

| File | Applies to |
| --- | --- |
| ~/.cursor/mcp.json | Every 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](https://mcpshelf.co/guides/cursor-mcp-json-location) has the exact paths on each system.

## Add a server

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. Add a custom server there, or open ~/.cursor/mcp.json (or .cursor/mcp.json in the project) yourself.
3. Paste the server inside "mcpServers" and save.
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](https://mcpshelf.co/guides/mcp-server-errors).

## Popular servers to try in Cursor

| Server | What it gives your assistant | You need |
| --- | --- | --- |
| [Sequential Thinking](https://mcpshelf.co/servers/sequential-thinking) | A numbered scratchpad the model fills in, revises and branches while it works. | Node.js 24 or newer (the package asks for it) |
| [Context7](https://mcpshelf.co/servers/context7) | Pulls current, version-specific library docs into the conversation. | Node.js 22.13 or newer for the ctx7 setup command, or Node.js 18 or newer for the local server alone |
| [Playwright MCP](https://mcpshelf.co/servers/playwright) | Microsoft's browser automation server: navigate, click, type, read. | Node.js 18 or newer |
| [GitHub](https://mcpshelf.co/servers/github) | GitHub's own server for repos, issues, pull requests and Actions. | A GitHub account |
| [Blender MCP](https://mcpshelf.co/servers/blender) | Prompt-driven modelling in a running copy of Blender. | Blender 3.0 or newer |
| [Serena](https://mcpshelf.co/servers/serena) | IDE-style "find symbol" and "edit symbol" for an agent, backed by language servers. | uv, which installs Serena and the Python 3.13 it runs on |
| [MCP Toolbox for Databases](https://mcpshelf.co/servers/mcp-toolbox-for-databases) | Google's toolbox for Postgres, MySQL, BigQuery, Spanner and other databases. | Node.js 18 or newer |
| [Framelink Figma MCP](https://mcpshelf.co/servers/framelink-figma) | Feeds Figma layout and styling to coding agents so the UI matches the design. | A Figma personal access token |

## 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.

---

From [MCP Shelf](https://mcpshelf.co/): A short shelf of MCP servers that are worth installing. Index for agents: https://mcpshelf.co/llms.txt

