How to Add MCP Servers in Cursor (2026)
Cursor keeps MCP servers in an mcp.json file — one global (~/.cursor/mcp.json) and one per project (.cursor/mcp.json) — and manages them from the Customize page. Remote servers connect by URL and can authenticate with OAuth.
1. Open the config file
Project scope: .cursor/mcp.json inside your project. Global scope: ~/.cursor/mcp.json in your home directory. You can also reach server settings from Cursor's Customize page in the sidebar.
2. Declare a local (stdio) server
Servers go under the mcpServers key. command/args start a local process; env passes environment variables; envFile loads them from a file (stdio only).
{
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "~/my.db"]
}
}
}3. Enable and verify
Save the file, then toggle the server on from Cursor's MCP settings. Cursor lists the tools the server exposes; a red/green indicator shows whether it started. Secrets can be interpolated with ${env:VAR_NAME} instead of hardcoding.
Adding a remote MCP server
Remote servers use a url field instead of command/args, with optional headers:
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/"
}
}
}Skip the JSON
The MCPNav config generator builds a ready-to-paste config for Cursor from any servers you pick — including optional version pinning. Or start from our curated shortlists: Best MCP servers for Cursor.