Host
The AI application. Creates and manages one client per server, enforces security policy, permissions, and user consent, aggregates context from multiple servers, and owns the user interface and conversation state.
flowchart TB subgraph Host["Host (AI application)"] C1[Client 1] C2[Client 2] C3[Client 3] end C1 -- "1:1 (stdio)" --> S1["Server A (local)"] C2 -- "1:1 (stdio)" --> S2["Server B (local)"] C3 -- "1:1 (Streamable HTTP)" --> S3["Server C (remote)"]
Host
The AI application. Creates and manages one client per server, enforces security policy, permissions, and user consent, aggregates context from multiple servers, and owns the user interface and conversation state.
Client
Connector inside the host. Maintains a dedicated 1:1 connection with exactly one server, attaches protocol version and capability metadata to requests, routes messages, and maintains the security boundary between servers.
Server
Exposes tools, resources, and prompts via MCP primitives. Operates independently with a focused responsibility, never sees the whole conversation, and can be local (stdio subprocess) or remote (Streamable HTTP).
| Transport | Where | How |
|---|---|---|
| stdio | Local | Client launches the server as a subprocess; newline-delimited JSON-RPC over stdin/stdout; server may log to stderr |
| Streamable HTTP | Remote | Client POSTs each JSON-RPC message to a single MCP endpoint; the server replies with plain JSON or a request-scoped SSE stream |
📝 Check your knowledge