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 | Codex CLIchecked at 0.162.1 | Claude Codechecked at 2.1.299 | Cursor Agentchecked at 2026.10.12-d47ca18 | OpenCodechecked at 2.0.28 | pichecked at 1.2.0 |
|---|---|---|---|---|---|
| Add a server | Run
Plugins can bundle servers in | Run Put Plugins can also bundle servers in a plugin-root | There is no The CLI and the editor read the same The installed binary is | Run | Run
Entries from Claude Desktop, Claude Code or Cursor can be copied as-is; VS Code, Codex and OpenCode entries need small conversions. Source |
| Transports | Codex supports stdio servers ( | Claude Code supports stdio, Streamable HTTP (
| The CLI supports stdio ( | Local servers use stdio and remote servers use Streamable HTTP with an absolute URL. The legacy HTTP+SSE fallback from 1.x is gone, and WebSocket is not supported. Source | Partly Stdio ( |
| Where configs live, and project trust | Servers live in Trusting the project is the only gate: Codex has no separate per-server approval prompt for project-defined servers. Source | Local scope (the default) and user scope live in
| User servers live in The CLI also finds Team MCP servers configured in the dashboard are not available in ACP mode. Source | Servers can be defined in global | User servers live in There is no managed or enterprise-level MCP config file. Source |
| Sign in or pass credentials | For HTTP servers, you can set
| For OAuth 2.0 on HTTP and SSE servers, run In a remote server's
A project or local | For OAuth servers, run Over SSH, the CLI prints port-forwarding instructions for the OAuth callback. Interpolation works in | OAuth is on for every remote server unless | Remote servers that answer 401 trigger OAuth: sign in from OAuth is only used for HTTP servers without an Authorization header.
|
Using its tools
| Question | Codex CLIchecked at 0.162.1 | Claude Codechecked at 2.1.299 | Cursor Agentchecked at 2026.10.12-d47ca18 | OpenCodechecked at 2.0.28 | pichecked at 1.2.0 |
|---|---|---|---|---|---|
| Approve, allow or block tools | Each server takes a With | 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 | By default MCP tool calls ask for approval, and the prompt can allowlist that tool. To pre-allow tools, add Server-level approval is separate: Enterprise admins can limit which servers and tools may run from the dashboard MCP Allowlist, and the CLI enforces it. Source | MCP tools run without asking by default because every agent starts from an allow-all base policy. Add ordered | Partly Pi has no approval prompt for MCP calls (or any tool calls); they run immediately. To restrict tools, set |
| Many servers or tools | On models that support tool search, all MCP tools are deferred behind a built-in Tool search can't be turned off: the old Tool input schemas larger than | 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 | Cursor loads MCP tools on demand. The agent gets only tool names plus a way to look up full tool definitions when needed, so many servers don't flood the prompt. There is no documented tool-count cap. To trim the set, disable whole servers with When a tool seems to be missing, the agent refreshes the server's tool list. A call to a nonexistent tool returns the list of available tools. Source | Code Mode is the default: MCP tools are not put on the model's native tool list but grouped by server inside the Denying the | By default ( Tool names are No fixed limit on the number of servers or tools is documented. Source |
| Output size and timeouts | Set When a tool call times out, the model gets an error result instead of tool output. Source | 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. Source | Large MCP text output is saved to a file instead of being truncated. In CLI 2026.10.12, text over 40,000 bytes goes to a file under Cursor's per-project None of these limits can be configured in Image content is passed to the model as an image. Source | Timeouts are set under | Text results over 20 KB reach the model with the middle cut out around a truncation marker, and the full text is saved to a temp file named in the result; codemode scripts get the untruncated result. Each request has a per-server The connection handshake uses the same per-server timeout; HTTP connects retry twice on network errors and 408/429/5xx. Source |
| Resources | Partly Yes, but only the model uses them. Codex gives the model built-in | Type MCP Apps UI resources ( | Partly Only the agent can use server resources in the CLI. It lists them and fetches one by URI, optionally saving it to a path inside the workspace, and these reads follow the same approval rules as other MCP calls. You cannot @-mention a resource, and resource templates are not offered. The editor documents resources as "read and referenced"; the CLI exposes them only to the agent. Source | Partly The agent can list and read server resources with the built-in | Partly Resources are available to the model, not as @-mentions: when a server offers them, Pi adds MCP Apps resources ( Resource subscriptions are not used. Source |
| Prompts | Not supported No. Codex never lists or fetches MCP server prompts, so they don't show up as slash commands or anywhere else in the UI. Source | Server prompts appear in the Arguments are split on whitespace, so each one must be a single token. Prompts from a server named | Partly The CLI shows a server's prompts in its | Yes. Each prompt becomes a command named | Not supported No. Pi does not list or use MCP server prompts, so they do not appear as slash commands or anywhere else. Source |
| When a server asks you or the model | Partly Elicitation works: Codex advertises both form and URL modes, shows form prompts in the TUI and opens validated URLs in a link view. Elicitations are declined automatically when | 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 | Not supported Not in the CLI. It advertises form elicitation but has no prompt for it, so every elicitation request is declined, and URL-mode requests are declined too. It offers no sampling and no roots. The editor documents elicitation and roots as supported. Source | Partly Servers can ask for input through elicitation: form requests open as a form you fill in, and URL requests open as an external link to complete. Servers get | Partly Servers can see your roots: Pi reports the session directory as the single root. Servers cannot ask you for input (no elicitation) and cannot use the model (no sampling); Pi declares neither capability. Source |
Running servers
| Question | Codex CLIchecked at 0.162.1 | Claude Codechecked at 2.1.299 | Cursor Agentchecked at 2026.10.12-d47ca18 | OpenCodechecked at 2.0.28 | pichecked at 1.2.0 |
|---|---|---|---|---|---|
| Status, enable, reconnect, debug | Use
Setting | Use Remote servers reconnect automatically, with 5 attempts and exponential backoff; stdio servers do not. Source |
There is no separate reconnect command; to restart a server, disable and re-enable it. The "MCP Logs" output panel exists only in the editor. Source |
| Use
Installing an extension that registers |
| Run the harness as an MCP server | Not supported No. | Yes. Since v2.1.271, a running tool call sends a progress update every 30 seconds. Source | Not supported No. Cursor CLI cannot run as an MCP server. Its server mode is ACP ( | Not supported No. OpenCode 2.x is only an MCP client and has no MCP server mode. Other tools integrate through its background server's HTTP API instead. Source | Not supported No. Pi cannot run as an MCP server; for programmatic use it offers its own JSON event stream ( |
Protocol features
| Feature | Codex CLIprotocol 2025-06-18 | Claude Codeprotocol 2026-07-28, with fallback to older servers | Cursor Agentprotocol 2025-11-25 | OpenCodeprotocol 2025-11-25; 2026-07-28 opt-in per server | piprotocol 2025-11-25 |
|---|---|---|---|---|---|
| Roots Let a server discover the client-approved filesystem roots; this is not the server process working directory. deprecated in the current spec | Not supported The initialize request advertises only elicitation (plus OpenAI extensions); there is no roots capability or roots/list handler. Source | 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 | Not supported In CLI 2026.10.12 the MCP client does not declare the roots capability, so servers cannot list roots. The docs table lists Roots as supported, which describes the editor. Source | Supported Answers | Supported Advertises the roots capability and answers roots/list with the session directory; the list does not change during a session (no roots list_changed). Source |
| Sampling Let a server request an LLM interaction through the host, with user review and model preferences. deprecated in the current spec | Not supported No sampling capability is advertised and sampling/createMessage is not handled. Source | Not documented The MCP docs do not describe sampling/createMessage support. | Not supported Sampling is not in Cursor's support table, and the CLI does not declare the sampling capability. Source | Not supported No | Not supported The client declares only roots; sampling/createMessage gets a method-not-found error. Source |
| 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 supported Source | Not documented | Not supported There is no sampling, so there is no sampling with tools either. Source | Not supported Source | Not supported Source |
| Elicitation (generic) Record clients that document elicitation without establishing which interaction modes they implement. | Supported Form and URL modes are advertised by default (stable auth_elicitation feature). Requests are auto-declined when approval_policy is never or granular.mcp_elicitations is false. Source | Supported Interactive dialog; the Elicitation and ElicitationResult hooks can answer or override it. Source | Partly Cursor documents elicitation, and the editor lets you answer it. The CLI advertises form elicitation but has no way to show the form, so it declines every request. Source | Supported Requests appear as forms in OpenCode's UI. Source | Not supported No elicitation capability or handler. Source |
| Form elicitation Let a server request structured user input with accept, decline, and cancel outcomes. | Supported Source | Supported Source | Partly In CLI 2026.10.12 the client advertises | Supported Schema fields become form fields; accept or cancel is returned. Source | Not supported Source |
| URL elicitation Let a server send the user through an external interaction and safely resume afterward. | Supported The TUI shows a link view for validated external URLs. Source | 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 | Not supported The CLI does not advertise URL mode and declines URL-mode requests. Source | Supported Shown as an external-link form; legacy | Not supported Source |
| Prompts Expose reusable, argument-aware server prompts through the client UI. | Not supported The client never calls prompts/list or prompts/get; server prompts are not exposed as commands. Source | Supported Listed as /server:prompt (MCP) and runnable as /mcp__server__prompt with whitespace-split arguments. Source | Partly The CLI lists a server's prompts in its | Supported Prompts become | Not supported Pi never lists or gets server prompts; it uses only tools and resources. Source |
| Resources List and read server-provided context independently from tool execution. | Supported Model-driven through built-in list_mcp_resources and read_mcp_resource tools; no @-mention picker. Source | Supported @server:uri mentions plus built-in list/read resource tools for Claude. Source | Supported In the CLI the agent lists and reads resources itself (List MCP Resources / Fetch MCP Resource tool calls). You cannot @-mention them. Source | Supported Available to the agent through | Supported Exposed to the model as list_mcp_resources and read_mcp_resource tools; MCP Apps (ui://) resources are omitted. Source |
| Resource templates Discover and fill parameterized resource URIs. | Supported The model lists templates with list_mcp_resource_templates and reads a filled URI with read_mcp_resource. Source | Partly Claude Code fetches resources/templates/list for @-mention autocomplete; the docs don't describe how template parameters are filled. Source | Not supported Only concrete resources from | Supported Templates are listed alongside resources; the agent expands | Supported Listed through the list_mcp_resource_templates tool. Source |
| Argument completion Complete prompt arguments and resource-template parameters without an LLM call. | Not supported Source | Not documented No documented completion/complete support for prompt or template arguments. | Not supported The CLI never asks servers for argument completions. Source | Not supported The connection exposes no completion call. Source | Not supported Pi never sends completion/complete. Source |
| Progress Correlate monotonic progress with a request; UI display and timeout extension are separate behaviors. | Partly Server progress notifications are accepted and written to Codex's log only; model tool calls carry no progress token and nothing is shown in the UI or extends the timeout. Source | 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 | Not supported In CLI 2026.10.12, tool calls carry no progress token, so server progress is neither shown nor used to extend timeouts. Source | Partly Progress keeps long calls alive; it is not displayed. Source | Supported Progress is shown as tool updates and resets the request timeout. Source |
| Cancellation Cooperatively cancel in-flight protocol requests and propagate intent to the handler. | Partly Server-sent cancellation closes a pending prompt, and Codex cancels its own long-lived event-stream requests; general tool-call cancellation is not wired to notifications/cancelled. Source | Partly Stopping a backgrounded MCP call from /tasks cancels it; the docs warn the server may still finish the work. Source | Not supported In CLI 2026.10.12, tool calls are sent without an abort signal, so stopping the agent does not send | Supported Requests carry an abort signal that cancels the in-flight request. Source | Supported Aborting or timing out a call sends notifications/cancelled; incoming cancellations abort server-to-client requests. Source |
| Protocol logging Deliver correlated server logs through MCP rather than relying on process stderr. deprecated in the current spec | Partly notifications/message is mapped to Codex's own log levels; logging/setLevel is never sent and nothing is shown in the UI. Source | Not documented Docs mention a per-server debug log but not MCP logging/setLevel or notifications/message. | Not supported The CLI neither sets a log level nor handles | Not supported No | Supported Server log notifications are appended to ~/.pi/agent/mcp.log (rotated at 5 MB); Pi does not send logging/setLevel. Source |
| Subscriptions Receive correlated updates over a long-lived request. | Not supported resources/subscribe is never sent; update and list_changed notifications are only logged. A separate events/stream extension is used only for the built-in ChatGPT apps server. Source | 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 | Not supported The CLI does not subscribe to resources. It does refresh tools when a server sends | Partly On 2026-07-28 connections the SDK keeps a | Not supported Pi never sends resources/subscribe. Source |
| Multi-round-trip requests Pause a request for sampling, elicitation, or roots input and retry it with opaque request state. | Partly Only for tools/call, and only with the under-development mcp_2026_07_28 feature (off by default) against a server that negotiates 2026-07-28. Source | Not documented | Not supported The client speaks protocol revisions up to 2025-11-25, which predate multi-round-trip requests. Source | Partly On 2026-07-28 connections the SDK retries a call after elicitation input; requires | Not supported Newest negotiated revision is 2025-11-25, which predates multi-round-trip requests. Source |
| Tasks Durable polling, status, result, and cancellation state from the 2025-11-25 experimental protocol era. earlier experimental spec | Not supported No tasks capability is advertised and no tasks/* requests are made. Source | Not documented The 'MCP task' in /tasks is Claude Code's own backgrounding of slow tool calls, not the protocol's Tasks utility. | Not supported The client declares no tasks capability. Tools that require task-based execution fail. Source | Not supported No | Not supported No tasks capability is declared. Source |