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.
{
"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.
Other clients
Claude DesktopClaude CodeVS Code (GitHub Copilot)Windsurf / Devin DesktopZedOpenAI Codex CLIGemini CLIChatGPTOpenClawClineContinueJetBrains AI Assistant