The Best MCP Servers for Claude Code: A Ranking by Context Budget
Every MCP server costs you context before you type a word. The 2026 ranking of which servers earn their keep, and which ones quietly bankrupt you.
An MCP server is a bridge between Claude Code and an external tool: your GitHub, your Postgres database, your browser, your docs. The Model Context Protocol is an open standard, and the official registry lists thousands of them.
But an MCP server isn't free. It doesn't cost money: it costs context. Nobody mentions that when they sell you a "top 20 must-have MCP servers" listicle.
Here's the mechanism. When you connect a server, it declares its tools: names, descriptions, parameter schemas, enum values. Historically, that entire block got injected into context on every single conversation turn, whether you used it or not. The full GitHub MCP server, with its 93 tools, weighs roughly 55,000 tokens in definitions alone. On the previous generation's 200,000-token window, that meant burning a quarter of your budget before typing a character.
Except the window changed scale. Opus 5, Sonnet 5 and the whole Opus 4.x line now run a 1-million-token context, which drops those same 55,000 tokens to 5.5% of the budget. That is considerably less dramatic, and it is already a good reason to distrust rankings that recycle 2025's arithmetic. Two caveats all the same: Haiku 4.5 is still at 200,000 tokens, and a bigger context is not a free context.
Which is why the right ranking isn't "what are the 20 best MCP servers." It's how many can you actually afford, and which ones deserve the slot.
Except that in 2026, the answer changed. And most of the articles you'll find are out of date.
What changed in 2026: tool search
Anthropic shipped the fix: the tool search tool. Instead of loading every tool definition upfront, Claude only sees a search tool, and pulls in the schemas it needs, on demand.
Anthropic's official numbers on their demo setup: 77,000 tokens of definitions drop to 8,700, an 85% reduction. Preserved context goes from 122,800 to 191,300 tokens.
The win isn't just accounting. Tool selection accuracy climbs too, because a model drowning in 90 tools picks badly. Again per Anthropic, on identical tasks: Opus 4 goes from 49% to 74%, and Opus 4.5 from 79.5% to 88.1%.
The part most people miss: in Claude Code, tool search is on by default. MCP tools are deferred, and only tool names and server instructions load at session start. The docs are blunt about it: "adding more MCP servers has minimal impact on your context window," and Claude Code imposes no fixed per-server tool cap.
So no, you don't need to rip out every MCP server like the 2025 advice said. But you can't connect everything blindly either. Here's why.
Why the context budget still matters
Four very concrete reasons.
1. Tool search isn't always active. Per the docs, it's off by default on Google Cloud's Agent Platform, and whenever ANTHROPIC_BASE_URL points at a non-first-party host (most proxies don't forward tool_reference blocks). It also requires a compatible model: Sonnet 4.5, Haiku 4.5, Opus 4.5 or later, which covers the entire current generation (Opus 5, Sonnet 5, Opus 4.8 and 4.7). Behind a corporate proxy or on Bedrock, you're still paying full price.
2. The cost moves, it doesn't vanish. Tool names and server instructions still load at startup. With fifteen servers connected, that adds up. And every tool search costs a round trip.
3. Selection is still a problem. Even with tool search, the more semantically similar tools you have, the more Claude hesitates. Three servers that all do "web search" are three ways to pick wrong.
4. Some servers opt out. The alwaysLoad field forces a server's full definitions into context at startup regardless of your tool search setting. One badly designed server using it drags you back to 2025.
An honest caveat before the ranking: the /context command overstated MCP costs for a long time. One developer showed XcodeBuildMCP reporting ~45,000 tokens for ~15,000 real ones, because the hidden system prompt was counted once per tool instead of once per request. Anthropic has since fixed it (12.6k reported post-fix). Treat the raw numbers floating around the web as orders of magnitude, not lab measurements.
The table: what each server actually costs
| Server | What it does | Tools | Est. context cost | Verdict |
|---|---|---|---|---|
| Context7 | Live, version-specific library docs injected into the prompt | 2 | Negligible | Keep |
| GitHub (scoped toolsets) | Issues, PRs, code, Actions | 26 | ~4,200 tokens | Keep |
| GitHub (full) | The entire GitHub API surface | 93 | ~55,000 tokens | Avoid |
| Postgres / Supabase | Query your DB, read the schema | Varies (1 minimal tool = ~35 tokens) | Low if scoped | Keep if you have a DB |
| Playwright | Drive a browser, test, scrape | 24 core, 47 all categories | Medium to heavy | On demand |
| Chrome DevTools | Debug perf, network, console on real Chrome | ~26 | Medium | On demand |
| Sentry | Read prod errors and traces | ~10-15 | Medium | On demand |
| Notion / Linear / Jira | Tickets, specs, product docs | 10-20 each | Medium, cumulative | On demand |
| Figma | Read designs, extract tokens | ~10 | Medium | On demand |
| Filesystem | Read and write files | ~11 | Low | Avoid (redundant) |
| Web search aggregators | Tavily, Exa, Perplexity, Firecrawl in one | 20 tools = 14,214 tokens | Heavy | Avoid |
Tool counts marked ~ are ballparks, and they shift with every release. Always verify with /mcp, which shows the tool count next to each connected server.
My thesis: six servers is enough
Past six, you stop adding capability and start adding confusion. Here's the ranking, by value-to-cost ratio.
1. Context7. Best value on the market, no contest. Two tools, a rounding-error cost, and it solves Claude Code's most annoying failure mode: stale documentation. Claude stops hallucinating the v2 API when you're on v5. If you keep exactly one server, keep this one.
2. GitHub, but with scoped toolsets. The official server ships a --toolsets flag precisely for this. GitHub's own docs say it plainly: "enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size". They went further with per-tool configuration in December 2025, noting that loading the repos and pull_request toolsets wholesale enables 27 tools when you often use two. Add --read-only if you don't want Claude writing.
3. Your database. Postgres, Supabase, whatever. Claude reading your actual schema instead of guessing it is a massive quality win for a tiny cost, as long as you keep the tools scoped. Read-only, ideally.
4. One browser server. One. Playwright or Chrome DevTools, never both. Playwright exposes 24 core tools and 47 across all categories, so enable only the categories you need. Chrome DevTools if you're debugging performance, Playwright if you're writing tests.
5. Sentry (or your error tracker). Only if you have production traffic. "Look at the error spiking since this morning and fix it" is one of the rare workflows where MCP genuinely beats copy-paste.
6. Your ticket tracker. Notion, Linear, or Jira. One of them. Whichever one your specs actually live in.
And here's what doesn't make the cut, with reasons.
Filesystem: redundant. Claude Code already has Read, Write, Glob, and Grep natively, better integrated and free in context. You're paying for a capability you already own.
Web search aggregators: too expensive. The textbook case, measured by Scott Spence: mcp-omnisearch, 20 tools for 14,214 tokens, or 710 tokens per tool. Claude Code already ships WebSearch and WebFetch. His consolidation work is also the best demonstration of the problem: by merging redundant tools and trimming bloated descriptions, he went from 20 tools / 14,214 tokens to 8 tools / 5,663 tokens, a 60% cut. His full setup weighed 81,986 tokens, roughly a third of the window.
Full GitHub: the classic trap. 93 tools when you use five.
The actual config
The basics. Official syntax:
# Remote server over HTTP
claude mcp add --transport http notion https://mcp.notion.com/mcp
# Local (stdio) server: everything after -- goes to the server untouched
claude mcp add --transport stdio playwright -- npx @playwright/mcp@latest
# With environment variables
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
-- npx -y airtable-mcp-server
# Inspect and clean up
claude mcp list
claude mcp get github
claude mcp remove github
The --scope flag decides where the config lives: local (you, this project), project (shared via a committed .mcp.json), user (you, every project). The rule: user for Context7 only. Everything else goes in project, so your Figma server doesn't follow you into your backend repo.
Light profile vs full profile
The idea: don't run the same servers everywhere. One .mcp.json per project, sized for that project.
Light profile, for a library or CLI:
{
"mcpServers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}
Full profile, for a web app in production:
{
"mcpServers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
},
"github": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server",
"--toolsets", "repos,issues,pull_requests",
"--read-only"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
},
"playwright": {
"type": "stdio",
"command": "npx",
"args": ["@playwright/mcp@latest", "--caps=core"]
}
}
}
Note the ${GITHUB_TOKEN} expansion: Claude Code supports it in .mcp.json, which lets you commit the file without committing your secrets. The ${VAR:-default} form works too.
Tuning tool search
Behavior is controlled by ENABLE_TOOL_SEARCH:
| Value | Behavior |
|---|---|
| (unset) | All MCP tools deferred, loaded on demand. The default. |
true | All deferred, forcing the beta header even through proxies |
auto | Load upfront if tools fit within 10% of the context window, defer otherwise |
auto:N | Same with your own threshold, e.g. auto:5 for 5% |
false | Everything loaded upfront, 2025-style |
auto is the smartest setting if you run few servers: your tools stay directly visible (zero search latency) as long as you're under the threshold, and deferral only kicks in when you overflow.
And if a server must always be visible without a search step, the alwaysLoad field (Claude Code v2.1.121+) exempts it:
{
"mcpServers": {
"core-tools": {
"type": "http",
"url": "https://mcp.example.com/mcp",
"alwaysLoad": true
}
}
}
Careful: it also blocks startup until the server connects, capped at the 5-second connect timeout. Reserve it for two or three tools you hit on every turn.
Auditing your budget in two commands
None of this matters if you don't measure. Two commands, inside Claude Code:
/context # token breakdown: system, MCP tools, memory, conversation
/mcp # each server's status and tool count
/context gives you the snapshot. If the "MCP tools" line exceeds 10% of your window, you have a problem. /mcp names the culprit and lets you disable a server for the session.
The hygiene rule that beats everything else: if you haven't invoked a server in two weeks, delete it. MCP setups rot by accumulation, never by restraint.
The takeaway
Tool search changed the math, and any article still telling you to unplug everything predates it. With 85% fewer tokens and selection accuracy climbing from 79.5% to 88.1% on Opus 4.5, you can afford more servers than you could in 2025.
But "more" isn't "all." The real ranking is still value over cost, and it fits in one line: Context7 and your database permanently, GitHub with scoped toolsets, one browser and one tracker on demand, and nothing that duplicates what Claude Code already does natively.
Six servers. The rest is collecting.
Pierre Rondeau
Developer and indie builder. I build products and automations with AI. Creator of Claude Hub.
LinkedIn