Setup Guide8 min readMay 5, 2026

Best MCPs for Claude Code in 2026 (Ranked + Setup)

Claude Code is Anthropic's coding CLI. MCP servers are first-class — add them with a single command, or check in an .mcp.json so every teammate working in the repo gets the same setup. These are the six MCPs worth installing first.

Why Claude Code + MCPs?

Claude Code already understands the repo it is running in — it can read files, run shells, and make edits. What it cannot do out of the box is touch anything outside the working tree: a remote database, the GitHub API, current library docs, a real browser, or persistent memory across sessions.

MCP servers fill those gaps cleanly. Because Claude Code reads .mcp.json from the repo root, the right MCP stack travels with the code — a new contributor clones, runs `claude`, and immediately has the same Postgres, internal API, and docs access as everyone else. The CLI also exposes a `/mcp` slash command for status, so debugging a misconfigured server takes seconds.

Setup time

15–25 min for all 6 MCPs

Impact

Same MCPs across every contributor on the repo

Cost

All 6 are free or open source

The 6 MCPs every Claude Code user should install

Ordered by impact for terminal-first coding. Each closes a specific gap — install in this order and stop wherever the rest is not relevant to your workflow.

#1

Filesystem

2 min setup

Most AI workflows involve reading or modifying files. This MCP is the standard way to give models that access without exposing the full system.

npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir

Reading and editing local codeGenerating files from AI outputNavigating project structures
Full details and install guide
#2

GitHub

5 min setup

GitHub is where most code lives. This MCP lets agents interact with that code directly, without copy-pasting between interfaces.

npx @github/github-mcp-server

Automated issue creationPR review and managementCode search across repos
Full details and install guide
#3

Context7

3 min setup

Models hallucinate outdated APIs constantly. Context7 eliminates this by grounding every answer in real, current documentation.

npx -y @upstash/context7-mcp

Library API lookupFramework usage patternsVersion-specific code examples
Full details and install guide
#4

PostgreSQL

3 min setup

Database access is one of the most requested AI capabilities. This MCP provides it safely, with schema context that improves query quality.

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

Database schema explorationSQL query generationData analysis
Full details and install guide
#5

Puppeteer

5 min setup

Many modern pages require JavaScript to render. Puppeteer is the only reliable way to interact with SPAs, dashboards, and login-gated pages.

npx -y @modelcontextprotocol/server-puppeteer

Web scraping with JavaScriptForm automationScreenshot capture
Full details and install guide
#6

Memory

2 min setup

AI models are stateless by default. Memory MCP is the simplest way to give an agent long-term knowledge that carries over between sessions.

npx -y @modelcontextprotocol/server-memory

Long-running agent workflowsPersonal AI assistantsProject tracking
Full details and install guide

Commit .mcp.json for team-shared MCPs

Anything you want every teammate to have — Postgres connection, internal API, deploy tooling — belongs in .mcp.json at the repo root. Anything personal — local memory, your note-taking MCP — belongs in your user config via `claude mcp add`. Mixing the two is the #1 source of confusion when a new contributor onboards.

How to configure MCPs in Claude Code

Claude Code supports two scopes — project (.mcp.json) and user-wide (CLI). The four-step setup that covers both:

1

Pick a scope: project (.mcp.json) or user-wide

Use a project-scoped .mcp.json at the repo root for servers your whole team should share — Postgres connection, internal APIs, repo-specific tooling. Use the `claude mcp add` CLI for personal servers you want available across every project (your local memory, note-taking MCP, anything personal).

2

Add a server with one command

The CLI is the fastest path. Pass the server name, then `--`, then the command Claude Code should run. Any install snippet from a top-mcps.com detail page works as the right-hand side of this command.

claude mcp add filesystem -- \
  npx -y @modelcontextprotocol/server-filesystem ~/code
3

Or commit a .mcp.json for the team

Drop the file at the repo root and commit it. Use ${VAR_NAME} inside env to reference your shell environment so secrets never end up in Git. Teammates running Claude Code inside the repo get the same MCPs automatically.

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@github/github-mcp-server"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}
4

Verify with /mcp inside Claude Code

Open a Claude Code session and run the /mcp slash command. You should see every connected server with a green status and a tool count above zero. If a server is red, run `claude mcp list` from the shell — it surfaces the underlying error (missing binary, bad token, wrong path).

/mcp

Full .mcp.json with all 6 MCPs

Drop this at the root of your repo and commit it. Replace the placeholder values, keep secrets in your shell as ${VAR_NAME}, and every teammate working in the repo gets the same MCPs.

.mcp.json (committed at repo root)
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "."
      ]
    },
    "github": {
      "command": "npx",
      "args": ["@github/github-mcp-server"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    },
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    },
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "${DATABASE_URL}"
      ]
    },
    "puppeteer": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
    },
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Use ${'$'}{`{VAR_NAME}`} for every secret

Claude Code resolves environment variables in env at launch. That means a checked-in .mcp.json can reference ${GITHUB_TOKEN} or ${DATABASE_URL} without leaking secrets — your shell holds the value, Git holds the placeholder. Hardcoding tokens in the committed file is the fastest way to leak credentials.

Quick comparison

MCPPrimary use in Claude CodeSetupScope
FilesystemRead/write files outside the working tree2 minProject (.mcp.json)
GitHubPRs, issues, cross-repo code search5 minProject (.mcp.json)
Context7Version-pinned library documentation2 minProject or user
PostgreSQLSchema introspection + read-only queries3 minProject (.mcp.json)
PuppeteerDrive a real browser for testing flows5 minProject or user
MemoryPersist facts across Claude Code sessions1 minUser (claude mcp add)

Common gotchas

Server "connected" but no tools showing up

Run /mcp inside the session and check the tool count. Zero tools usually means the server started but the manifest is empty — check the server's docs for required env vars or initialization arguments.

.mcp.json is read once at launch

Editing .mcp.json mid-session does nothing. Exit Claude Code (Ctrl+D) and re-run `claude` to pick up the change. The /mcp panel will show the new server count after restart.

${`{`}VAR_NAME{`}`} expands from your shell, not from .env

Claude Code resolves env-var interpolation against the current shell environment. If you use a .env file, source it before launching `claude` (`source .env && claude`) — Claude Code does not auto-load dotenv.

Project .mcp.json wins over user config for the same name

If both scopes define a server with the same key (say, "github"), the project-scoped entry takes precedence. That is usually what you want — but it surprises people the first time a teammate's repo overrides their personal token. Use distinct names if you want both.

Frequently asked questions

Does Claude Code support MCP natively?

Yes — MCP servers are first-class in Claude Code. Add them in seconds with a single `claude mcp add` command, or commit an .mcp.json at the repo root so every teammate working in that repo gets the same MCPs.

How do I add an MCP server to Claude Code?

Two paths. The fastest is `claude mcp add <name> -- <command> [args...]` from the shell — that writes to your user-wide config. For team-shared MCPs, drop a .mcp.json at the repo root with an mcpServers map and Claude Code picks it up automatically when launched in that repo.

What is the difference between .mcp.json and `claude mcp add`?

Scope. .mcp.json is project-scoped and committed to the repo, so every contributor gets the same MCPs (Postgres connection, internal API, repo-specific tools). `claude mcp add` writes to your personal config and applies across every project (your note-taking MCP, local memory, anything personal).

How do I check if an MCP server is working?

Inside a Claude Code session, run the /mcp slash command. It lists every connected server, status (green/red), and number of tools exposed. From the shell, `claude mcp list` shows the same info plus the underlying error message if a server failed to start.

Does Claude Code support remote (HTTP) MCP servers?

Yes. Alongside stdio servers (the default), Claude Code can connect to HTTP/SSE MCP endpoints. Pass --transport http on `claude mcp add`, or specify the transport field in the JSON entry.

How do I keep API tokens out of .mcp.json?

Use environment variable interpolation. Inside the env block, reference ${VAR_NAME} and Claude Code resolves it from your shell at launch. The committed file holds the placeholder; the secret stays in your dotfiles or password manager.

Which MCP should I install first for Claude Code?

Filesystem is the safest first install — it scopes to directories you pass and unlocks the most common request. Right behind it: GitHub for repo work, then Context7 for accurate library docs that match the version in your package-lock.

More for Claude Code

See the full Claude Code client page for the complete config reference, the latest top picks, and side-by-side install commands.

More guides