The MCP client is an in-process library inside the host application, one per server, owning the JSON-RPC connection and surfacing server capabilities back to the host.
Imagine your AI app is a building with many phone lines. Each phone line goes to a different outside service: one to GitHub, one to your files, one to Slack. The phones are wired into the building's walls, not separate gadgets you carry around. Each phone follows the same dialing rules, but each one connects to only one outside service. That phone is an MCP client. There is one per connected service, and they all live inside the same building (the app). The building manager (the host) decides which services to call and what to do with the answers. The phones just handle the connection. This setup means if one outside service goes down, only its phone line breaks. The other lines keep working. And the dialing protocol stays simple because each phone talks to exactly one service.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
The MCP client is one of the three roles in the Model Context Protocol, alongside the host and the server. It is also the role most likely to be misunderstood, because it is not something the user installs or sees in the UI. The client is the protocol plumbing inside the host application.
This deep dive answers both parts of the question: where the client lives (inside the host, as a library) and why it is one to one with a server (isolation, simplicity, adoption speed). By the end you should be able to point at any MCP integration and identify which code is the client and which is the host.
Where the client lives: inside the host, as a library
Every working MCP integration has a host application. Claude Desktop is a host. Cursor is a host. Zed is a host. Claude Code is a host. The OpenAI Agents SDK with its MCP adapter is a host. Google Gemini CLI is a host. Each of these embeds one or more MCP clients inside its own process.
The client is implemented as a library the host imports. In TypeScript, you import @modelcontextprotocol/sdk. In Python, you import mcp. In Kotlin, Swift, Java, Rust, or C#, you use the corresponding official SDK. The host instantiates a client object, connects it to a server, and uses it for the life of the connection.
From the user's perspective, there is no visible artifact called 'the client.' You open Claude Desktop, you configure some servers, and the app talks to them. Internally, the host creates one client per server, and each client handles the protocol mechanics for that connection. The client is invisible to the user and that is by design.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Claude Desktop instantiates one client per server entry in its mcpServers config; five configured servers means five client objects running inside the Claude Desktop process.
- Cursor uses the TypeScript SDK to embed MCP clients; the editor process imports `@modelcontextprotocol/sdk` and creates a new client for each server it connects to.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy one client per server instead of one client multiplexing across many?
Isolation. A crashed or misbehaving server only takes down its own client connection, not every integration in the host. It also keeps the protocol simple: no multiplexing, no fan-out logic, no shared request-ID space. The host pays a small cost in object count for a big simplicity win.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Calling the client a separate application. It is a library inside the host, instantiated once per connected server. Three servers mean three client objects inside the same host process.
60 second bullets to scan on the way to the call.
Define the MCP client using the in-process and one to one properties.
Explain what the client does during the initialize handshake.
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.