The four architectural layers
You can understand an MCP system as four layers:
The external system may be an API, database, SaaS platform, file system, or internal service. It is not itself required to implement MCP when an MCP server wraps it.
MCP host
The host is the application the user interacts with. It may be an AI assistant, coding environment, desktop application, or internal agent platform. The host typically:- Creates and manages MCP clients
- Controls which servers can connect
- Coordinates model interactions
- Presents permission and approval interfaces
- Combines context from approved sources
- Enforces application-level security policies
MCP client
An MCP client is the protocol component inside the host. Each client normally maintains a one-to-one connection with a server. It:- Initializes the session
- Negotiates supported capabilities
- Routes requests, responses, and notifications
- Tracks the server connection
- Preserves isolation from other server connections
MCP server
An MCP server provides context or actions to clients. A server may run as a local process or as a remote service. It can expose:- Tools that the model can request
- Resources that the application can read
- Prompts that users can select
Server and client features
MCP supports features on both sides of the connection. Common server features include tools, resources, and prompts. Client features can include roots, sampling, and elicitation. These are not assumed. The client and server declare supported capabilities during initialization.Capability negotiation
Capability negotiation lets both sides agree on available protocol features. During initialization:- The client declares the features it supports.
- The server declares the features it supports.
- Both sides use only the capabilities available for that session.
Message layer
MCP messages use JSON-RPC 2.0 structures:- Requests expect a response.
- Responses contain a result or error.
- Notifications do not expect a response.
stdio for local processes or Streamable HTTP for remote services.
Read The MCP specification for the normative protocol requirements.
Transport layer
The transport moves messages between the client and server. The standard transports are:stdio- Streamable HTTP
stdio commonly connects a host to a child process on the same machine. Streamable HTTP supports network-accessible servers and normal HTTP infrastructure.
Transport choice affects deployment, authentication, latency, and operational responsibility. Compare these tradeoffs in Local vs remote MCP.
Security boundaries
The host-client-server design creates important boundaries:- Servers should not automatically receive the full conversation.
- One server should not see another server’s data.
- The host should control user consent.
- Tool descriptions and results should be treated as untrusted input.
- Sensitive actions should require clear authorization.
- Servers should apply least-privilege access to underlying systems.