digraph JSONRPC_Flow {
rankdir=LR;
node [shape=box, style="rounded,filled", fontname="Helvetica"];
edge [fontname="Helvetica", fontsize=10];
bgcolor="white";
// Nodes
client [label="Claude Code\n(Client)", fillcolor="#E8D5B7", color="#B8860B"];
bridge [label="MCP Bridge\n(Node.js)", fillcolor="#CCE5FF", color="#4A90D9"];
http [label="HTTP Server\n(Unity)", fillcolor="#A5D6A7", color="#388E3C"];
router [label="API Router", fillcolor="#FFE0B2", color="#FF9800"];
controller [label="Controller", fillcolor="#E1BEE7", color="#9C27B0"];
unity [label="Unity API", fillcolor="#FFCDD2", color="#F44336"];
// Request flow
client -> bridge [label="1. tools/call\n(stdio)", color="#4A90D9"];
bridge -> http [label="2. POST /api/mcp\n(HTTP)", color="#4A90D9"];
http -> router [label="3. Route\nmethod", color="#388E3C"];
router -> controller [label="4. Invoke\nController", color="#FF9800"];
controller -> unity [label="5. Execute\nUnity API", color="#9C27B0"];
// Response flow (reverse)
unity -> controller [label="6. Result", color="#F44336", style=dashed];
controller -> router [label="7. JSON\nResponse", color="#9C27B0", style=dashed];
router -> http [label="8. JSON-RPC\nResponse", color="#FF9800", style=dashed];
http -> bridge [label="9. HTTP\nResponse", color="#388E3C", style=dashed];
bridge -> client [label="10. Result\n(stdio)", color="#4A90D9", style=dashed];
}