Which MCP Servers Should You Install for Claude Code?
Install Context7 first, so Claude Code reads current library docs instead of writing from memory. Then add the GitHub MCP server if your tasks start from issues and pull requests, Playwright if you build web UI, and Sentry if you debug production errors. Stop there until a task shows you a gap. Each server adds tools that Claude Code has to choose from, so a short list works better than a long one.
Claude Code already reads, edits, and runs everything in your checkout. An MCP server is worth adding only when it brings in something the checkout does not have: current docs, your issue tracker, a real browser, or production data.
We build Context7, so weigh that. The other servers below are not ours, and we list them because they fill gaps Context7 does not.
The Short List
Run the claude mcp add commands in your terminal, not inside a Claude Code session. They add the server for the current project only. Add --scope user to use a server in every project, or --scope project to write it to .mcp.json so that teammates get it when they pull the repository. Then run /mcp in Claude Code to check that each server is connected, and to sign in to servers that use OAuth.
1. Context7: Current Library Docs
Best for: Any code that calls a library, framework, or SDK
Claude Code learned from code written before its training cutoff, and most of that code uses older versions of the libraries you have installed. Context7 gives it a lookup: it finds the library, then returns the docs and code examples for the topic and version you ask about. This is where outdated code usually comes from, so it is the first server to add.
$ npx ctx7 setup --claudeThe command signs you in, creates an API key, and installs a skill that tells Claude Code when to look up docs, so you do not have to type "use context7" in each prompt. You can choose the MCP server or the ctx7 CLI. On a headless or CI host, add --api-key YOUR_API_KEY.
Context7 is also a Claude Code plugin. Run these two commands inside Claude Code, then run /mcp and sign in:
/plugin marketplace add upstash/context7
/plugin install context7@context7-marketplaceHow Context7 keeps AI tools current →
2. GitHub: Issues, Pull Requests, and CI
Best for: Tasks that start outside the code
The task is often in an issue description, a review comment, or a failed workflow run. GitHub's official MCP server lets Claude Code read those, and open issues and pull requests, without you copying text into the prompt. Create a fine-grained personal access token with access to only the repositories you work on.
$ claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer YOUR_GITHUB_PAT"If the gh CLI is already signed in on your machine, Claude Code can also use it through Bash. The MCP server is easier to scope and works the same way on every machine.
3. Playwright: A Real Browser
Best for: Web UI work
Playwright's MCP server, from Microsoft, gives Claude Code a browser that it controls through the page's accessibility tree. It can open your dev server, click through a flow, fill a form, and read the console, then fix what it finds. This closes the loop on frontend changes that type checks cannot catch.
$ claude mcp add playwright npx @playwright/mcp@latest4. Sentry: Production Errors
Best for: Debugging errors with real stack traces
Sentry's remote MCP server lets Claude Code read issues, stack traces, and traces from your Sentry projects. Start from "fix the top unresolved issue in the API project", and Claude Code reads the error, finds the code, and proposes the fix. Sign in with /mcp after you add it.
$ claude mcp add --transport http sentry https://mcp.sentry.dev/mcp5. Your Database, Read-Only
Best for: Migrations, queries, and schema questions
When the schema is the source of truth, let Claude Code read it before it writes a migration or a join. Supabase, Neon, PlanetScale, and most hosted databases publish an MCP server. Connect it in read-only mode, or to a development database, so a wrong query cannot change production data.
What About Search, Filesystem, and Memory Servers?
Claude Code already has web search and web fetch, so a search MCP server adds little for most people. It already reads your files, so a filesystem server adds nothing inside the project. Memory servers can help on long projects, but a CLAUDE.md file that you keep short does the same job and is reviewed in Git.
Add other servers, such as Linear, Jira, Slack, or Notion, when your team's work lives there and you would otherwise paste from them into each prompt.
Plugins, Skills, and MCP Servers
These are three different things. An MCP server gives Claude Code tools that reach outside the project. A skill is a folder of instructions and scripts that Claude Code loads when a task needs it. A plugin is a package that can contain both, plus commands and hooks, and installs with /plugin install. Many MCP servers, Context7 and Sentry among them, are also published as plugins.
Make Claude Code Use the Docs
An MCP server helps only when Claude Code calls it. For a library it thinks it knows, it often answers from memory. npx ctx7 setup --claude installs a skill that handles this. You can also add one line to CLAUDE.md:
Use Context7 to fetch current documentation before writing code for any library, and use the version from package.json or the lockfile.Then name the version when it matters. "Add a proxy in Next.js 16" gets better code than "add middleware", because the file convention changed between versions.
- Up-to-date docs for coding agents: Understand why AI coding tools need current, version-specific documentation.
- MCP server list: Compare useful MCP servers for AI coding agents and developer workflows.
Frequently asked questions
Which MCP servers should I install for Claude Code?
Start with Context7 for current library docs. Add the GitHub MCP server if your tasks start from issues and pull requests, Playwright if you build web UI, and Sentry if you fix production errors. Add a read-only database server if you write migrations. Keep the list short, because every server adds tools that Claude Code must choose between.
What is the best Claude Code MCP server for documentation?
Context7. It returns current, version-specific docs and code examples for libraries and frameworks, so Claude Code does not write code from outdated training data. Install it with npx ctx7 setup --claude, or as a plugin with /plugin install context7@context7-marketplace.
How do I add an MCP server to Claude Code?
Run claude mcp add in your terminal. For a remote server, use claude mcp add --transport http <name> <url>. For a local one, give the command that starts it, for example claude mcp add playwright npx @playwright/mcp@latest. Add --scope user for all projects or --scope project to share it through .mcp.json. Run /mcp in Claude Code to check the connection.
Are Claude Code plugins the same as MCP servers?
No. An MCP server gives Claude Code tools that reach outside the project. A plugin is a package that can contain MCP servers, skills, commands, and hooks. Many MCP servers, including Context7, are also published as plugins.
How many MCP servers should I use in Claude Code?
As few as do the job. Three to five is enough for most developers: Context7 for docs, GitHub for issues and pull requests, and one or two servers for your stack. Every server adds tool definitions that Claude Code reads and chooses from.
Does Context7 work in headless Claude Code environments like CI?
Yes. Use an API key instead of the browser sign-in: run npx ctx7 setup --claude --api-key YOUR_API_KEY, or add the MCP server by hand with the key in a header. The plugin uses OAuth only, so use the setup command on headless hosts.
Install Context7 in Claude Code in One Command
Run npx ctx7 setup --claude, and Claude Code looks up current, version-specific library docs before it writes code.