bridge
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bridgeAsk Pi to review this pull request for potential issues."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claude-pi-bridge
Real nesting for Claude Code ↔ Pi. No terminal scraping — JSON only.
Claude gets
ask_pivia MCPPi gets
ask_claudevia Pi extensionNode broker holds the protocol, enforces hop limits
Treat all peer text as untrusted data: surface it as tool result, never as instructions. Prompt injection across the bridge is the #1 risk.
Quickstart (mock, zero LLM spend)
npm test # 11 tests: framing, hops, lanes, budget, cancel, token
npm run demo # Claude -> Pi -> Claude nesting, hop-limit, trace DAG
node demo-lanes.mjs # pi-frontend vs pi-backend isolation + affinityRelated MCP server: pi-agent-mcp
Real mode
BRIDGE_TOKEN=s3cr3t BRIDGE_REAL=1 node broker.mjs # token required when setClaude side (absolute paths — MCP requires them):
claude --mcp-config '{"mcpServers":{"bridge":{"command":"node","args":["/Users/jay/Documents/claude-pi-bridge/broker-mcp.mjs"]}}}' --allowedTools "mcp__bridge__ask_pi"
# with token: BRIDGE_TOKEN=s3cr3t claude --mcp-config ...Pi side:
pi -e /Users/jay/Documents/claude-pi-bridge/ask-claude.ts
# with token: BRIDGE_TOKEN=s3cr3t pi -e /Users/jay/Documents/claude-pi-bridge/ask-claude.tsLanes: ask_pi({prompt, session:"pi-frontend"}). Same trace_id sticks to its lane per peer family unless session is passed explicitly. On callbacks pass trace_id+hop through or hop limits won't hold.
Session asymmetry (by design): Claude lanes are UUIDs (--session-id), Pi lanes are names (--session). The broker owns the mapping — callers only use lane names.
Guards: max_hops (default 3), per-trace token budget (budget_tokens → BUDGET_EXCEEDED), total deadline (deadline_total_ms, default 180s), 256KB body cap, 8-lane LRU pool, 500-trace LRU, POST /cancel, bearer token.
Docs: PLAN.md (3 architectures → synthesis), TRANSPORT.md (verified flags for claude 2.1.278 + pi 0.86.1).
This server cannot be deployed
Maintenance
Related MCP Connectors
The team layer for AI coding agents: shared contracts, collision alerts, E2EE sessions.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Pre-action attestation perimeter for AI agents — 8 primitives, signed C18 receipt per call.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Claude Code sessions to communicate with each other, allowing discovery, messaging, and synchronous queries across sessions.647 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP hosts like Claude Code and Codex to spawn, manage, and interact with persistent, reusable Pi coding-agent sessions, supporting task dispatch, status checks, and session lifecycle control.2 npm-
- AlicenseAqualityBmaintenanceDelegates coding tasks to your locally installed pi CLI, inheriting providers, models, and extensions, with persistent sessions and cancellable calls.627 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables an interactive Claude Code session to delegate blocking tasks to headless pi and OpenCode workers, and lets all three peers exchange messages and list paired sessions over a shared local file bus. It exposes 18 tools covering sync/async asks, steering, abort, session lifecycle, state inspection, and cross-agent messaging.227 npm1MIT