Cursor MCP Servers
Configure MCP servers inside Cursor IDE. Where the config files go, the JSON format Cursor accepts, and the handful of servers worth adding first.
Problem: Cursor can plug into external tools and data, but the MCP story feels hazy until you do it once. Which file? Which format? Is it the same as Claude Code?
Quick Win: Create .cursor/mcp.json at the root of your project and paste in a first server:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": { "BRAVE_API_KEY": "your-api-key" }
}
}
}Restart Cursor. Web search now lives inside the IDE.
What Cursor MCP Servers Actually Are
Outside tools, databases, and APIs all connect to Cursor's AI through the Model Context Protocol. The behaviour is identical across Cursor, Claude Code, and Claude Desktop because every one of them speaks the same wire format.
Once a server is loaded, Cursor can do the following:
- Pull web content and documentation
- Ask databases questions in plain English
- Drive GitHub, Slack, and anything else with an integration
- Run browser jobs for testing
- Reach any service that exposes an MCP server
The ecosystem is shared. Any MCP server built for Claude Desktop drops into Cursor unchanged.
Setting Up MCP Servers in Cursor
Configuration File Locations
There are two valid spots:
| Location | Path | Scope |
|---|---|---|
| Project-level | .cursor/mcp.json | Only this project |
| Global | ~/.cursor/mcp.json | All Cursor workspaces |
Project configs are the right fit for tools tied to one codebase, such as a database server for the app you are building. Global configs suit tools that belong everywhere, like web search or a GitHub integration.
Step-by-Step Setup
Method 1: Manual Configuration
- Create the config file at
.cursor/mcp.json(project) or~/.cursor/mcp.json(global) - Paste in the server configuration
- Restart Cursor so the new servers get picked up
- Test it by asking the AI to run a tool from the server
Method 2: Command Palette
- Open the Command Palette (Cmd+Shift+P on Mac, Ctrl+Shift+P on Windows)
- Search for "MCP" and pick "View: Open MCP Settings"
- Under MCP Tools, click "New MCP Server"
- Cursor writes the mcp.json file and opens it for editing
Configuration Format
The JSON shape matches what Claude Desktop uses:
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-name"],
"env": {
"API_KEY": "your-key-here"
}
}
}
}A Python-based MCP server looks almost the same:
{
"mcpServers": {
"python-server": {
"command": "python",
"args": ["path/to/server.py"],
"env": {
"DATABASE_URL": "postgresql://localhost/mydb"
}
}
}
}Remote Server Configuration
HTTP-based servers are supported too:
{
"mcpServers": {
"remote-server": {
"url": "http://localhost:3000/mcp",
"headers": {
"Authorization": "Bearer your-token"
}
}
}
}Handy when the server runs on another machine or sits behind a shared service.
Best MCP Servers for Cursor
These pack the most value per line of config. Every one drops straight into .cursor/mcp.json:
Web Search and Research
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": { "BRAVE_API_KEY": "your-key" }
}
}
}Web search inside Cursor for documentation lookups and quick research.
GitHub Integration
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "your-token" }
}
}
}Repos, issues, PRs, and reviews all happen without leaving the editor.
Database Access
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": { "DATABASE_URL": "postgresql://user:pass@localhost/db" }
}
}
}Natural-language queries out, schema and results back, while coding.
Browser Automation
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@executeautomation/playwright-mcp-server"]
}
}
}Covers browser testing, scraping, and visual checks. See the browser automation guide for the deeper patterns.
File Operations
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/directory"
]
}
}
}Reads and writes files outside the directories Cursor already watches.
Memory and Knowledge
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}Maintains a knowledge graph that persists across sessions.
The full MCP server catalog has 50+ more options.
Cursor vs Claude Code MCP
Server configs move between the two tools with almost no friction, since both speak Model Context Protocol. A handful of things still differ:
| Feature | Cursor | Claude Code |
|---|---|---|
| Config location | .cursor/mcp.json | ~/.claude.json or .mcp.json |
| Transport types | stdio, SSE, HTTP | stdio |
| OAuth support | Built-in | Manual |
| Tool search | Not available | Available |
| Resources | Not yet supported | Supported |
MCP Tool Search in Claude Code lazy-loads tools and drops context usage by 95%. Cursor pulls every configured tool in at session start.
Server packages stay the same on either side. A config written for Claude Desktop runs in Cursor, and the reverse holds too.
Troubleshooting Cursor MCP Servers
Server Not Loading
Symptom: The MCP server never shows up among the available tools.
Fix:
- Double-check the JSON (a trailing comma is the usual culprit)
- Quit Cursor completely and relaunch, not just reload the window
- Open the Output panel and look for MCP errors
Authentication Failed
Symptom: The server loads, but API calls come back with auth errors.
Fix: Verify the environment variables are set:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
}
}
}
}The ${env:VAR_NAME} pattern pulls from system environment variables so secrets never end up hardcoded.
npx Command Not Found
Symptom: The server dies with a "command not found" error.
Fix: Confirm Node.js is installed and npx is on your PATH. Some systems need the absolute path:
{
"mcpServers": {
"server-name": {
"command": "/usr/local/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-name"]
}
}
}Remote Server Connection Issues
Symptom: An HTTP-based server refuses to connect.
Fix:
- Confirm the server process is running and reachable
- Check firewall rules around the port
- Make sure the URL carries the right protocol (http vs https)
Next Steps
A short path for growing your Cursor MCP setup:
- Start simple: Wire up Brave Search for instant web access
- Add development tools: GitHub and database servers speed up real work
- Try automation: Spin up browser automation for testing
- Build your own: Ship a custom server for internal APIs
- Browse everything: The complete MCP servers list has the rest
MCP servers turn Cursor from a closed editor into a wired-up development environment. Start with one server. Prove the value. Add more as the workflow calls for it.
Sources:
- Cursor MCP Documentation
- How to Add MCP Server to Cursor
Stop configuring. Start building.
50+ MCP Servers for Claude Code
A curated catalog of MCP servers, editor integrations, usage monitors, orchestrators, and starter kits that plug into Claude Code.
Claude Code Search
Attach a web search MCP server to Claude Code and it can pull live pages, current docs, and fresh benchmarks from inside your terminal.