JSON-RPC Wire Simulator
MCP Spec (2025-2027) • FastMCP & TypeScript • Swarm Guardrails & A2A

Model Context Protocol (MCP) & Agents

Step through the JSON-RPC 2.0 wire handshake, compare Stdio vs Streamable HTTP transports, build FastMCP servers, and simulate bounded swarms with HITL approval gates.

MCP Theory

MCP JSON-RPC 2.0 Lifecycle Trace

Click through the 5 protocol frames exchanged between Client Host and Server.

CLIENT -> SERVERFrame 1 of 5

Handshake: initialize

The AI Host opens a Stdio subprocess (local IDE) or Streamable HTTP POST session (remote cloud) and sends its supported protocol version and client capabilities.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-03-26",
    "capabilities": {
      "roots": {
        "listChanged": true
      },
      "sampling": {}
    },
    "clientInfo": {
      "name": "DataArena-Host",
      "version": "2.1.0"
    }
  }
}
Production Note: Negotiates protocol capabilities before exposing any workspace context or tools. Clients may also support backwards-compatible 2024-11-05 servers.