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.
Filesystem
2 min setupMost 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
GitHub
5 min setupGitHub is where most code lives. This MCP lets agents interact with that code directly, without copy-pasting between interfaces.
npx @github/github-mcp-server
Context7
3 min setupModels hallucinate outdated APIs constantly. Context7 eliminates this by grounding every answer in real, current documentation.
npx -y @upstash/context7-mcp
PostgreSQL
3 min setupDatabase 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
Puppeteer
5 min setupMany 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
Memory
2 min setupAI 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
Commit .mcp.json for team-shared MCPs
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:
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).
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
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}"
}
}
}
}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.
{
"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
Quick comparison
| MCP | Primary use in Claude Code | Setup | Scope |
|---|---|---|---|
| Filesystem | Read/write files outside the working tree | 2 min | Project (.mcp.json) |
| GitHub | PRs, issues, cross-repo code search | 5 min | Project (.mcp.json) |
| Context7 | Version-pinned library documentation | 2 min | Project or user |
| PostgreSQL | Schema introspection + read-only queries | 3 min | Project (.mcp.json) |
| Puppeteer | Drive a real browser for testing flows | 5 min | Project or user |
| Memory | Persist facts across Claude Code sessions | 1 min | User (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
Fundamentals
What Is MCP? A Plain-English Guide to Model Context Protocol
6 min read
Setup Guide
Best MCPs for Cursor in 2026 (Ranked + Setup)
8 min read
Setup Guide
Best MCPs for Claude Desktop in 2026 (Ranked + Setup)
9 min read
Setup Guide
Best MCPs for Windsurf in 2026 (Cascade-Ready Setup)
8 min read
Setup Guide
Best MCPs for VS Code in 2026 (Agent Mode + .vscode/mcp.json)
8 min read
Strategy
MCP Registry vs Curated Directory: Which Should You Use?
5 min read
Setup Guide
Best MCPs for ChatGPT: The Apps and Connectors Worth Installing
9 min read
Tutorial
How to Add an MCP Server to ChatGPT (Developer Mode + Apps Directory)
7 min read