Français

🔌 MCP in depth

Applied AI — Advanced Level · Session 5 · Yann Isola
Preparation Claude Certified Architect

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

Application (IDE, chat) — consent & policies

🔗 CUSTOMER

Managed by SDK — 1 client per server
Transportation
stdio (JSON-RPC / stdin-stdout)

⚙️ SERVER

Isolated process — Tools · Resources · Prompts
Choose a scenario above.
— JSON-RPC console: messages will appear here —
🎓 Certification reflexes: Client:Server relationship = 1:1 · query = 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.

Pre-filled cases:

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?

🎓 Pocket rule: Tool = the model decide · Resource = the app decides · Prompt = the user decided. ⚠ Trap: one reading triggered by the model remains a Tool .

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.

1. Where is the MCP server running in relation to the host?
2. How many users should the server serve?
3. What authentication mechanism is required?
4. Should the server directly access the user's local files or devices?
5. How will the server be deployed and operated?
0
stdio
local subprocess · JSON-RPC on stdin/stdout
0
HTTP streamable
remote · POST + stream · sessions · OAuth 2.1

Reference matrix (to know for the exam)

CriteriastdioHTTP streamable
LocationSame machine as hostRemote/cloud machine
Users1 (local)N (shared)
AuthenticationLegacy from the operating systemOAuth 2.1 / tokens bearer
Local resourcesDirect accessImpossible (or via tunnel)
DeploymentWith the host applicationWeb service operated
LatencyMinimal (no network)Network dependent
Loggingstderr only (stdout = JSON-RPC stream!)Standard application logs
🎓 Pocket rule: local files & single user → stdio · shared, authenticated, scalable service → HTTP streamable · “SSE” as common transport → wrong answer to the exam (deprecated).