The Host-Client-Server Architecture
Overview
MCP uses three primary components: the host, the client, and the server.
The host is the application in which the user interacts with the AI system. A host can be a desktop assistant, an IDE, a workflow automation application, an AI agent, or a custom large-language-model application. The host manages the user interface, permissions, model interaction, and connections to servers.
The MCP client lives inside the host. It invokes the protocol and maintains the connection to an MCP server. The client sends requests, receives server responses, and returns the relevant information to the host's model workflow. A host can contain clients that connect to different servers, while each client maintains its connection with a server.
The MCP server is a program or service that exposes capabilities. A server can provide access to market data, time and time-zone conversion, document processing, databases, version-control systems, customer systems, browser controls, local files, or other external services. Servers can also manage their tool registry, authentication requirements, and response formatting so the connected application receives structured results.
The complete request flow is:
- The user enters a request in the host.
- The host sends the request to the model.
- The model determines that it needs external help.
- The MCP client sends a request to the relevant server.
- The server executes a tool, retrieves a resource, or provides a prompt.
- The server returns the result.
- The client passes the result back to the host.
- The model uses the result to complete its response or continue the workflow.
A market-data example shows the roles clearly. The desktop or coding application is the host. The MCP client is the protocol component inside that application. The market-data MCP server exposes functions for real-time or historical prices. When the user asks for a chart of coffee prices over a period of years, the model selects the relevant function, the client invokes it, the server returns the data, and the host uses the result to produce the requested output.
This separation makes the architecture modular. The host can be replaced without rebuilding the server, and the server can be reused by another compatible host. A server created for one workflow application can also be connected to a desktop application or a custom agent.
In more advanced arrangements, both client-side and server-side components can use their own language models. This can support richer capability negotiation and interaction, similar to the way an editor negotiates capabilities with extensions. It also illustrates that MCP is an architecture for communication, not a requirement that all reasoning occur in one place.