Architecture
This chapter covers MCP participants, local versus remote deployment, and how the data and transport layers stack. Prefer the official architecture overview when details diverge.
Three participants
MCP is a client–server architecture. A Host is the AI application the user talks to. It creates one Client per Server. Each Client keeps a dedicated connection and hands context back to the Host.
“Server” means the program that serves context, wherever it runs.
One remote server can serve many clients (even many hosts). A local stdio server usually serves only the client that launched it.
Local vs remote
When Claude Desktop launches the filesystem server, that process is on the same machine—a local MCP server. The official Sentry server runs on Sentry’s platform over Streamable HTTP—a remote MCP server.
Rule of thumb: the capability must touch this disk or an intranet, and only you use it → stdio. The capability is shared with a team or public hosts → Streamable HTTP.
Two layers
MCP has two layers. Conceptually the data layer is inside and the transport layer is outside:
The data layer defines message shape and meaning:
- Discovery:
server/discoverreports supported versions, capabilities, and identity - Server features: Tools (actions), Resources (data), Prompts (templates)
- Client features: elicitation (ask the user for more input). Sampling is deprecated as of
2026-07-28 - Utilities: progress, cancellation, optional subscription notifications
The transport layer only moves bytes. The same JSON-RPC messages run on stdio or HTTP; see Transports.
Statelessness and discovery
The current spec makes the protocol core stateless: every request carries protocol version, client identity, and capabilities in _meta, so a server can handle that request alone. Send server/discover when you want a catalog first. It is not required before every call, but every server must implement it.
For operators, a remote server can sit behind a plain round-robin load balancer; sticky Mcp-Session-Id routing is no longer the protocol default. If your app still needs state across calls, return an explicit handle from a tool and have the model pass it back—clearer than hiding session state in the transport.
Older clients may still speak the initialize handshake. Official SDKs negotiate per connection. Write new servers against the current API.
What happens inside a host?
- The user configures servers (a command line or a URL)
- The host creates one client per server
- The client discovers tools, resources, and prompts and registers them
- When the model chooses a tool, the host sends
tools/callon that client - Results return to the conversation; the UI should let users approve dangerous calls
MCP does not decide how the model picks a tool in step 4. That is the host’s agent loop.