Read and write local files with configurable access controls.
MCP Servers for Claude Code
Claude Code is Anthropic's official coding CLI. MCP servers are first-class: add them with a single `claude mcp add` command, or commit an .mcp.json to share them with your team across every project.
Set up MCP in Claude Code
Four steps to connect your first MCP server.
- 1
Pick a scope
Use .mcp.json in the repo root for servers your team shares, or `claude mcp add` for servers only you use across every project.
- 2
Add the server
Run `claude mcp add <name> -- <command>` or drop an entry into .mcp.json's mcpServers map. Any install snippet from top-mcps.com works as-is.
- 3
Handle secrets
Reference environment variables with ${VAR_NAME} inside env so tokens stay out of the committed file.
- 4
Verify with /mcp
In a Claude Code session, run the /mcp slash command to list connected servers and their tool counts. Red status = the server failed to start; check logs with claude mcp list.
- Project-scoped (shared)
.mcp.jsonCommit at the repo root — every teammate running Claude Code in the repo gets the same MCPs. - User-wide (via CLI)
claude mcp add <name> -- <command> [args...]Adds to your personal Claude Code config.
# Add a server via the CLI
claude mcp add filesystem -- \
npx -y @modelcontextprotocol/server-filesystem ~/code
# Or check in .mcp.json for the whole repo:
{
"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}"
}
}
}
}Top MCPs for Claude Code
The curated starting stack — install these first.
Up-to-date library docs pulled directly into your AI context.
Query and inspect PostgreSQL databases via natural language.
Full browser automation: navigate, click, screenshot, and scrape.
Persistent knowledge graph memory across AI conversations.
All MCPs compatible with Claude Code
15 servers verified to work with Claude Code, ranked by popularity.
Read and write local files with configurable access controls.
Query and inspect PostgreSQL databases via natural language.
Real-time web search with privacy-focused results.
Persistent knowledge graph memory across AI conversations.
Up-to-date library docs pulled directly into your AI context.
Full Supabase access: database, auth, storage, and edge functions.
Local SQLite database access with full read/write support.
Retrieve web pages and convert them to clean markdown.
Full browser automation: navigate, click, screenshot, and scrape.
Structured step-by-step reasoning for complex problem solving.
Read and send Slack messages, manage channels and threads.
Secure cloud sandboxes for executing AI-generated code.
Manage Linear issues, projects, and cycles from AI context.
FAQ: MCP in Claude Code
How do I add an MCP server to Claude Code?
Fastest path: `claude mcp add <name> -- <command> [args...]`. For servers your team should share, commit an .mcp.json at the repo root with an mcpServers map — Claude Code picks it up automatically when you run it inside that repo.
What is the difference between .mcp.json and the CLI approach?
.mcp.json is project-scoped and lives in the repo. `claude mcp add` writes to your user config and applies across projects. Use .mcp.json for team-shared MCPs (Postgres, internal APIs), CLI for personal tools (your note-taking MCP, local memory).
Can I pass environment variables to MCP servers?
Yes. In .mcp.json use the env block and reference ${VAR} to pull from your shell environment at launch. This keeps secrets out of Git while still letting the server see them at runtime.
How do I check if an MCP server is working?
Inside a Claude Code session, run the /mcp slash command. It lists each connected server, its status, and the number of tools it exposes. If a server is failing, `claude mcp list` from the shell shows the underlying error.
Does Claude Code support remote (HTTP) MCP servers?
Yes. Alongside stdio-based servers, Claude Code can connect to HTTP/SSE MCP endpoints. Use the --transport flag on `claude mcp add` to pick the transport, or specify it in the JSON entry.
Browse every MCP server → top-mcps.com