Skip to content

How to add MCP servers to Cursor

Cursor reads MCP servers from ~/.cursor/mcp.json (for you) or .cursor/mcp.json (for one project), under the "mcpServers" key. A local server’s entry is a command with args; a remote server’s entry is its URL in "url".
Last checked against Anysphere’s docs

Quick facts

Local servers
Yes (stdio)
Remote servers
Streamable HTTP: Yes · SSE: YesURL field: url
Sign-in
OAuth: Yes · Headers: YesOAuth uses the authorization code flow with PKCE; static client credentials go in an auth object.
Resources
Yes
Prompts
Yes
Tool approval
Yes
Platforms
macOS, Windows and Linux

Step by step

Add a remote server

Example: a hosted server whose latest check on AI-Powered answered, Context7.

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Add a local server

Example: a popular npm package that needs no keys, Chrome DevTools MCP.

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "chrome-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "chrome-devtools-mcp"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Add a server that needs an API key or header

Local servers read keys from environment variables. Replace each <NAME> placeholder with your own value in the file on your computer; never paste real keys into a website.

Example: Context7.

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ],
      "env": {
        "CONTEXT7_API_KEY": "<CONTEXT7_API_KEY>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Request headers for remote servers: yes. OAuth uses the authorization code flow with PKCE; static client credentials go in an auth object.

Add a server that signs in with OAuth

OAuth sign-in: yes. Add the server by its URL as a remote server, then sign in when asked. OAuth uses the authorization code flow with PKCE; static client credentials go in an auth object.

Config file locations

ForSystemPath
You (every project)All systems~/.cursor/mcp.json
One projectAll systems.cursor/mcp.json

Get the config for any server

Search the MCP servers on AI-Powered and copy the Cursor snippet for one.

Adding several servers? Build one config with the MCP config generator.

Servers that work in Cursor

Popular servers with an install config for Cursor and no failing latest check.
  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 476K GitHub stars
    • Developer tools
  2. Browser Use

    MCP server

    Browser agents and cloud browsers for AI, with an MCP server for web tasks

    • 7 tools
    • Remote
    • Freemium
    • 122K GitHub stars
    • Browser automation
  3. MCP server for AI clients to scrape sites with HTTP and stealth browser sessions

    Runs locally
    • 17 tools
    • Open source
    • 105K GitHub stars
    • Web search and scraping
  4. Hosted MCP connector for creating and rendering videos from HTML through AI chat

    • Remote
    • Freemium
    • 89K GitHub stars
    • Design and media
  5. Context7

    MCP server

    Version-specific library docs and code examples piped into coding agents via MCP

    • 2 tools
    • Remote
    • Freemium
    • 65.4K GitHub stars
    • Developer tools
  6. MCP server and CLI that let coding agents drive and inspect a live Chrome browser

    Runs locally
    • Open source
    • 59.1K GitHub stars
    • Browser automation
  7. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 49.1K GitHub stars
    • Knowledge and memory
  8. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    • Remote
    • Open source
    • 34.7K GitHub stars
    • Developer tools
  9. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.7K GitHub stars
    • Developer tools
  10. ffmpeg-skill

    MCP server

    Local FFmpeg video and audio editing tools for coding agents over MCP

    Runs locally
    • Open source
    • 10.3K GitHub stars
    • Design and media
  11. Ha MCP

    MCP server

    MCP server for managing and automating Home Assistant from AI assistants

    Runs locally
    • 8 tools
    • Open source
    • 8.1K GitHub stars
    • Productivity
  12. Open-source analytics app where an AI agent builds charts and dashboards from your data

    • Remote
    • Open source
    • 7.8K GitHub stars
    • Analytics and data

Troubleshooting

A local server won’t start
The command must be on your system PATH or be a full path. Check “MCP Logs” in the Output panel for the error.
Changes to a server don’t show up
After editing a custom server’s files or mcp.json, restart Cursor.
Cloud Agents don’t see your servers
Hosted Cloud Agents don’t read ~/.cursor/mcp.json, so servers there only apply to Cursor on your computer.
Sign-in redirect is rejected by the server
Register http://localhost:8787/callback (desktop) or https://www.cursor.com/agents/mcp/oauth/callback (web and agents) as a redirect URL.
A local server fails with “npx” (or uvx, docker) not found
Apps started from a dock or menu may not see your terminal’s PATH. Use the full path of the command (run which npx in a terminal to find it), then restart Cursor.
You can’t tell whether the server or Cursor is at fault
Test the server on its own with the MCP Inspector (npx @modelcontextprotocol/inspector). If it lists tools there, check the Cursor setup.

Where to find logs

  • Output panel (Cmd+Shift+U on macOS), then choose “MCP Logs”.

Safety notes

  • Cursor asks before running MCP tools by default. Only allowlist tools you trust to run without asking.
  • A project’s .cursor/mcp.json can start programs on your machine. Read it before opening an unknown repository.
  • Use ${env:NAME} for secrets instead of writing tokens into a committed mcp.json.
  • A local server runs on your computer with your access to files and the network. Add only servers whose source you trust.

Questions about MCP in Cursor

Where is Cursor’s mcp.json?

Global servers go in ~/.cursor/mcp.json and apply to every project. Project servers go in .cursor/mcp.json inside the project.

Does Cursor support remote MCP servers?

Yes. Give the server a url (and headers if it needs a token). Cursor supports Streamable HTTP and SSE, plus OAuth sign-in.

Can I install a server with one click?

Yes. A cursor:// install link carries the server config, and Cursor shows it before installing. We only offer the link when the server has no values to fill in.

Which MCP features does Cursor support?

Tools, prompts, resources, roots, elicitation and MCP Apps.

Can I use local MCP servers in Cursor?

Yes. Cursor starts a local server as a command on your computer (stdio).

Can Cursor sign in to MCP servers with OAuth?

Yes. OAuth uses the authorization code flow with PKCE; static client credentials go in an auth object.

Other MCP clients