DataMCPDataMCP
|Tutorial

Top Cursor MCP Servers: Complete Setup Guide

How to set up MCP servers in Cursor: config file location, format, stdio vs HTTP, the 40-tool limit, and which servers are actually worth installing. Configs included.

Andrei
Founder of DataMCP

How MCP works in Cursor

Cursor added native MCP support in late 2025. In January 2026 they shipped dynamic context management across MCP servers, which cuts token usage by about 47% when using multiple servers.

MCP servers show up in Cursor's tool panel. When you ask Cursor to do something that requires external context (your database schema, a GitHub issue, a Figma design), it calls the appropriate MCP tool automatically. You don't need to tell it to "use MCP" or invoke tools manually.

The config file

Cursor reads MCP configuration from two places:

Project-level: .cursor/mcp.json in your project root. Servers here only apply when this project is open. Use this for project-specific connections like databases.

Global: ~/.cursor/mcp.json. Servers here are available in every project. Use this for tools you want everywhere, like GitHub or web search.

If the same server name appears in both files, project-level wins.

File format

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "package-name", "--flag", "value"],
      "env": {
        "API_KEY": "your-key"
      }
    }
  }
}

That's a stdio server. Cursor launches the process and communicates through stdin/stdout.

For HTTP servers (remote, managed):

{
  "mcpServers": {
    "server-name": {
      "url": "https://your-endpoint.com/mcp",
      "headers": {
        "Authorization": "Bearer your-key"
      }
    }
  }
}

HTTP servers don't launch a process. Cursor connects over the network. This is how managed services and team-shared servers work.

Config path by OS

| OS | Project | Global | |---|---|---| | macOS | .cursor/mcp.json | ~/.cursor/mcp.json | | Windows | .cursor\mcp.json | %USERPROFILE%\.cursor\mcp.json | | Linux | .cursor/mcp.json | ~/.cursor/mcp.json |

After editing the config, restart Cursor. It reads the file on startup.

The 40-tool limit

Cursor caps active tools at roughly 40 across all MCP servers combined. Each server registers multiple tools. A database server might register 6, GitHub registers 10+, Figma registers several.

If you exceed 40, Cursor shows a warning and silently drops some tools. The AI loses access to them without telling you.

This means you can't install 10 MCP servers and hope for the best. Pick the 3-5 that actually matter for your daily work.

The servers worth installing

Here's a practical setup for different developer profiles. Every config below goes into your ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).

For every developer: GitHub

Eliminates the most context-switching. Search code, read files, create issues, open PRs, manage branches.

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

For backend/fullstack: PostgreSQL

If you write SQL or work with a database daily, this is your highest-impact server. Your AI writes correct queries because it sees your actual schema.

Option A: DataMCP (managed, team-friendly, has permissions)

{
  "mcpServers": {
    "app-db": {
      "url": "https://api.datamcp.app/api/mcp/YOUR_CONNECTION_ID",
      "headers": { "Authorization": "Bearer sk_live_YOUR_KEY" }
    }
  }
}

No connection string on your machine. Scoped permissions. Query logging. Set up at datamcp.app

Option B: CrystalDBA (local, free, includes perf analysis)

{
  "mcpServers": {
    "pg": {
      "command": "npx",
      "args": ["-y", "@crystaldba/postgres-mcp", "postgresql://user:pass@localhost:5432/mydb"]
    }
  }
}

Good for local dev databases. Adds index tuning and health checks on top of query execution.

For frontend: Figma

If you build UI from Figma designs, this changes how you work. Cursor generates components from actual design data (padding, colors, layout) instead of guessing from a screenshot.

{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["-y", "@figma/mcp-server"],
      "env": { "FIGMA_ACCESS_TOKEN": "your_token" }
    }
  }
}

For docs and current information: Context7

Fetches live, up-to-date framework documentation. Prevents the AI from hallucinating APIs that changed since its training data.

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

For project management: Linear

If your team tracks work in Linear, your AI can reference ticket details when implementing features. "Build what's described in ENG-427" works when the AI can read the ticket.

{
  "mcpServers": {
    "linear": {
      "command": "npx",
      "args": ["-y", "@linear/mcp-server"],
      "env": { "LINEAR_API_KEY": "lin_api_your_key" }
    }
  }
}

Recommended setups by role

Backend developer:

  1. GitHub (code + PRs)
  2. DataMCP or CrystalDBA (database)
  3. Linear or Notion (project context)

Frontend developer:

  1. GitHub (code + PRs)
  2. Figma (design data)
  3. Context7 (framework docs)

Fullstack developer:

  1. GitHub (code + PRs)
  2. DataMCP or CrystalDBA (database)
  3. Figma (design data)

Three servers, under the 40-tool limit, covering the areas where context-switching costs you the most time.

Common issues

Server not showing up after restart: Check the JSON syntax. A trailing comma or missing bracket will silently fail. Cursor's MCP panel (in settings) shows connection status for each server.

"Too many tools" warning: Remove servers you don't use weekly. Every idle server still consumes tool slots.

Slow responses with multiple servers: Cursor fetches tool descriptions from all servers on each message. If one server is slow to respond, it blocks everything. Consider using HTTP servers (faster connection) over stdio (process startup overhead).

Auth errors with HTTP servers: Make sure the headers object has the correct key. Common mistake: "Authorization": "sk_live_..." instead of "Authorization": "Bearer sk_live_...".

What's next

Cursor's MCP support is evolving. The January 2026 dynamic context update was significant. Expect further improvements to tool discovery, context management, and possibly a built-in server marketplace.

For now, the best approach is intentional: install only what you use, keep it under 40 tools, and put project-specific servers (like database connections) in project-level config so they don't pollute your global setup.

CursorMCPAI codingPostgreSQL

Ready to connect AI to your database?

Set up DataMCP in 60 seconds. No credit card required.

Get Started Free

Questions? Read the docs or view pricing.