You want Cursor's agent to check the database schema before it writes a migration, or to read the design file before it builds the component. Out of the box it can only see your code. An MCP server gives it a way to reach the rest, and in Cursor that's one small JSON file.
Pick where the file goes
Cursor reads servers from mcp.json. Where you put it decides where the servers work:
One project
.cursor/mcp.jsoninside the project.- Commit it so your team gets the same servers (leave keys out).
Every project
~/.cursor/mcp.jsonin your home folder.- Good for servers you want everywhere, like documentation lookup.
Both files have the same shape: an mcpServers object with one entry per server.
A remote server
A hosted server needs only its url. Add headers if it takes an API key:
{
"mcpServers": {
"server-name": {
"url": "https://mcp.example.com/mcp",
"headers": {
"API_KEY": "value"
}
}
}
}Cursor supports Streamable HTTP and SSE. If a server uses OAuth and you don't have credentials to paste, Cursor registers itself with the server and opens a sign-in page in your browser.
Here's the entry for Context7, a hosted server for library documentation. The button opens Cursor, which asks you to confirm:
Context7 in Cursor. Add to ~/.cursor/mcp.json:
Install in Cursor{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}Built from the server's registry entry, the same config as on its listing page.
A local server
A local server needs the command that starts it and its args. Keys go in env:
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "mcp-server"],
"env": {
"API_KEY": "value"
}
}
}
}The command must be on your system path, or written as a full path. Here's Microsoft's Playwright server, which lets the agent open and test pages in a browser:
Playwright MCP in Cursor. Add to ~/.cursor/mcp.json:
Install in Cursor{
"mcpServers": {
"playwright-mcp": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp"
]
}
}
}Built from the server's registry entry, the same config as on its listing page.
Already have an mcp.json? Add the new entry inside the existing mcpServers object.
Check that it worked
As of 19 November 2026, Cursor's docs say you switch servers on and off from Customize in the sidebar. The agent uses a server's tools when they fit the task; they're listed under Available Tools, and you can also ask for one by name.
If a server doesn't start, open the Output panel (Cmd+Shift+U on macOS) and choose MCP Logs.
Servers worth a look
MCP servers for developer tools from the directory, most popular first.
More for developer tools
Official MCP server connecting AI assistants to GitHub repos, issues and workflows
- Remote
- Open source
- 34.6K GitHub stars
- Developer tools

Python framework for building MCP servers, clients and interactive apps
Not checked yet- Open source
- 28.7K GitHub stars
- Developer tools

Local MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.8K GitHub stars
- Knowledge and memory

Local search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

CLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 468K GitHub stars
- Developer tools
In short
- Project servers:
.cursor/mcp.json. Everywhere:~/.cursor/mcp.json. - Remote:
url(+headers). Local:command,args,env. - Turn servers on and off under Customize; read MCP Logs when something fails.
What to try next
Share this lesson- Using VS Code as well? Its file is similar but not the same: see VS Code.
- Look up the difference between local and remote servers before you pick one for your team.