What MCP Actually Is (Architecture Diagram & Stdio vs. Streamable HTTP)
The Mental Model: JSON-RPC 2.0 Across Process and Edge Boundaries
Every conference talk mentions MCP, yet most tutorials stop at a local Stdio script that only runs on your laptop. In production, remote agents connect over Streamable HTTP at the edge.
export interface JsonRpcRequest {
jsonrpc: "2.0";
id: string | number;
method: "initialize" | "tools/list" | "tools/call";
params?: Record<string, unknown>;
}
export function createMcpResponse(id: string | number, result: unknown) {
return Response.json({ jsonrpc: "2.0", id, result });
}Production Architecture Takeaway
Use Stdio strictly for local CLI tools that need filesystem access. Use Streamable HTTP on Cloudflare Workers for remote multi-tenant agent tools.
how this course connects together.
Follow AJ from first principles to production-ready architecture.
