Skip to main content
Glama

agent-bridge

Local-first MCP bridge between Antigravity and Claude Code for low-friction collaborative planning reviews, Markdown plan exports, and lightweight development task handoffs—with opt-in live ping-pong debate mode.

Based on subamanis/agent-bridge (MIT License, Copyright (c) 2026 Petros Papatheodorou).

Why This Exists

When planning a project or feature, having both Antigravity and Claude Code review and critique each other's architecture produces a stronger build plan—without requiring complex synchronous multi-agent orchestration. Once implementation begins, you can alternate between Antigravity and Claude Code on individual tasks while keeping clean handoff context.

Related MCP server: cc-handoff

Key Features

  • Async-First Mailbox (peer_exchange + peer_inbox): peer_exchange defaults to wait_for_reply: false so messages queue immediately without blocking your chat turn. Switch to the other harness whenever you're ready and call peer_inbox() to read unread proposals or critiques.

  • Project-Scoped Rooms (project_path): Pass your workspace path to automatically walk up to the nearest .git root and derive a deterministic room ID (<repo-slug>-<hash6>). Both harnesses land in the exact same room even if one passes a subdirectory, while state stays neatly in the central data/ directory.

  • On-Demand Markdown Export (peer_export): Export the agreed plan (mode: "plan"), the full plan + critique transcript (mode: "full"), or the latest dev handoff (mode: "handoff") directly to <project_path>/PLAN.md, docs/plans/<topic>.md, or HANDOFF.md (with atomic writes and .md/.markdown safety guardrails).

  • Task Handoff Notes (peer_handoff): Record structured implementation handoffs (task, completed, files_touched, next_steps, blockers, notes) stored separately from the planning transcript so resetting a planning session never wipes active dev handoffs.

  • Opt-In Live Debate (wait_for_reply: true / peer_wait): Need a live back-and-forth ping-pong debate? Pass wait_for_reply: true to peer_exchange or call peer_wait()—including heartbeat renewals, unread-inbox guards, wrong-turn protection, and standby background listener support.

  • Zero Dependencies: Pure Node.js (server.cjs, setup.cjs), cross-platform (Windows & Linux/macOS).

Installation

Register agent-bridge in both ~/.gemini/config/mcp_config.json (Antigravity) and ~/.claude.json (Claude Code):

node setup.cjs
node setup.cjs --check

Other CLI commands:

node server.cjs --selftest              # Run full automated test suite
node server.cjs --rooms                 # List all active project rooms
node server.cjs --status --project .    # Inspect room state for a repo
node server.cjs --reset --project .     # Archive & reset planning messages (preserves handoffs)
node setup.cjs --uninstall              # Remove from Antigravity & Claude Code configs

MCP Tools

All tools accept optional project_path (recommended) or explicit room to scope discussions per repository.

Tool

Purpose

peer_exchange

Send a propose, critique, or agreed message. Non-blocking by default (wait_for_reply: false); pass wait_for_reply: true for live debate.

peer_inbox

Instantly check and consume unread peer messages without blocking.

peer_export

Render and write Markdown (mode: "plan" | "full" | "handoff") to PLAN.md, HANDOFF.md, or a custom .md path.

peer_handoff

post, latest, history, or clear structured dev task handoff notes between Antigravity and Claude Code.

peer_wait

Opt-in blocking wait for live ping-pong debates (with timeout_sec and standby support).

peer_status

Inspect room state/transcript (status), list all rooms (list_rooms), or archive & reset planning messages (reset).

Typical Workflows

1. Async Planning Review (Default)

  1. In Antigravity: "Draft a build plan for this repo and send it to Claude via peer_exchange with project_path."

  2. In Claude Code: "Check peer_inbox for this repo, critique the plan against the codebase, and reply via peer_exchange."

  3. Repeat until one agent sends stance: "agreed".

  4. Run peer_export(mode: "plan") (or mode: "full") to write PLAN.md into the repo.

2. Alternating Harnesses During Implementation

  1. When finishing a task in Claude Code: "Leave a peer_handoff note summarizing what we built and what's next."

  2. When picking up in Antigravity: "Check peer_handoff(action: "latest") for this repo and continue with the next step."

See docs/agent-workflows.md for copy-ready instruction snippets you can paste into CLAUDE.md and Antigravity rules.

Environment Variables

  • AGENT_BRIDGE_DATA_DIR: Override the room state directory (default: ./data).

  • AGENT_BRIDGE_ROLE: Default agent identity (antigravity | claude).

  • ANTIGRAVITY_CONFIG_DIR: Override ~/.gemini/config path in setup.cjs.

  • CLAUDE_CONFIG_FILE: Override ~/.claude.json path in setup.cjs.

License

MIT License — see LICENSE. Originally created by Petros Papatheodorou (subamanis/agent-bridge), customized by astevegreen.

Available Tools

6 tools
peer_exchangeA

Send a plan proposal, point-by-point critique, or final agreement to the peer agent (claude or antigravity). Async-first by default (wait_for_reply=false): queues your message immediately and returns so you can switch harnesses at your own pace. Set wait_for_reply=true only when you want an opt-in live blocking ping-pong debate.

Planning Review Protocol:

  1. Pass project_path (your current workspace root) so discussions stay cleanly isolated per repository.

  2. Summarize key points concisely in your chat window before calling peer_exchange.

  3. Be rigorous: verify claims against the codebase and address points explicitly (e.g. "Point 1: Agree. Point 2: Disagree because...").

  4. Use stance="propose" for an initial plan or major revision; stance="critique" for objections or improvements; stance="agreed" ONLY when you agree 100% with zero further changes.

Inputs: stance (required), message (required), room, topic, +4 more.

peer_exportA

Render and optionally write the converged plan, full critique history, or latest dev handoff to a Markdown file (default: <project_path>/PLAN.md or HANDOFF.md).

Inputs: mode, room, write, output_path, +1 more.

peer_handoffB

Record or read lightweight implementation handoff notes when alternating between Antigravity and Claude Code on individual tasks. Stored separately from planning messages in the same project room so resetting a planning session never wipes active dev handoffs.

Inputs: room, task, limit, notes, +6 more.

peer_inboxA

Instantly check and consume any unread messages from the peer agent without blocking. Use this at the start of a planning review turn in Antigravity or Claude Code to read what the other agent posted.

Inputs: room, project_path.

peer_statusB

Inspect the current bridge room state, peer presence, full message transcript, and latest handoff; list all active project rooms; or archive/reset the planning session.

Inputs: room, action, project_path.

peer_waitA

Opt-in live blocking wait for the next message from the peer agent (claude or antigravity). For normal async reviews, prefer peer_inbox() instead. Use peer_wait() only when running a live synchronous debate or when peer_exchange(wait_for_reply=true) returned status="waiting_heartbeat".

Inputs: room, standby, timeout_sec, project_path.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool has a distinct core action: send (peer_exchange), consume unread (peer_inbox), blocking wait (peer_wait), handoff notes (peer_handoff), export (peer_export), and inspect/archive state (peer_status). The main overlap is between peer_status (full transcript/handoff inspection) and peer_inbox (unread consumption), plus peer_wait vs peer_inbox for receiving messages, but the descriptions clarify async vs blocking and consume vs inspect semantics.

    Naming Consistency4/5

    All tools use a consistent peer_ prefix and snake_case, making the namespace predictable and readable. Minor deviation is that some names are noun-like (peer_status, peer_inbox, peer_handoff) while others are verb-like (peer_exchange, peer_wait, peer_export), but the shared prefix keeps the set coherent.

    Tool Count5/5

    Six tools is well-scoped for an agent-to-agent planning bridge, with each tool covering a distinct communication mode or lifecycle step. There is no obvious redundancy requiring extra tools, and the count is neither thin nor bloated.

    Completeness4/5

    The surface covers sending, receiving (async and blocking), status/archival, handoff notes, and export, which are the core workflows for cross-harness planning review. Minor gaps exist around explicit room/peer management or message editing/deletion, but agents can work around these via existing status and exchange operations.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables a planning Claude chat and Claude Code to exchange work through local Markdown files, letting the chat create tasks that code agents pick up, complete, and report back on. Project-scoped task and report tools track each item's status from open through reported, eliminating manual copy-paste between the two clients.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables Claude Code, Codex CLI and Antigravity (Gemini) agents to exchange messages that are pushed live into each other's open sessions, with mail_send, mail_check and mail_peers tools so no agent has to poll. Mail can also be bridged over SSH between machines with no shared filesystem.
      3
      299 npm
      1
      MIT