How to add an MCP server to Cursor
In Cursor, open Settings, MCP and add a new server, or paste it into ~/.cursor/mcp.json (every project) or .cursor/mcp.json (this project). Many server pages on this site also have an "Add to Cursor" button that fills it in for you.
One click
Open the server's page here and click Add to Cursor. Cursor opens with the server ready to save. Add any API keys it asks for.
By hand
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["-y", "package-name"],
"env": { "API_KEY": "your-key" }
}
}
}
Remote servers use a URL instead of a command:
{ "mcpServers": { "my-server": { "url": "https://example.com/mcp" } } }
Turn it on and use it
In Settings, MCP, the server should show a green dot. Its tools are used in Agent mode. A red dot means it failed to start: see fix a red dot in Cursor.
Questions
Global or project mcp.json?
Use ~/.cursor/mcp.json for servers you want everywhere, and .cursor/mcp.json for servers tied to one repo. Keep real keys out of files you commit.
Does Cursor use MCP in normal chat?
MCP tools are used by the agent. Switch to Agent mode if the tools do not appear.