1 Host ↔ Client ↔ Server architecture — animated JSON-RPC flow
MCP (Model Context Protocol — model context protocol) circulates messages JSON-RPC 2.0 between a Host (the application), Customers (one per server — strict 1:1 relationship) and Servers (tool suppliers). Run a scenario and watch each real message pass through the wire.
🖥️ HOST
🔗 CUSTOMER
stdio (JSON-RPC / stdin-stdout)
⚙️ SERVER
id + expected response · notification = without id ·
the negotiation of capacities in the handshake guarantees the scalable compatibility .
2 · Tool, Resource or Prompt? The primitive selector
Exam Question #1: The correct primitive does not depend on "reading or writing", but of who controls the summon . Describe your use case by responding to the questions — or load a pre-filled case — and get the justified recommendation.
1. Does the operation modify a state or trigger a side effect (write, send, refund, etc.)?
2. Who should decide the time of invocation?
3. Should the data notify its changes continuously?
3 · stdio vs Streamable HTTP — the transport comparison
Answer the five architectural questions: each answer tips the scales. Reminder : SSE alone is depreciated — replaced by Streamable HTTP.
Reference matrix (to know for the exam)
| Criteria | stdio | HTTP streamable |
|---|---|---|
| Location | Same machine as host | Remote/cloud machine |
| Users | 1 (local) | N (shared) |
| Authentication | Legacy from the operating system | OAuth 2.1 / tokens bearer |
| Local resources | Direct access | Impossible (or via tunnel) |
| Deployment | With the host application | Web service operated |
| Latency | Minimal (no network) | Network dependent |
| Logging | stderr only (stdout = JSON-RPC stream!) | Standard application logs |