Three roles: host, client, Server
MCP has three distinct roles, and understanding them is key to everything else. Let's walk through each one using our DevTools AI Assistant example.
The Host is the AI application itself: Claude Desktop, Cursor, your DevTools Assistant. It's the user-facing app that contains one or more MCP clients. Think of it as the building that houses everything. The host orchestrates the conversation: it receives user queries, passes them to the LLM, and coordinates tool calls through its clients.
The MCP Client lives inside the host. Each client maintains a 1:1 connection with exactly one MCP server. Its job is protocol management: connecting, discovering what the server can do, and routing tool calls. If your host talks to 3 servers, it has 3 MCP clients.
Exactly. Each MCP client has a strict 1:1 relationship with one server. If you need to connect to three different servers, your host creates three separate clients, one per server. This keeps connections isolated so a problem with one server does not affect the others.
The MCP Server is a lightweight program that wraps one data source or service. This is where the actual work happens: searching arXiv, querying Wikipedia, reading files. Each server exposes its capabilities through the MCP protocol, and any MCP client can use them.
MCP architecture: host, clients, and servers
The host contains multiple clients, each connected 1:1 to a server.
Good question. The separation matters because a single host can manage multiple clients simultaneously. Claude Desktop might connect to a filesystem server, a database server, and a web search server all at once. Each client handles its own server connection independently. The host coordinates them all, but each client-server pair is isolated.
Here's the key insight: the LLM never talks directly to an MCP server. The host acts as orchestrator: it receives the LLM's tool call request, figures out which client owns that tool, routes the call through the right client, gets the result back, and feeds it to the LLM. The LLM just sees tools; it has no idea which server provides them.
Quiz: Quiz
Loading practice…
Checkpoint: MCP foundations check
Loading practice…