Setup GuideUpdated January 2026

Cursor MCP Setup Guide

Complete step-by-step guide to install and configure MCP servers in Cursor IDE. Get your AI assistant connected to GitHub, databases, and more in under 15 minutes.

Prerequisites

Cursor IDE

Version 0.40 or higher required

Download Cursor

Node.js

Version 18+ for npm-based servers

Download Node.js

Quick Start (5 Minutes)

1

Open Configuration File

Create or edit the MCP configuration file. You can use global config or project-specific:

# Global config (all projects)
~/.cursor/mcp.json
# Project-specific config
your-project/.cursor/mcp.json
2

Add Server Configuration

Add the following JSON structure. Here's an example with the Filesystem MCP server:

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

Restart Cursor Completely

Close Cursor completely (not just the window) and reopen it. On macOS, use Cmd+Q. On Windows, check the system tray.

4

Test Your Server

In the Cursor chat, type @ to see available tools. Your MCP server should appear in the list.

Example Configurations

Starter Stack (Filesystem + Git + GitHub)

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
    },
    "git": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-git"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Database Stack (PostgreSQL + Supabase)

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost:5432/db"
      }
    },
    "supabase": {
      "command": "npx",
      "args": ["-y", "@supabase/mcp-server"],
      "env": {
        "SUPABASE_URL": "https://your-project.supabase.co",
        "SUPABASE_SERVICE_ROLE_KEY": "your_key_here"
      }
    }
  }
}

AI/RAG Stack (Exa + Context7)

{
  "mcpServers": {
    "exa": {
      "command": "npx",
      "args": ["-y", "exa-mcp-server"],
      "env": {
        "EXA_API_KEY": "your_exa_key_here"
      }
    },
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    }
  }
}

Security Best Practices

  • Use scoped tokens: Create tokens with minimal permissions (e.g., read-only for repos you don't need to write to)
  • Limit filesystem access: Only grant access to your project folder, not your entire home directory
  • Pin versions: Use specific versions instead of latest to avoid unexpected changes
  • Keep an inventory: Document which MCP servers are installed and what permissions they have
  • Use environment variables: Never hardcode secrets in your config files

Troubleshooting

Server not appearing in @ menu

  • • Ensure Cursor is fully restarted (check system tray on Windows)
  • • Verify your JSON syntax is valid (use a JSON validator)
  • • Check that Node.js is in your PATH
  • • Look for errors in Cursor's Developer Tools (Help → Toggle Developer Tools)

Authentication errors

  • • Verify your API keys/tokens are correct and not expired
  • • Check that environment variables are properly set in the config
  • • For OAuth servers (GitHub, Notion), ensure the token has required scopes

Server crashes or timeouts

  • • Try running the server command manually in terminal to see errors
  • • Check if you have the correct Node.js version (18+)
  • • Ensure network access for servers that connect to external APIs

Ready to Get Started?

Browse our curated collection of the 30 best MCP servers for Cursor, with setup instructions and use-case recommendations.

Browse Best MCP Servers