Demonstrates the MCP-to-ARCP bridge pattern — exposing an ARCP skill as an MCP tool that any MCP-compatible host (Claude Desktop, Cursor, etc.) can call (RFC §16).
MCP Host (simulated)
│
│ JSON-RPC 2.0 (stdio)
▼
McpBridge
├── initialize → serverInfo + capabilities
├── tools/list → [{ name: "research", inputSchema: {...} }]
└── tools/call research
│
│ ARCP
▼
ARCPRuntime
└── planner@1.0.0
├── job.submit → job.accepted
├── [agent simulated] → job.completed(result)
└── Ack
The recipe shows three bridge patterns from RFC §16:
- MCP capability handshake — the bridge responds to
initializewith its server info and declarestoolscapability. - Skill-as-tool —
tools/listtranslates the ARCP skill manifest (skills/research/SKILL.md) into an MCPToolobject with a JSON SchemainputSchema. - End-to-end
tools/call—tools/call researchsubmits an ARCPjob.submit, awaitsjob.accepted, simulates the agent result, sendsjob.completed, and wraps the result in an MCPTextContentblock.
Because the recipe is self-contained (no real stdin or MCP client required),
Main.kt replays four canned JSON-RPC 2.0 messages — initialize,
notifications/initialized, tools/list, and tools/call research — against
the bridge to show the full flow.
No external services are used — everything runs in-process with
MemoryTransport.
export JAVA_HOME=/opt/homebrew/opt/openjdk@21
./gradlew :recipes:runMcpSkill[bridge] connected sessionId=...— ARCP session established.[host ] ← {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05",...}}— MCPinitializehandshake completed.[host ] ← {"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"research",...}]}}—tools/listreturned the research skill.[bridge] tools/call research query="advances in ..."— bridge received thetools/calland is dispatching to ARCP.[bridge] job accepted jobId=...— runtime accepted the job.[bridge] agent result summary=...— simulated agent produced a result.[bridge] job completed ackReceived=true— runtime Acked the completion.[host ] ← {"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":...}]}}— final MCP tool result returned to the host.