03.02 · Concept
Hosts, clients and servers
Name the three roles and which one your code is in any given integration.
MCP integrations split into host, client and server roles. The host is the user-facing AI application, the client is the per-server protocol connection inside it, and the server exposes tools, resources or prompts. Your code’s role depends on where it sits in that integration, not whether it runs locally or remotely.
What this lesson answers
- what are host client server roles in MCP
- is my MCP code a host or server
- does MCP server mean cloud backend
Notes
In MCP there are three roles: host, client, and server. The host is the application the user is actually using, such as Claude Desktop, an IDE, or your own AI app. The client is the protocol component inside that host which maintains a connection to one MCP server. The server is a separate program or service that exposes capabilities such as tools, resources, or prompts to the host through the client connection.
A useful mental model is a browser with tabs talking to websites, but adapted for AI integrations. The host is the browser-like application coordinating the user experience and the…
Common questions
- What is the host in MCP?
- The host is the application the user directly interacts with. It owns the user experience, coordinates the model, and decides which connected capabilities are available. An AI desktop app, editor integration, or custom AI product can be the host when it creates and manages MCP connections.
- What does an MCP client do?
- An MCP client is the protocol component that connects a host to one MCP server. It is not usually the whole application. If you are implementing the connection layer inside an AI app, that piece is the client, while the surrounding app remains the host.
- Is an MCP server the same as the LLM provider?
- No. In MCP, server is a protocol role for exposing capabilities such as tools, prompts or resources. It might wrap a database, filesystem, internal API or workflow. It can run on the same machine as the host or somewhere remote, but its location does not define the role.
Short definition: what is Hosts, clients and servers?