dotsagent.io
Language:English
Anysphere

Add MCP servers to Cursor

Cursor reads mcp.json from .cursor/ in your project, or from ~/.cursor/ for all projects.

macOS
~/.cursor/mcp.json
Windows
~/.cursor/mcp.json
Linux
~/.cursor/mcp.json
Project file
.cursor/mcp.json
Top-level key
mcpServers
Format
json
OAuth for remote servers
Yes

Example config

This example adds GitHub's hosted server and Playwright as a local server, in the shape this client expects.

.cursor/mcp.json
{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/"
    },
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

Notes and quirks

  • Values can use ${env:NAME}, ${userHome} and ${workspaceFolder}.
  • Remote entries take a url, optional headers, and an auth block with CLIENT_ID, CLIENT_SECRET and scopes for pre-registered OAuth apps.
  • If a provider needs fixed redirect URLs, register https://www.cursor.com/agents/mcp/oauth/callback and http://localhost:8787/callback.
  • No command-line add command is documented.

Build a Cursor config →

Other clients

Sources

  1. cursor.com/docs/context/mcp

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026