How to connect MCP servers to each harness and what their tools can do once connected. The protocol table at the end shows which parts of the MCP specification each client supports.
Setting up a server
| Question | Claude Codechecked at 2.1.299 |
|---|---|
| Add a server | Run Put Plugins can also bundle servers in a plugin-root |
| Transports | Claude Code supports stdio, Streamable HTTP (
2.1.307 retries a mid-call HTTP disconnect only for readOnlyHint/idempotentHint tools, reducing duplicate writes. This is distinct from Tasks lifecycle recovery. |
| Where configs live, and project trust | Local scope (the default) and user scope live in
|
| Sign in or pass credentials | For OAuth 2.0 on HTTP and SSE servers, run In a remote server's
A project or local 2.1.307 fixes locked-keychain and sleep-during-connect authentication/status failures in print/headless sessions; publisher-reported recovery, not a new transport. |
Using its tools
| Question | Claude Codechecked at 2.1.299 |
|---|---|
| Approve, allow or block tools | MCP tool calls go through the normal permission prompt unless a rule or mode approves them. Add rules under An allow glob must start with a literal Tools marked Plugin server tools are named |
| Tool search & code mode | Tool search is on by default: only tool names and server instructions load at startup, and Claude loads full definitions on demand through the Server instructions and upfront tool descriptions are cut at 4,096 characters, and deferred tool descriptions at 16,384 ( Tools whose full name exceeds 128 characters, or whose schema is invalid, are left out. To filter tools, use deny rules such as |
| Output size and timeouts | Tool output above 10,000 tokens shows a warning. Results over HTTP and SSE requests also have a per-request timer of at least 60 seconds to the first response byte. A response or WebSocket message over 16 MiB fails. Error text over about 11,000 characters is trimmed to its first and last 5,000 characters. |
| Resources | Type MCP Apps UI resources ( |
| Prompts | Server prompts appear in the Arguments are split on whitespace, so each one must be a single token. Prompts from a server named |
| When a server asks you or the model | Partly Elicitation is supported in both modes: form requests open a dialog, and URL requests ask before opening a link in your browser. The If a server stops connecting after the v2.1.287 URL-elicitation change, add 2026-10-23: exact schema coverage, backend answer validation after hook mutation and unattended print-mode elicitation remain unverified; see docs/research/mcp-elicitation.md. 2026-10-24: task elicitation is interactive-terminal only; non-interactive tasks requesting input are canceled without Elicitation hooks or the SDK callback. This does not establish ordinary print-mode elicitation behavior. |
Running servers
| Question | Claude Codechecked at 2.1.299 |
|---|---|
| Status, enable, reconnect, debug | Use Remote servers reconnect automatically, with 5 attempts and exponential backoff; stdio servers do not. 2.1.305 changes managed stdio allowlisting: allowedMcpServers no longer filters managed-mcp.json servers using ${VAR} only in env; deniedMcpServers is the explicit opt-out. Supplied cloud/SDK setMcpServers definitions no longer get replaced by same-named local settings entries. 2.1.309 fixes disabled servers reconnecting during later permission prompts in print/SDK sessions. |
| Run the harness as an MCP server | Yes. Since v2.1.271, a running tool call sends a progress update every 30 seconds. |
Protocol features
| Feature | Claude Codeprotocol 2026-07-28, with fallback to older servers |
|---|---|
| Roots Let a server discover the client-approved filesystem roots; this is not the server process working directory. deprecated in the current spec | Supported Answers roots/list with the launch directory plus every --add-dir / additionalDirectories path, and sends notifications/roots/list_changed when that set changes (v2.1.203+). Source |
| Sampling Let a server request an LLM interaction through the host, with user review and model preferences. deprecated in the current spec | Not documented The MCP docs do not describe sampling/createMessage support. |
| Sampling with tools Let the sampling loop invoke tools recursively; do not confuse this with ordinary server tool calls. deprecated in the current spec | Not documented |
| Elicitation (generic) Server-originated MCP input requests, distinct from permission approvals, model ask-user tools, generic chat forms or MCP Apps. Check each mode and host separately. | Supported Both modes documented. Elicitation hooks can return accept/decline/cancel with structured content and bypass ElicitationResult; result hooks can replace user replies. Exact schema coverage, validation after hooks, and unattended print-mode behavior are unverified. Rechecked 2026-10-24: modern connections explicitly advertise both modes. Non-interactive task elicitation cancels the task without hooks/callbacks; ordinary print-mode behavior remains separately unverified. Source |
| Form elicitation Collect typed property-keyed answers using the restricted elicitation schema, with accept/decline/cancel. Schema parsing, UI validation and backend answer validation are separate claims. | Supported Structured property-keyed answers. Docs do not establish all schema constraints or backend validation. Follow MCP prohibition on sensitive form data despite the password example in harness docs. Source |
| URL elicitation Direct the user to an external interaction without collecting its sensitive data. Acceptance is not completion; track legacy completion notifications separately from current MRTR retry. | Supported On 2026-07-28 connections since v2.1.281 and on 2025-11-25 connections since v2.1.287; URLs over roughly 8,000 escaped characters can only be declined. Source |
| Prompts Expose reusable, argument-aware server prompts through the client UI. | Supported Listed as /server:prompt (MCP) and runnable as /mcp__server__prompt with whitespace-split arguments. Source |
| Resources List and read server-provided context independently from tool execution. | Supported @server:uri mentions plus built-in list/read resource tools for Claude. Source |
| Resource templates Discover and fill parameterized resource URIs. | Partly Claude Code fetches resources/templates/list for @-mention autocomplete; the docs don't describe how template parameters are filled. Source |
| Argument completion Complete prompt arguments and resource-template parameters without an LLM call. | Not documented No documented completion/complete support for prompt or template arguments. |
| Progress Correlate monotonic progress with a request; UI display and timeout extension are separate behaviors. | Supported Progress is shown on the tool call and its background task, and resets the idle timeout but not the per-server wall-clock timeout. Source |
| Cancellation Cooperatively cancel in-flight protocol requests and propagate intent to the handler. | Partly Stopping a backgrounded MCP call from /tasks cancels it; the docs warn the server may still finish the work. Source |
| Protocol logging Deliver correlated server logs through MCP rather than relying on process stderr. deprecated in the current spec | Not documented Docs mention a per-server debug log but not MCP logging/setLevel or notifications/message. |
| Subscriptions Receive correlated updates over a long-lived request. | Partly On the v2 runtime, servers on revision 2026-07-28 deliver list_changed over a held-open stream; resource content subscriptions aren't documented. Source |
| Multi-round-trip requests Pause a request for sampling, elicitation, or roots input and retry it with opaque request state. | Not documented |
| Tasks (legacy) Durable polling, status, result, and cancellation state from the 2025-11-25 experimental protocol era. earlier experimental spec | Not documented The documented 2026-07-28 extension does not establish legacy 2025-11-25 Tasks support. /tasks also contains ordinary background calls. |
| Tasks extension Asynchronous tool results using io.modelcontextprotocol/tasks on 2026-07-28 connections, separate from legacy Tasks and client backgrounding. separate protocol extension | Partly October 24 documentation: public beta from 2.1.304 with eligible sessions and 2026-07-28 connections. Superseding 2.1.319 publisher notes: terminal tasks work without feature-flag fetching, including third-party providers and telemetry-off sessions; immediate backgrounding can be disabled with CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND, tasks with CLAUDE_CODE_DISABLE_MCP_TASKS=1. Earlier SDK/open-input and desktop/VS Code/one-shot exclusions have not been re-audited; no runtime probe. Source |
| Events and agent wake-up External updates that can trigger agent work. ChatGPT Work documents signed webhook subscriptions; Codex has a separate hosted-app event stream. Receiving an event and starting a model turn are separate capabilities. separate protocol extension | Not documented Not audited for this harness/version. Other notification or resource-subscription support does not establish event-triggered agent work. |
Notes and sources
Claude Code, 14 sources
- Dynamic list changes are documented for tools, prompts, and resources.
- The reviewed documentation does not establish sampling, completion, content subscriptions, general current subscriptions/MRTR, legacy Tasks, or a protocol-log UI.
- 2.1.304 enables tool search by default behind custom ANTHROPIC_BASE_URL gateways, retrying without it after HTTP 400/422. New cloud conversations no longer wait on local stdio MCP servers from claude.ai-synced plugins unless alwaysLoad: true. This hosted startup change does not establish another transport capability.
- 2026-10-24 documentation recheck supersedes the announcement-only assessment: Tasks extension public beta is documented for 2.1.304+, subject to session and feature-flag gates. Documentation evidence only; no source inspection or runtime probe. Historical elicitation evidence is retained.
- 2.1.310 tells non-interactive sessions not to repeat a timed-out MCP call whose elicitation was unanswered. 2.1.311 fixes interrupts blocked by resource reads, late-connected server tools in subagents, local-scope project labels below repository roots, and misleading remote authentication status. These fixes do not establish broader Tasks session support.
- 2.1.319 publisher update supersedes the October 24 terminal feature-fetch gate: terminal MCP tasks can run without feature-flag fetching, including third-party providers/gateways and DISABLE_TELEMETRY. Tasks move to background immediately; CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND keeps the call waiting, and CLAUDE_CODE_DISABLE_MCP_TASKS=1 disables tasks. This does not establish legacy Tasks compatibility or remove the separately documented SDK/desktop/print-mode restrictions. Documentation only; no wire/runtime probe.
- 2.1.321 publisher security fixes: MCP OAuth redirects no longer send secrets to another host; oversized (>16 MiB) PreToolUse mcp_tool hook replies refuse the tool instead of skipping the hook; reconnect/directory-change tool-loading races are repaired. These are documentation findings, not a changed protocol declaration.
- 2.1.326 publisher notes fix parallel long MCP calls reading another call's saved result, exact-name tool search choosing a different server, and root anyOf/oneOf input schemas showing only one branch. 2.1.327 retries most remote hostname/HTTPS servers after extended outages for about a day and logs elicitation mode/action/field names rather than contents. 2.1.328 fixes root anyOf/oneOf/allOf tools disappearing and excludes invalid-schema tools on third-party providers or with telemetry/flags off. Publisher evidence only; no interoperability probe.