What is an MCP client?
An MCP client is the component inside an AI application that talks to one MCP server. The host app creates a client per server; the client sends JSON-RPC requests, attaches the protocol version and its capabilities to each, routes results back to the host and keeps that server separate from the others.
Part of Glossary: the terms behind MCP, coding agents and shared pages, defined plainly.
The host app reads its config and creates one MCP client for each server listed there.
The client opens the transport: it starts a local server as a subprocess, or prepares to POST to a remote server's URL.
Every request it sends carries _meta with the protocol version and the client's capabilities, such as elicitation, so the server needs no memory of past calls.
It asks what the server offers (tools/list and friends) and hands that to the host, which decides what the model sees.
When a result says input is required, the client gathers the answer from you or the model and retries the same request with a new id.
Source: MCP specification: architecture
MCP client versus MCP host
People say "Claude Code is an MCP client". In the specification's terms, Claude Code is the host, and it holds one MCP client for each server you configured. The distinction matters because the two have different jobs. The host owns the model, the conversation and your consent. The client owns one connection: it frames messages, tracks request ids, declares capabilities and forwards responses. In practice the host and its clients ship as one program, so the everyday usage is not wrong, just imprecise. Keep the spec meaning in mind when you read error messages or SDK docs, where "client" means the per-server connector.
Example: what a client sends
On the stdio transport the client launches the server and writes one JSON-RPC message per line to its stdin. On Streamable HTTP each message is its own POST to the server's single MCP endpoint, with an Accept header that allows both application/json and text/event-stream, because the server may answer with a plain JSON object or stream progress notifications before the final response. Either way the body carries the same metadata:
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" },
"io.modelcontextprotocol/clientCapabilities": {}
}
The client never sends a JSON-RPC response, because in this revision servers do not initiate requests. When a server needs your input, it returns a result whose resultType is input_required; the client collects the answer and retries the original request with a new id, echoing the server's opaque requestState back unchanged.
Where it shows up in practice
You meet the client when something goes wrong. "Needs authentication" means the client's first request to a remote server was turned away and it has to run the sign-in flow. A local server that exits means the client should restart it and retry, which the spec allows because no state was lost. A tool missing from the list may be the client dropping a definition with an invalid header annotation, which it must do rather than fail the whole server. And the client is the layer the spec asks to show you tool inputs before they go out, to validate results before they reach the model, and to apply timeouts.
Common mistakes
- Sharing one client across servers. The spec is explicit: each client communicates with exactly one server. The 1:1 relationship is what keeps servers from seeing each other's traffic.
- Trusting tool annotations. Behaviour hints come from the server and must be treated as untrusted unless the server is trusted. The client should not relax confirmations because of them.
- Falling back to the old handshake on any error. A modern server rejects an unsupported version with a specific error that lists what it supports. The client should retry with one of those, and only fall back to
initializewhen the error is not a recognised modern one.
FAQ
- Is Claude Code an MCP client?
- In everyday speech, yes. In the specification's terms Claude Code is a host, and it creates one MCP client for each server you configure. The client is the per-server connector inside the app.
- How many servers can one MCP client connect to?
- Exactly one. The specification gives each client a 1:1 relationship with a server. An app that talks to five servers holds five clients.
- Does an MCP client need to keep a session open?
- Not since the 2026-07-28 revision. Each request carries its protocol version and capabilities, so the client can send requests independently. On stdio it keeps the child process running; on HTTP each message is a separate POST.
Stop sending HTMLover Slack.
Create an account in a minute, connect your coding agent, and make your first board.