Setup guide

How to add an MCP server to Cursor

Cursor reads `mcp.json` from your project's `.cursor` folder or your home directory, speaks both local (stdio) and remote (HTTP/SSE) servers, and supports one-click install links.

Where the config lives

  • Project: .cursor/mcp.json
  • Global: ~/.cursor/mcp.json

Servers go under the mcpServers key.

What Cursor can run

  • Local servers (stdio)
  • Remote servers (HTTP)
  • Remote servers (SSE)

504 of the 508 servers in the catalog run natively in Cursor.

Step by step

  1. Create `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for every project).
  2. Add each server under `mcpServers`: `command`/`args` for local servers, `url` for remote ones.
  3. Open Cursor Settings → MCP and toggle the server on.

Reloading: Cursor detects changes to mcp.json; toggle the server off and on in Settings → MCP if it doesn't.

Example: the Filesystem server in Cursor

The official reference server for file access. Replace the directory with the folder you want the assistant to see.

Create / edit .cursor/mcp.json in your project

json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/allowed/directory"
      ]
    }
  }
}

Troubleshooting

`npx` is not found, or the server exits immediately on Windows
Windows launches `npx` through cmd. Use `"command": "cmd"` with `"args": ["/c", "npx", "-y", "<package>"]`, and make sure Node.js 18+ is on the PATH of the user the client runs as.
`SyntaxError` or `Unsupported engine` when the server starts
Most MCP servers need Node.js 18 or newer (`node -v`). If you use nvm, the client may not see your shell's Node: point `command` at the absolute path of `npx`.
The server shows a red dot in Settings → MCP
Click it to see the error output. Most often the package name is wrong or a required argument (such as an allowed directory) is missing.
The server starts but every tool call fails with 401 or 403
Its API key is missing or wrong. Put it in the server's `env` block (or the header for remote servers) — never in a file you commit.

Official documentation: Cursor MCP docs

Setting up several servers at once?

Tick them in the catalog and the setup builder merges them into one Cursor config.

Open the setup builder for Cursor

Best MCP servers for Cursor

The highest health scores among servers that run natively in Cursor.

See every server that runs in Cursor →