Claude FastClaude Fast
MCP & Extensions

Cursor MCP Servers: Complete Setup Guide for 2026

Set up MCP servers in Cursor IDE. Step-by-step guide to configure Cursor MCP servers for AI-powered development with Model Context Protocol.

Problem: You want to extend Cursor with external tools and data sources, but the MCP configuration process feels unclear. Where do the files go? What format do they use? How does it compare to Claude Code?

Quick Win: Create a .cursor/mcp.json file in your project root and add your first MCP server:

{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": { "BRAVE_API_KEY": "your-api-key" }
    }
  }
}

Restart Cursor, and you now have web search capabilities inside the IDE.

What Are Cursor MCP Servers?

Cursor MCP servers connect Cursor's AI to external tools, databases, and APIs through the Model Context Protocol. They work identically to MCP servers in Claude Code and Claude Desktop since they all use the same underlying protocol.

With MCP servers configured, Cursor can:

  • Search the web and fetch documentation
  • Query databases with natural language
  • Interact with GitHub, Slack, and other services
  • Automate browser tasks for testing
  • Access any service with an MCP server implementation

The MCP ecosystem is shared across all compatible tools. Any MCP server that works with Claude Desktop also works with Cursor.

Setting Up MCP Servers in Cursor

Configuration File Locations

Cursor supports two configuration locations:

LocationPathScope
Project-level.cursor/mcp.jsonOnly this project
Global~/.cursor/mcp.jsonAll Cursor workspaces

Use project-level configs for project-specific tools (like a database server for your app). Use global configs for tools you want everywhere (like web search or GitHub).

Step-by-Step Setup

Method 1: Manual Configuration

  1. Create the config file at .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
  2. Add your MCP server configuration
  3. Restart Cursor to load the new servers
  4. Test by asking the AI to use a tool from your server

Method 2: Command Palette

  1. Open Command Palette (Cmd+Shift+P on Mac, Ctrl+Shift+P on Windows)
  2. Search for "MCP" and select "View: Open MCP Settings"
  3. Click "New MCP Server" under MCP Tools
  4. Cursor creates and opens the mcp.json file for editing

Configuration Format

Cursor MCP servers use the same JSON format as Claude Desktop:

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-name"],
      "env": {
        "API_KEY": "your-key-here"
      }
    }
  }
}

For Python-based MCP servers:

{
  "mcpServers": {
    "python-server": {
      "command": "python",
      "args": ["path/to/server.py"],
      "env": {
        "DATABASE_URL": "postgresql://localhost/mydb"
      }
    }
  }
}

Remote Server Configuration

Cursor also supports remote MCP servers via HTTP:

{
  "mcpServers": {
    "remote-server": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "Authorization": "Bearer your-token"
      }
    }
  }
}

This enables connecting to MCP servers running on remote machines or as shared services.

Best MCP Servers for Cursor

These Cursor MCP servers provide the highest-impact capabilities. All configurations work directly in your .cursor/mcp.json:

Web Search and Research

{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": { "BRAVE_API_KEY": "your-key" }
    }
  }
}

Enables web search directly in Cursor for documentation lookup and research.

GitHub Integration

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "your-token" }
    }
  }
}

Access repositories, create issues, manage PRs, and review code without leaving Cursor.

Database Access

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": { "DATABASE_URL": "postgresql://user:pass@localhost/db" }
    }
  }
}

Query databases with natural language and get schema information for development.

Browser Automation

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@executeautomation/playwright-mcp-server"]
    }
  }
}

Automate browser testing, scraping, and visual verification. See our browser automation guide for advanced patterns.

File Operations

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/allowed/directory"
      ]
    }
  }
}

Enhanced file operations for reading and modifying files outside Cursor's default scope.

Memory and Knowledge

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Persistent memory across sessions using a knowledge graph structure.

Browse our complete MCP servers list for 50+ additional options.

Cursor vs Claude Code MCP

Cursor and Claude Code both use the same Model Context Protocol, making server configurations largely interchangeable. Key differences:

FeatureCursorClaude Code
Config location.cursor/mcp.json~/.claude.json or .mcp.json
Transport typesstdio, SSE, HTTPstdio
OAuth supportBuilt-inManual
Tool searchNot availableAvailable
ResourcesNot yet supportedSupported

Claude Code's MCP Tool Search provides lazy loading that reduces context usage by 95%. Cursor loads all configured MCP tools at session start.

Both support the same server packages. A server configured for Claude Desktop works in Cursor and vice versa.

Troubleshooting Cursor MCP Servers

Server Not Loading

Symptom: MCP server doesn't appear in available tools.

Fix:

  1. Verify the JSON syntax is valid (no trailing commas)
  2. Restart Cursor completely (not just reload window)
  3. Check the Output panel for MCP-related errors

Authentication Failed

Symptom: Server loads but API calls fail.

Fix: Verify environment variables are set correctly:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
      }
    }
  }
}

Use ${env:VAR_NAME} to reference system environment variables instead of hardcoding secrets.

npx Command Not Found

Symptom: Server fails with "command not found" error.

Fix: Ensure Node.js is installed and npx is in your PATH. On some systems, use the full path:

{
  "mcpServers": {
    "server-name": {
      "command": "/usr/local/bin/npx",
      "args": ["-y", "@modelcontextprotocol/server-name"]
    }
  }
}

Remote Server Connection Issues

Symptom: HTTP-based MCP server fails to connect.

Fix:

  1. Verify the server is running and accessible
  2. Check firewall rules allow the connection
  3. Ensure the URL includes the correct protocol (http/https)

Next Steps

Expand your Cursor MCP setup:

  1. Start simple: Configure Brave Search for immediate web access
  2. Add development tools: GitHub and database servers accelerate coding workflows
  3. Explore automation: Set up browser automation for testing
  4. Build custom servers: Create MCP servers for your specific APIs and tools
  5. Browse all options: Check the complete MCP servers list

Cursor MCP servers transform the IDE from an isolated editor into a connected development environment. Start with one server, prove the value, then expand as your workflow demands.

Sources:

Last updated on