Source: wiki synthesis: essential-mcp-servers, nate-herk-every-level-of-claude, cli-vs-mcp-tool-selection
MCP (Model Context Protocol) is Anthropic’s open protocol for connecting LLMs to external tools, data sources, and systems through a uniform JSON-RPC interface. The specification lives at modelcontextprotocol.io and is implemented by both Anthropic and a growing list of third-party LLM clients. MCP is the standard interface that lets one server (e.g., GitHub, Playwright, Sentry, Postgres) plug into many different agent harnesses without per-client glue code
Key Takeaways
- Open protocol, not a product. MCP is a spec maintained at
modelcontextprotocol.io; anyone can implement either side. Anthropic shipped it, but it is not Anthropic-only — Cursor, Zed, Cowork, Claude Desktop, Claude Code, and other clients all speak it. - Two-sided architecture. MCP servers expose tools, resources, and prompts from a system (GitHub, a database, a browser). MCP clients are the LLM-side runtimes that connect to those servers and decide which tools to invoke. The same server works across every conforming client
- Distinct from Connectors. connectors are pre-built, Anthropic-managed MCP servers (50+ — Slack, Gmail, Drive, Notion, GitHub, Calendar) that ship with one-click OAuth inside claude.ai. Generic MCP is the underlying protocol; Connectors are a curated, hosted subset.
- Supplements raw tools, doesn’t replace them. MCP is the right surface when state, auth, or org-level controls are involved; CLI commands remain better for file ops, Git, and text processing the model already knows from training (see cli-vs-mcp-tool-selection).
- Ecosystem breadth. The community has shipped hundreds of public MCP servers across GitHub ops, documentation lookup, browser automation, observability, databases, and design tools — see essential-mcp-servers for the high-value starter set.
- Context-aware by design. Claude Code’s Tool Search loads MCP tool schemas on demand instead of at session start, cutting upfront context overhead by ~95% — making it safe to keep 10+ servers configured. Control behavior with
ENABLE_TOOL_SEARCH(unset = full defer;auto= threshold-based;false= upfront load all). UsealwaysLoad: trueon a per-server or per-tool basis to force a specific server’s tools into context at session start. - Three configuration scopes. User (global), local (per-project, uncommitted), and project (
.mcp.json, committed) — letting teams share essential servers via Git while keeping personal preferences separate.
How MCP works
MCP is a JSON-RPC protocol that runs over three transports:
- stdio — the client launches the server as a subprocess and exchanges JSON-RPC messages over stdin/stdout. Used for local servers (filesystem, git, sequential-thinking).
- HTTP / streamable-http — the client connects over HTTP to a remote endpoint. Used for hosted servers (
https://mcp.draw.io/mcp, Railway Remote MCP, Cloudflare-Workers-deployed servers).streamable-httpandhttpare equivalenttype:values in.mcp.json(the MCP spec usesstreamable-http; configurations copied from server docs work without modification). - WebSocket (
type: "ws") — holds a persistent bidirectional connection; suited for remote MCP servers that push events to Claude unprompted. Use HTTP instead when your server only responds to requests (HTTP supports OAuth andclaude mcp add --transport; WebSocket supports neither). Configure viaclaude mcp add-jsonor.mcp.jsondirectly; theclaude mcp add --transportflag does not acceptws.
Each server exposes three primitive types:
- Tools — callable functions with a JSON schema describing inputs and outputs. The model picks tools to invoke based on the schema’s description.
- Resources — readable data sources the model can request (files, documents, query results) addressed by URI.
- Prompts — server-provided prompt templates the client can surface to the user as slash commands or quick actions.
Connection setup is a capability-negotiation handshake: the client announces the protocol version and supported features, the server responds with its tool/resource/prompt list and any server-specific options (e.g., _meta.anthropic/maxResultSizeChars to raise the per-tool result-size cap up to 500K characters). Because the handshake is transport-agnostic, the same server binary works across every conforming MCP client ^[inferred] — the major harnesses (Claude Code, Cowork, Claude Desktop, Cursor, Zed) all implement the client side, so a Postgres MCP server you wrote for one runs in all of them unchanged.
MCP vs CLI tools (when to choose which)
See cli-vs-mcp-tool-selection for the worked-exercise deep dive. The short version:
- Reach for CLI when the operation is structured, token-cheap, and the model already knows the command from training data (
git log,grep,curl,cat, file ops). CLI composes via pipes; MCP tool calls do not. Anthropic’s own docs say: when a CLI exists, prefer it — GitHub / AWS / Google Workspace CLIs use ~60-70% fewer tokens than the equivalent MCP servers because no schema is loaded until the command runs. - Reach for MCP when there’s a capability gap raw tooling can’t bridge (fetching a JS-rendered Next.js page), when authentication is server-managed (OAuth for Slack/Notion/databases), or when org-level controls (per-user access, audit trails) matter.
- The diagnostic anti-pattern: if the agent starts reverse-engineering a JavaScript framework just to read a web page, it picked the wrong surface — MCP would have closed the gap in one tool call.
2026-07-28 spec revision
The MCP specification shipped its fifth and largest revision on 2026-07-28: a stateless protocol core — the capability-negotiation handshake and session model described under “How MCP works” above are retired in the new version — plus hardened OAuth/OIDC authorization, a formal twelve-month deprecation policy (Roots, Sampling, Logging, HTTP+SSE), and first-class extensions (MCP Apps, Tasks, Enterprise Managed Auth). Anthropic says support is rolling out across Claude products; the client behavior documented in this article reflects the pre-2026-07-28 protocol until that lands. Full coverage: MCP 2026-07-28 Spec — Stateless Core, First-Class Extensions, Auth Hardening. Sourced from raw/x-account-claudedevs-2082164248697069935.md and raw/reddit-1v97e2v.md.
Recent additions (2026-08-09 watchlist sweep)
New MCP client features from ai-research/watchlist-snapshots/code-claude-com-docs-en-mcp-2026-08-09.md:
MCP discovery cache (v2.1.221)
Remote MCP servers you have connected to before now show a cached status at session start instead of reconnecting immediately:
cached 2h ago · connects on first use · 5 tools
Claude Code loads the server’s tool list from the previous session without establishing a live connection — the server connects on first use, not at session start. This improves cold-start time when many remote servers are configured but not all are needed every session.
Set MCP_DISCOVERY_CACHE=0 to disable caching and force immediate reconnection at session start. Requires Claude Code v2.1.221 or later.
--mcp-config with -p now waits for pending servers to connect before the first turn, but skips the wait for servers with a cached tool list (they connect on first use). The wait behavior itself also requires v2.1.221.
Connector auth fix (v2.1.222)
Before v2.1.222, Claude Code marked connectors as needing authentication even when they were already authorized, and re-authorizing them did not resolve the state. Fixed in v2.1.222 — connectors that are fully authorized no longer appear in the “needs auth” count.
ENABLE_TOOL_SEARCH=true on GCP Agent Platform (v2.1.221)
Before v2.1.221, Claude Code disabled tool search for all models on Google Cloud’s Agent Platform unless ENABLE_TOOL_SEARCH=true was explicitly set. As of v2.1.221, setting ENABLE_TOOL_SEARCH=true reliably forces tool search on even when the model or platform would otherwise suppress it — the beta header is sent regardless. The true value now works as a universal override, not just a GCP-selective one.
Updated ENABLE_TOOL_SEARCH table (updating the true row from the 07-26 entry below):
| Value | Behavior (as of v2.1.221) |
|---|---|
true | Forces all MCP tools deferred; beta header sent even on GCP/proxies and non-first-party hosts. Before v2.1.221, this value did not override the GCP default. May fail on older models that don’t support tool_reference blocks. |
Recent additions (2026-07-26 watchlist sweep)
New MCP client features from ai-research/watchlist-snapshots/code-claude-com-docs-en-mcp-2026-07-26.md:
Configure tool search — ENABLE_TOOL_SEARCH env var
Full documentation for controlling tool search behavior. Tool search is enabled by default (all MCP tools deferred and discovered on demand). Disabled by default on Google Cloud’s Agent Platform and when ANTHROPIC_BASE_URL points to a non-first-party host. Set ENABLE_TOOL_SEARCH explicitly to override.
| Value | Behavior |
|---|---|
| (unset) | All MCP tools deferred; falls back to upfront load on GCP Agent Platform or non-first-party host |
true | All MCP tools deferred; beta header sent even on GCP/proxies (may fail on older models) |
auto | Threshold mode: upfront if tools fit within 10% of context window, deferred otherwise |
auto:N | Threshold mode with custom percentage (0–100); e.g. auto:5 for 5% |
false | All MCP tools loaded upfront, no deferral |
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS keeps tool search off and ENABLE_TOOL_SEARCH cannot override it. Requires model supporting tool_reference blocks (Claude Sonnet 4.5, Haiku 4.5, Opus 4.5+).
alwaysLoad per-server and per-tool field
Set alwaysLoad: true in a server’s .mcp.json entry to exempt it from deferral — its tools always load into context at session start regardless of ENABLE_TOOL_SEARCH. Available on all server types (stdio, http, ws). Requires v2.1.121+.
Individual tools can also be marked always-loaded via "anthropic/alwaysLoad": true in the tool’s _meta object. Setting alwaysLoad: true also blocks startup until the server connects (capped at the 5-second connect timeout).
{
"mcpServers": {
"core-tools": {
"type": "http",
"url": "https://mcp.example.com/mcp",
"alwaysLoad": true
}
}
}anthropic/requiresUserInteraction annotation (v2.1.199)
MCP server authors can mark a tool as requiring explicit user approval on every call. Set _meta["anthropic/requiresUserInteraction"] to the JSON boolean true in the tool’s tools/list response entry. Claude Code shows the permission prompt on every call — even in acceptEdits, auto, and bypassPermissions modes — with no “don’t ask again” option. Allow rules that match the tool don’t skip the prompt. In dontAsk mode, Claude Code denies the call instead.
In non-interactive mode with --permission-prompt-tool, an allow result is converted to a deny with message MCP tool requires user interaction; not supported via --permission-prompt-tool. The Agent SDK canUseTool callback can approve these calls. As of v2.1.214, Claude Code also withholds one-tap Remote Control approval for any permission request the terminal dialog can’t render (safety warnings, always-allow options).
{
"name": "grant_access",
"description": "Requests access to a protected resource",
"_meta": {
"anthropic/requiresUserInteraction": true
}
}OAuth additions: --callback-port, --client-id, oauth.scopes, authServerMetadataUrl
--callback-port <port> and --client-id <id> on claude mcp add and claude mcp add-json:
--callback-portfixes the OAuth callback port to match a pre-registered redirect URI (http://localhost:PORT/callback). Works with or without--client-id.--client-idpasses a pre-configured OAuth app client ID;--client-secretprompts for the secret with masked input. Store the secret viaMCP_CLIENT_SECRET=<secret>env var in CI.
claude mcp add --transport http \
--client-id your-client-id --client-secret --callback-port 8080 \
my-server https://mcp.example.com/mcpoauth.scopes — pins the OAuth scopes Claude Code requests. Value is a single space-separated string (RFC 6749 §3.3). Takes precedence over authServerMetadataUrl and server-advertised scopes. If the server returns 403 insufficient_scope, Claude Code re-authenticates with the same pinned scopes. offline_access is auto-appended if the server advertises it.
{
"mcpServers": {
"slack": {
"type": "http",
"url": "https://mcp.slack.com/mcp",
"oauth": {
"scopes": "channels:read chat:write"
}
}
}
}authServerMetadataUrl — overrides default OAuth discovery (RFC 9728 at /.well-known/oauth-protected-resource → RFC 8414 at /.well-known/oauth-authorization-server). Set in the oauth object when standard endpoints error or to route through an internal proxy. URL must use https://. The metadata URL’s scopes_supported overrides upstream advertised scopes.
MCP elicitation response handling
MCP servers can request structured input from users mid-task via elicitation. Claude Code displays an interactive dialog automatically — either form fields defined by the server, or a URL mode for browser-based auth. No user configuration required. To auto-respond without a dialog, use the Elicitation hook (see hooks).
v2.1.214 — list_changed transient error fix
If a list_changed-triggered refresh fails transiently, Claude Code now keeps the server’s previously discovered tools, prompts, and resources until a later refresh succeeds. Before v2.1.214, a transient refresh error replaced the server’s tools with an empty list — breaking tool availability until the next successful reconnection.
v2.1.218 — Startup notice counting fix
The startup notice that appears when configured servers need authentication now counts only servers you can sign in to from Claude Code. Before v2.1.218, it also counted claude.ai connectors not yet connected in claude.ai (those can only be connected from claude.ai settings), inflating the sign-in count.
Recent additions (2026-07-17 — v2.1.212)
- MCP tool calls auto-background after 2 minutes (
CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS, v2.1.212). MCP tool calls that run longer than 2 minutes (120000ms) now automatically move to the background, so the session stays usable during long-running MCP ops (e.g. a slow database query or a file-conversion tool). The threshold is tunable viaCLAUDE_CODE_MCP_AUTO_BACKGROUND_MS; set to0or a very large value to disable. This makes long-running MCP operations behave more like background Bash commands — the conversation stays responsive while the tool runs to completion. Sourced fromai-research/claude-code-docs-whats-new-w29-2026-07-17.md+ai-research/claude-code-docs-changelog-2026-07-17.md.
Recent additions (2026-07-16 watchlist sweep)
Three changes across v2.1.207/208/211, sourced from ai-research/watchlist-snapshots/code-claude-com-docs-en-mcp-2026-07-16.md:
- v2.1.207 — Untracked
settings.local.jsonnow requires a trust dialog. Approvals in an untracked.claude/settings.local.jsonstill apply, but only after you accept a trust dialog for that folder or a parent directory (unless the folder is your own configuration home). Before v2.1.207, an untrackedsettings.local.jsoncould approve MCP servers even in a folder you’d never trusted — closing a gap where cloning a repo with a local-settings file could silently auto-approve servers with no trust decision. - v2.1.208 — Empty
urlshows cleanly as “not configured”. A remote server with an emptyurlnow shows asnot configuredin/mcp,claude mcp list, and the/pluginmanager instead of being reported as a configuration issue — lets a plugin ship a placeholder entry for a connector configured later. Before v2.1.208, an emptyurlprompted to reconnect as if misconfigured. - v2.1.211 — Plugin MCP servers reconnect after an idle web session wakes. In web sessions, an MCP call to a plugin server that isn’t connected yet (e.g. right after an idle session wakes) now starts the server on demand and waits for it. Before v2.1.211, plugin servers in a web session reconnected only when the next message started a new turn, so calls right after wake failed until then.
Recent additions (2026-07-12 watchlist sweep)
New MCP client features in Claude Code as of v2.1.202–v2.1.205, sourced from ai-research/watchlist-snapshots/code-claude-com-docs-en-mcp-2026-07-12.md:
- v2.1.202 — Clearer url-without-type error. Servers configured with a
urlbut notypenow report:MCP server "<name>" has a "url" but no "type"; add "type": "http" (or "sse" / "ws") to this entry. Before v2.1.202, Claude Code reported this ascommand: expected string, received undefined— an opaque internal error. - v2.1.203 —
roots/listreturns all working directories.roots/listnow returns the session’s launch directory plus every additional working directory you’ve added with--add-dir,/add-dir, oradditionalDirectories. Claude Code also sendsnotifications/roots/list_changedwhen that set changes. Before v2.1.203,roots/listreturned only the launch directory and no change notifications were sent. - v2.1.203 — stdio servers now subject to idle timeout. The idle timeout now applies to stdio servers (30-minute window, previously exempt). HTTP/SSE/WebSocket servers keep the 5-minute window. IDE servers and SDK in-process servers remain exempt.
- v2.1.203 — Per-server
timeoutfloors the idle timeout. A per-servertimeout≥1000ms also acts as a minimum on the idle timeout for that server — Claude Code will never kill it for idleness sooner than the configuredtimeout. - v2.1.205 —
Claude Browseradded to reserved server names. Namesworkspace,claude-in-chrome,computer-use,Claude Preview, and nowClaude Browserare reserved for Claude Code’s built-in servers. A user-configured server with a reserved name is skipped at load time. - v2.1.205 — Connection errors passed to Claude via ToolSearch. When a configured server fails to connect, Claude Code now reports which server failed and its error in
ToolSearchresults, so Claude can surface the failure in its response. Before v2.1.205, Claude responded as if the failed server’s tools were never configured. Requires Tool Search (default on); not available on Bedrock/Vertex/Foundry, customANTHROPIC_BASE_URL,ENABLE_TOOL_SEARCH=false, or Haiku.
Recent additions (2026-07-05 watchlist sweep)
New MCP client features in Claude Code as of v2.1.196, sourced from ai-research/watchlist-snapshots/code-claude-com-docs-en-mcp-2026-07-05.md:
- WebSocket transport (
type: "ws") — A third transport option alongside stdio and HTTP. Holds a persistent bidirectional connection; suited for remote MCP servers that push events to Claude unprompted. Use HTTP instead for servers that only respond to requests (HTTP supports OAuth andclaude mcp add --transport; WebSocket supports neither). Configure viaclaude mcp add-jsonor directly in.mcp.json. Authentication is header-only — pass a static token inheadersor generate one withheadersHelper. - v2.1.196 — Workspace trust gate on
.mcp.jsonapprovals.claude mcp listandclaude mcp getnow read.mcp.jsonapprovals only from settings that aren’t checked into the repository, until you trust the workspace by runningclaudeinteractively and accepting the trust dialog. A cloned repository can no longer approve its own servers:enableAllProjectMcpServersorenabledMcpjsonServerscommitted to.claude/settings.jsonis ignored in an untrusted folder, and the server shows⏸ Pending approvalinstead of connecting. Approvals from user~/.claude/settings.json, managed settings,--settings, and.claude/settings.local.json(untracked) still apply. AdisabledMcpjsonServersentry still rejects the server. workspaceserver name reserved. A server namedworkspacein any configuration is skipped at load time with a warning asking you to rename it./mcppanel tool count. The/mcppanel now shows the tool count next to each connected server and flags servers that advertise the tools capability but expose no tools.streamable-httpas alias forhttp. The MCP spec usesstreamable-httpas the transport name, so configurations copied from server documentation can use eitherstreamable-httporhttpin thetype:field — both work identically.
Recent additions (2026-06-28 watchlist sweep)
New MCP client features in Claude Code as of v2.1.186–v2.1.193, sourced from ai-research/watchlist-snapshots/code-claude-com-docs-en-mcp-2026-06-28.md:
claude mcp login / mcp logout(v2.1.186) — Authenticate or clear credentials for a configured MCP server directly from your shell, without entering the interactive/mcpmenu in a running session. Useful for servers requiring OAuth (e.g., GitHub MCP, Slack MCP): runclaude mcp login <server-name>, complete the auth flow in your browser, and credentials persist for subsequent sessions.claude mcp logout <server-name>clears stored credentials.list_changed— dynamic tool registration — Servers that declare thelist_changedcapability can add or remove tools during a session without restarting. Claude Code subscribes to tool-list change notifications and updates its available tool set on the fly. Enables servers that lazily register tools after an OAuth handshake completes or after discovering project context.- Automatic reconnection with exponential backoff — Claude Code automatically reconnects to MCP servers after disconnection (network drop, server restart). Reconnection is transparent and does not require restarting the session.
- 5-minute idle timeout (
CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT) — MCP servers not called for 5 minutes are marked idle. Override withCLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT=<seconds>in your environment orsettings.json. Useful when a server has expensive startup cost and you want to keep it warm for longer.
Related
- essential-mcp-servers — high-value MCP servers to set up first (GitHub, Context7, Playwright, Sentry, Postgres, Draw.io)
- cli-vs-mcp-tool-selection — runtime tool-selection decision framework with three worked exercises
- connectors — Anthropic-managed pre-built MCP servers (the curated subset)
- managed-agents-self-hosted-sandboxes-mcp-tunnels — Managed Agents +
tunnel.anthropic.comfor exposing internal MCP servers to cloud agents - nate-herk-every-level-of-claude — places MCP at Level 4 of the 5-level Claude mastery framework, with the CLI-first caveat
- skills-vs-mcp-vs-plugins — extensibility-layer decision (MCP = kitchen, skills = recipes, plugins = meal kits)
- plugins-and-marketplaces — many MCP servers ship as plugins for one-click install
Try It
- Inspect your current setup. Look at
.mcp.jsonin your project root and~/.claude/for user-scope config. Run/contextin Claude Code to see how much of your context window MCP schemas are consuming. - Start with the highest-ROI server. If you have zero MCP servers configured, add GitHub MCP first — repository operations cover the most common cases. Add Context7 to user scope for documentation lookup across every project.
- Apply the decision rule to every server you’ve enabled: does the model already know how to do this from CLI knowledge it has from training? If yes (local git, local filesystem), the server may be net-negative on context. If authentication, state, or org controls are involved (Slack, Notion, Postgres), the schema cost almost always pays for itself.