Code Pipelines logo mark CODE_PIPELINES

Advertising disclosure: We earn commissions when you shop through the links below.

Best MCP servers for Cursor and Claude Code 2026

2026-03-02 · Updated 2026-03-09 · Code Pipelines

MCP (Model Context Protocol) is what turns Cursor and Claude Code from code editors into agents that understand your full stack. Without MCP, your AI assistant only sees the files you show it. With the right MCP servers, it can query your live database schema, read open GitHub issues, search your internal docs, and call your APIs - all without you copy-pasting context manually. This guide covers the best MCP servers for Cursor and Claude Code in 2026, how each one works, and how to configure them.

What MCP actually does

MCP is an open protocol created by Anthropic and now supported by Cursor, Claude Code, and a growing ecosystem of tools. It defines a standard way for AI models to call external "servers" - each server exposes a set of tools the model can invoke. When you ask Cursor "what columns does the users table have?", without MCP it guesses. With a Postgres MCP server configured, it queries your live database and gives you the real answer.

The practical impact: fewer hallucinated schemas, fewer wrong API calls, fewer context-switching interruptions. You stay in your editor and the agent has the context it needs.

Quick reference: top MCP servers

Server What it gives your agent Best for
Postgres / SQLite Live DB schema, safe read queries Any app with a database
GitHub Issues, PRs, repo content, Actions GitHub-hosted projects
Filesystem Directory listing, file read/search Large monorepos, unfamiliar codebases
Fetch / web Live web content, API responses Referencing docs, checking APIs
Brave Search Real-time web search results Up-to-date library docs, error lookup
Linear Issues, projects, team context Teams using Linear for project management
Slack Channel messages, thread context Pulling in relevant discussion context
Memory / Knowledge Graph Persistent structured memory across sessions Long-running projects, onboarding new devs

The servers worth setting up first

1. Postgres MCP server

If your app has a database, this is the single highest-value MCP server to configure. The official @modelcontextprotocol/server-postgres package exposes your live schema and lets the agent run read-only queries. The impact is immediate: ask "write a query to find all users who signed up in the last 7 days" and the agent queries the actual schema rather than guessing column names.

npx -y @modelcontextprotocol/server-postgres postgresql://user:pass@localhost/mydb

Configure the connection string via an environment variable - never hardcode credentials. In Cursor, add it under Settings → MCP. In Claude Code, add it to your ~/.claude.json MCP config.

2. GitHub MCP server

The official GitHub MCP server gives your agent access to issues, pull requests, repo contents, and Actions run results. This is particularly useful for: writing code that references open issues by number, generating PR descriptions from diff context, and debugging CI failures by pulling the actual log output.

npx -y @modelcontextprotocol/server-github

Requires a GitHub personal access token with repo scope set as the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.

3. Filesystem MCP server

The filesystem server gives the agent directory listing, file reading, and search capabilities beyond what is already in the editor. This is most useful in Claude Code CLI sessions where you want the agent to navigate a large monorepo autonomously - it can find relevant files without you specifying exact paths.

npx -y @modelcontextprotocol/server-filesystem /path/to/your/project

Scope the allowed paths carefully - only give access to directories the agent should be able to read.

4. Fetch / web MCP server

The fetch server lets the agent retrieve live web content: documentation pages, API specs, error lookup results. Useful when you are building against a third-party API and want the agent to reference the live docs rather than its training data cutoff. Also helpful for fetching your own deployed app's responses during debugging.

npx -y @modelcontextprotocol/server-fetch

5. Brave Search MCP server

Brave Search's MCP server gives the agent real-time web search results. The key use case: looking up error messages for libraries that changed after the model's training cutoff, finding the latest version of a package, or checking if a known bug has been fixed upstream. Requires a Brave Search API key (free tier available).

npx -y @modelcontextprotocol/server-brave-search

6. Linear MCP server

If your team uses Linear for project management, the Linear MCP server gives your agent access to issues, projects, and cycles. Practical use: "implement the changes described in issue LIN-482" - the agent reads the issue, understands the requirements, and builds accordingly. This eliminates the copy-paste step of putting ticket context into your prompt.

7. Memory / Knowledge Graph server

The memory server gives the agent persistent structured memory across sessions. Without it, every new Cursor or Claude Code session starts cold - the agent has no memory of decisions made in previous sessions. With the memory server, it can recall architecture decisions, naming conventions you have settled on, and context about ongoing work. Particularly valuable for long-running projects where consistent context matters.

How to configure MCP in Cursor

In Cursor, open Settings and navigate to the MCP section. Each server is defined as a JSON entry with a command (the executable) and optional args and env. Example for the Postgres server:

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

Restart Cursor after adding a server. You will see a green indicator in the MCP settings panel when the server is running and the agent can access it.

How to configure MCP in Claude Code

Claude Code reads MCP configuration from ~/.claude.json (global) or a .claude.json file in your project root (project-scoped). The format is the same JSON structure as Cursor. Project-scoped config is preferable - it keeps server definitions next to the codebase they are relevant to and makes the setup reproducible for the whole team.

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

Security: what to watch

Start with one, expand from there

The most common mistake is trying to configure five MCP servers at once. Start with the one that addresses your biggest current pain point - usually the database server for backend developers or the GitHub server for teams tracking work in issues. Get it working, verify the agent is using it correctly in real sessions, then add the next one. Two well-configured servers are more useful than six poorly-configured ones.

For the spec and task layer that connects your MCP-enhanced agent sessions, BrainGrid integrates with Cursor and Claude Code - giving you structured task context that persists alongside your MCP integrations.

MCP gives your agent context. BrainGrid gives it a plan. Use BrainGrid to write structured specs before each agent session - so your MCP-enhanced Cursor or Claude Code session knows exactly what to build.

Try BrainGrid →