Repository navigation
Where is Cursor's mcp.json, and how do I add an MCP server to Cursor? #3
Unanswered
nemesisLLC
asked this question in
Q&A
Replies: 1 comment
|
Cursor stores MCP configuration in:
Add a server under {
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
}
}
}(Or for remote HTTP/SSE servers, use |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Short answer:
~/.cursor/mcp.jsonfor every project,.cursor/mcp.jsoninside a project for that project only. Create the file if it doesn't exist. On Windows~isC:\Users\<you>.{ "mcpServers": { "playwright": { "command": "npx", "args": ["-y", "@playwright/mcp@latest"] }, "context7": { "url": "https://mcp.context7.com/mcp", "headers": { "CONTEXT7_API_KEY": "${env:CONTEXT7_API_KEY}" } } } }command,argsand optionallyenv.urland optionallyheaders. Cursor works out SSE versus streamable HTTP itself, so the keys are the same for both.${env:NAME}. Cursor also fills in${userHome}and${workspaceFolder}.Check it worked
Restart Cursor (or open a new chat), then find the MCP section in Cursor's settings. It lists each server with the tools it found, and you can switch a server off there without deleting it.
Common mistakes
serverskey (that's the old VS Code format). Cursor wantsmcpServers.Full guide covering Cursor, GitHub Copilot, Gemini CLI and Claude Desktop: https://calyban.com/blog/mcp-servers-cursor-copilot-gemini-claude-desktop
All reactions