Setup Guide8 min read

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

The six MCPs every Claude Code user should install in 2026 are: Filesystem, GitHub, Context7, Postgres MCP Pro, Puppeteer, and Memory. Install snippets, a full team-shared .mcp.json, and FAQ below.

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.

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

Postgres MCP Pro

5 min setup

The official Postgres MCP is read-only and intentionally minimal. Postgres MCP Pro fills the gap when you want index advice, performance analysis, or write capability under controlled circumstances.

uvx postgres-mcp

Query performance tuningIndex recommendationsSchema health audits
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 @hisma/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": "uvx",
      "args": ["postgres-mcp"],
      "env": {
        "DATABASE_URI": "${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

Ranked Guide

Best MCP Servers for Postgres in 2026 (Ranked)

12 min read

Ranked Guide

Best MCP Servers for Browser Automation in 2026 (Ranked)

12 min read

Ranked Guide

Best MCP Servers for Vector Databases in 2026 (RAG-Ready)

11 min read

Ranked Guide

Best MCP Servers for Git in 2026 (GitHub, GitLab, Bitbucket, Local)

11 min read

Ranked Guide

Best MCP Servers for Workflow Automation in 2026 (Ranked)

11 min read

Ranked Guide

Best Free MCP Servers in 2026 (No API Key Required)

10 min read

Comparison

GitHub vs GitLab MCP: Which to Use in 2026

8 min read

Comparison

Pinecone vs Qdrant vs Chroma MCP: Which to Use (2026)

9 min read

Comparison

Playwright vs Browserbase MCP: Local vs Cloud (2026)

8 min read

Comparison

Postgres MCP vs Supabase MCP: Which to Use (2026)

8 min read

Comparison

n8n vs Zapier vs Make MCP: Which to Use (2026)

9 min read

Ranked Guide

Best MCP Servers for Deploying Websites in 2026 (Ranked)

11 min read

Comparison

Vercel vs Netlify vs Cloudflare MCP: Which to Use (2026)

9 min read

Tutorial

Deploy to Vercel With an AI Agent (Vercel MCP, 2026)

7 min read

Tutorial

Deploy to Cloudflare With an AI Agent (Cloudflare MCP, 2026)

7 min read

Strategy

Can an AI Agent Deploy to Production? (Safely, in 2026)

8 min read

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 Codex CLI in 2026 (Ranked + config.toml)

8 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

Vertical Guide

Best MCPs for Marketing in 2026 (Ranked + Use Cases)

9 min read

Vertical Guide

Best MCPs for SEO in 2026 (Ranked + Workflows)

9 min read

Vertical Guide

Best MCPs for Data Teams in 2026 (Ranked + Workflows)

9 min read

Vertical Guide

Best MCPs for Security in 2026 (Ranked + Posture Workflows)

10 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

Security

MCP Security: What to Know Before You Install

9 min read

Role Guide

Best MCPs for Marketers in 2026 (SEO, Email, Analytics)

8 min read

Strategy

Remote vs Local MCP Servers: When to Use Each

7 min read

Fundamentals

MCP vs Function Calling: What’s the Difference?

6 min read

Comparison

MCP Directories Compared: Top MCPs vs mcp.so vs PulseMCP vs mcp.directory

8 min read

Security

MCP Prompt Injection: How Tool-Calling Agents Get Hijacked

8 min read

Security

OAuth 2.1 for MCP: What the Spec Standardised and What You Need to Know

8 min read

Security

Sandboxing MCP Servers: Containers, Least Privilege, and Process Isolation

9 min read

Security

Rotating MCP Credentials: A Practical Guide for Leaks, Expiry, and Routine Hygiene

7 min read

Security

Least-Privilege Scoping for MCPs: How to Grant the Smallest Useful Permission

7 min read

Setup Guide

Best MCP Servers for Databases in 2026 (Ranked + Setup)

10 min read

Setup Guide

Best MCP Servers for Research in 2026 (Search, Scrape, Synthesize)

9 min read

Setup Guide

Best MCP Servers for Design-to-Code in 2026 (Figma → React)

9 min read

Setup Guide

Best MCP Servers for Domains in 2026 (Registrars + DNS)

9 min read

Tutorial

How to Buy a Domain From Claude (Cloudflare MCP, Step by Step)

6 min read

Tutorial

How to Search for Domains With an AI Agent (Cross-Registrar Workflow)

7 min read

Tutorial

How to Deploy a Website With an AI Agent (MCP Workflow)

8 min read