AGP MCP Server
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., "@AGP MCP Server create a two-agent team to fix the login bug and assign tasks"
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.
AGP MCP Server
Serverless inter-agent MCP mesh, Agent Teams, and zero-token reactive wakeup — exposing the full multi-agent coordination suite in standard Direct Mode (25 tools) or compact Code Mode (4 tools:
whoami,docs,search,execute) with zero external runtime dependencies.
Token Comparison
Approach | Tools | Context Footprint |
Raw transcript polling + full diffs inline | — | ~40,000+ tokens/session |
Direct Mode (full AGP + Teams MCP surface) | 25 | ~6,500 tokens |
Code Mode ( | 4 ( | ~900 tokens (~86% reduction) |
Related MCP server: agentroom
Get Started
Option 1: npx Stdio (Recommended — Zero HTTP Server Required)
Runs completely silently in the background over standard MCP stdio against shared local SQLite WAL (~/.gemini/agp/agp.db) and cross-process locked Team mailboxes (~/.gemini/agp/teams/). No daemon or browser needs to be open.
Add to your MCP client configuration (Antigravity, Claude Desktop, Claude Code, Cursor, Windsurf):
{
"mcpServers": {
"agp-broker": {
"command": "npx",
"args": ["-y", "github:TrBn17/agp-mcp"]
}
}
}For VS Code (.vscode/mcp.json):
{
"servers": {
"agp-broker": {
"type": "stdio",
"command": "npx",
"args": ["-y", "github:TrBn17/agp-mcp"]
}
}
}Or generate a client-specific config directly:
npx -y github:TrBn17/agp-mcp config cursor
npx -y github:TrBn17/agp-mcp config vscode --codemodeOption 2: Antigravity Auto-Hooks & Offline Runtime (One Command)
To let live Antigravity (agy) sessions automatically receive incoming messages mid-turn (PreInvocation, PostInvocation, Stop), register identity on startup (SessionStart), and enforce workspace file write leases (PreToolUse):
npx -y github:TrBn17/agp-mcp install
# Or enable 4-tool Code Mode by default:
npx -y github:TrBn17/agp-mcp install --codemodeThis installs the agp-mesh plugin into ~/.gemini/config/plugins/agp-mesh, bundles the offline zero-dependency Python runtime inside it so hooks execute in <40ms even without network access, and wires agy automatically.
Option 3: Global npm or pip Install
# Node / npm (requires Node 18+ and Python 3.11+)
npm install -g github:TrBn17/agp-mcp
agp-mcp doctor
# Or pure Python (no Node required)
pip install git+https://github.com/TrBn17/agp-mcp.git
agp-mcp --doctorOption 4: Streamable HTTP & Optional Live Monitor UI
Opening the Monitor UI is strictly optional — background MCP works identically whether the UI is open or closed. Start it only when you want to inspect sessions, teams, token usage, traces, or expose Streamable HTTP /mcp + A2A v1.0:
npx -y github:TrBn17/agp-mcp monitor
# Dashboard: http://127.0.0.1:47821
# Streamable HTTP MCP: http://127.0.0.1:47821/mcp
# Streamable HTTP Code Mode: http://127.0.0.1:47821/mcp?codemode=trueCode Mode
Enable ultra-compact 4-tool Code Mode (whoami, docs, search, execute) via --codemode (stdio), AGP_CODEMODE=1 (env), or ?codemode=true (Streamable HTTP):
{
"mcpServers": {
"agp-broker": {
"command": "npx",
"args": ["-y", "github:TrBn17/agp-mcp", "--codemode"]
}
}
}Tool Result Truncation
In Code Mode, large tool responses from execute are structurally truncated to ~6,000 tokens (~24,000 chars) while always producing valid JSON with --- TRUNCATED --- markers and omitted item/key counts (modeled on @cloudflare/mcp's structural truncator).
To inspect full un-truncated output when needed:
Per call: pass
"truncate": falseinexecutearguments.Per session (stdio): pass
--no-truncate.Per request (HTTP): append
?truncateToolResult=falseto/mcp.
The Problem
Running multiple AI coding sessions in parallel (CLI, IDE, subagents, Claude Code, Cursor) hits four recurring failure modes:
One-way blind messaging & token burn — Session A sends a message to Session B, B is idle or mid-turn and never sees it, and A burns tokens looping
inboxpolls waiting on a dead reply.Concurrent file edit collisions — Two agents edit the same file simultaneously with no advisory/enforced write lock or monotonic fencing tokens against stale writers.
Context window bloat — Loading 25+ tool schemas, raw transcripts, or 100 KB diffs inline exhausts model context before actual coding starts.
Daemon friction — Requiring a manually started HTTP server just for agents to coordinate breaks standard plug-and-play MCP ergonomics.
agp-mcp solves all four with a serverless SQLite WAL + cross-process file-locked architecture, deterministic two-way receive & wakeup channels, 4-tool Code Mode, and pass-by-reference SHA-256 artifacts.
How Two-Way Receive & Wakeup Works
Target Session State | Delivery Mechanism | Token Cost While Waiting |
Active turn (thinking / calling tools) | Lifecycle hooks ( | 0 extra polls |
Idle interactive session (CLI / IDE) | Zero-token reactive background listener ( | 0 LLM tokens |
Added to a team ( | Immediately writes a Team Handshake ( | 0 extra polls |
Autonomous teammate ( | Spawns a self-terminating detached worker ( | On-demand only |
Unreachable idle peer ( | Every | 0 wasted tokens |
Tools
Code Mode (4 Tools)
Tool | Purpose |
| Returns current session identity, URI, role, active listener state, unread AGP/Team counts, active leases, and teams. Includes OpenAI profile metadata ( |
| Searches built-in AGP v2.1, Agent Teams, two-way wakeup, security, and tool schema documentation by topic or query. |
| Discovers matching tools (with full schemas), live peer agents, and teams in a single compact call. |
| Executes a single tool or chains a multi-step |
Agent ──► search({ query: "team task" })
│ returns matching tool schemas + live peers
▼
Agent ──► execute({ steps: [
{ action: "team_create", args: { team: "checkout", description: "API + UI" } },
{ action: "team_task", args: { team: "checkout", action: "create", title: "Build API", owner: "backend" } },
{ action: "team_task", args: { team: "checkout", action: "create", title: "Wire UI", owner: "frontend", blocked_by: ["$prev.task.id"] } }
] })
│ runs in-process against SQLite WAL + CrossProcessFileLock
▼
Valid JSON result (~6,000-token structural truncation, or full via truncate: false)Direct Mode (25 Tools)
When running without --codemode, all 25 tools are exposed directly:
Identity & Docs (2):
whoami,docsAgent Teams (9):
team_create,team_join,team_spawn,team_send,team_inbox,team_task(list|create|claim|unclaim|complete|fail|cancel|update|deletewith DAG cycle detection & auto-unblocking),team_list,team_shutdown,team_deleteAGP v2.0 Mesh (14):
agp_status,agp_register,agp_unregister,agp_discover,agp_ask,agp_send,agp_inbox,agp_ack,agp_task,agp_lease(acquire|renew|release|list|check|force_releasewith monotonic fencing tokens),agp_artifact_put,agp_artifact_get,agp_artifact_list,agp_trace_inspectResources & Prompts: 6 static
agp://resources, 5 resource templates, 6 guided workflow prompts,logging/setLevel,completion/complete, andnotifications/cancelled.
Skills
agp-mcp implements the MCP Skills extension (io.modelcontextprotocol/skills), advertising skills/list, skills/get, and skill://<name>/<path> resources with SHA-256 content digests:
Skill | URI | Contents |
|
| Full serverless AGP v2.1 & Agent Teams collaboration playbook |
|
| Zero-token reactive wakeup, |
Supported Clients & Protocols
MCP Protocol Versions:
2024-11-05,2025-03-26,2025-06-18,2025-11-25,2026-07-28(stateless-first)MCP Extensions:
io.modelcontextprotocol/tasks,io.modelcontextprotocol/skillsA2A Gateway (HTTP mode): A2A v1.0 signed Agent Card (
/.well-known/agent-card.json), task endpoints, and webhook deliverySecurity & Provenance: Ed25519 JWS message signing, RFC 8693 delegation chains, DLP secret redaction, prompt-injection taint screening, monotonic fencing tokens, circuit breakers, hop-limit loop protection
Clients: Antigravity (
agy), Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, and any standard MCP stdio or Streamable HTTP client
Usage
Ask your agent naturally:
"Check
whoamiand discover which agents are currently working onbackend/**.""Create a team
auth-refactor, join conversation<cid>asfrontend, create a task DAG where UI waits on the API contract, and wait for their reply at zero token cost.""Acquire an exclusive write lease on
src/payments/**before editing, then hand off the git diff viaagp_artifact_put."
Example multi-step Code Mode execute call:
{
"steps": [
{
"action": "agp_register",
"args": {
"display_name": "Backend API (Auth)",
"role": "backend",
"owned_paths": ["services/auth/**"]
}
},
{
"action": "agp_lease",
"args": {
"action": "acquire",
"owner_uri": "$prev.agent.agent_uri",
"paths": ["services/auth/jwt.py"],
"ttl_sec": 300
}
}
]
}Optional Live Monitor UI
The web dashboard is purely a read/control companion over the exact same ~/.gemini/agp/ SQLite WAL and Team mailboxes. Agents keep working seamlessly when you close it.
npx -y github:TrBn17/agp-mcp monitor
# Or without auto-opening a browser tab:
npx -y github:TrBn17/agp-mcp monitor --no-browserDevelopment
git clone https://github.com/TrBn17/agp-mcp.git
cd agp-mcp
# Run full unit + multi-process MCP test suite
npm test
# or: python -m unittest discover -s tests -v
# Run environment, SQLite WAL & lock diagnostics
node bin/agp-mcp.mjs doctorRequirements
Python 3.11+ (stdlib only — 0 external Python packages)
Node.js 18+ (for
npx/npmCLI wrapper — 0 external npm packages)
License
Available Tools
25 toolsagp_ackBIdempotent
Acknowledge, accept, reject, complete, or mark failed an incoming AGP message.
Inputs: msg_id (required), status (required), reason, actor_uri.
agp_artifact_getARead-onlyIdempotent
Retrieve a SHA-256 verified artifact by artifact_id, supporting offset_bytes chunk pagination.
Inputs: artifact_id (required), max_bytes, offset_bytes.
agp_artifact_listCRead-onlyIdempotent
List stored artifacts in the local AGP Artifact Store (optionally filtered by kind or owner_uri).
Inputs: kind, limit, owner_uri.
agp_artifact_putAIdempotent
Store a large diff, log, OpenAPI spec, or code file in the local SHA-256 Artifact Store (with DLP secret redaction) and receive a pass-by-reference descriptor to attach to agp_send.
Inputs: kind (required), redact, content, mime_type, +2 more.
agp_askB
Send a structured request to a peer AND wait in ONE tool call for the correlated reply (correlation_id). Includes an anti-token-burn guard: if the recipient cannot auto-receive (will_auto_receive=false), returns immediately in 0ms with remediation advice instead of waiting blindly.
Inputs: to_uri (required), summary (required), type, payload, +7 more.
agp_discoverARead-onlyIdempotent
Discover other AI sessions currently active or recently seen on the AGP mesh. Filter by role, capability, workspace/path ownership, surface, search query, or online status. Shows whether each peer has an active zero-token listener (listening) or wakeup_mode.
Inputs: role, query, status, surface, +4 more.
agp_inboxA
Read or peek incoming AGP messages addressed to this AI session (and subscribed channels). Supports filtering by correlation_id, trace_id, msg_type, priority, and bounded cross-process long-polling (wait_timeout_sec up to 60s). Set mark_delivered=false to peek without consuming.
Inputs: limit, channels, msg_type, priority, +8 more.
agp_leaseB
Acquire, renew, release, check (dry-run), force_release, or list workspace file/path leases with monotonic fencing_token protection to prevent concurrent edit conflicts.
Inputs: action (required), mode, paths, ttl_sec, +1 more.
agp_registerBIdempotent
Register or update this AI session's Agent Card (display_name, role, owned_paths, capabilities, channels, wakeup_mode, status) so peers can discover and route messages to it.
Inputs: cwd, role, status, channels, +8 more.
agp_sendA
Send an AGP structured message to another AI session or channel (@handle, URI, conversation_id, 'all', or 'channel:'). Enforces schema validation, DLP secret redaction, Ed25519 JWS, token budget, DAG cycle guard, idempotency, and circuit breakers. Returns honest delivery status (will_auto_receive, mode, remediation) so you never burn tokens waiting on an unreachable idle peer.
Inputs: type (required), payload (required), summary (required), wake, +17 more.
agp_statusBRead-onlyIdempotent
Inspect your bound AGP identity, unread AGP & Team message counts, held file leases, open circuit breakers, active async tasks, zero-token listener command, and optional Monitor UI status. Optionally reset a recovered circuit breaker.
Inputs: agent_uri, reset_circuit_uri.
agp_taskA
Manage durable async tasks (io.modelcontextprotocol/tasks & A2A v1.0 Tasks): list tasks, get task state/history/result, wait for state transition, supply mid-flight clarification/HITL input (update), or cancel a running task.
Inputs: action (required), input, limit, state, +5 more.
agp_trace_inspectARead-onlyIdempotent
Inspect the full multi-hop distributed trace spans and messages for a trace_id, OR omit trace_id to list recent traces.
Inputs: limit, trace_id.
agp_unregisterAIdempotent
Gracefully sign off (peer.bye) from the AGP mesh, mark this agent offline, and release all workspace file leases it holds.
Inputs: reason, agent_uri, release_leases.
docsSearch AGP Protocol & Tool DocsARead-onlyIdempotent
Search built-in AGP v2.1 documentation: protocol contracts, error codes, two-way wakeup patterns (agp.listen, team_join, agp_ask), workspace leases, and tool schemas.
Inputs: query (required), limit.
team_createBIdempotent
Create a Claude-style AGY Agent Team under ~/.gemini/agp/teams// with a shared task list (tasks.json), team roster (config.json), and per-member mailboxes (inboxes/).
Inputs: team (required), cwd, lead_name, description, +1 more.
team_deleteADestructiveIdempotent
Shut down all teammates and delete a finished team's state directory cleanly.
Inputs: team (required).
team_inboxA
Read or peek your team mailbox (~/.gemini/agp/teams//inboxes/.json). Supports cross-process fast wait (wait_sec 0-30s) and mark_read=false peek mode.
Inputs: name (required), team (required), wait_sec, mark_read, +1 more.
team_joinAIdempotent
Attach an existing live AGY session (by conversation_id) into a Team roster AND immediately open its receive/reply channel (sends structured Team Welcome handshake with exact team_send reply route and zero-token agp.listen command; optional auto_wake=true for detached CLI wakeup).
Inputs: name (required), team (required), cwd, role, +5 more.
team_listARead-onlyIdempotent
List all AGP Agent Teams or inspect a specific team's roster, live member statuses, unread mailbox counts, zero-token listener commands, and task board counts.
Inputs: team.
team_sendA
Send a direct peer-to-peer message to a teammate by short name (or 'all' to broadcast). Writes to ~/.gemini/agp/teams//inboxes/.json, mirrors to live session hooks/listeners, auto-wakes managed teammates, and returns honest delivery status.
Inputs: to (required), team (required), message (required), hop, +4 more.
team_shutdownBIdempotent
Gracefully shut down a spawned teammate (or pass name='all' to shut down all teammates).
Inputs: name (required), team (required), reason.
team_spawnB
Spawn a real autonomous AGY teammate (e.g. 'backend', 'frontend', 'reviewer') in a team. Runs via self-terminating detached worker with persistent conversation_id, automatically wakes on team_send, auto-bridges replies if needed, and sends idle_notification when done.
Inputs: name (required), role (required), team (required), prompt (required), +3 more.
team_taskA
Manage the team's cross-process atomic Shared Task List (tasks.json): list, create (with DAG cycle check), claim (omitting task_id auto-claims next unblocked task), unclaim, complete (auto-unblocks dependents), fail, cancel, update, or delete.
Inputs: team (required), action (required), owner, title, +5 more.
whoamiCurrent AGP Agent IdentityARead-onlyIdempotent
Return the stable AGP agent identity bound to this MCP connection. Takes no arguments. The id stays consistent across reconnections and metadata updates.
Inputs: no named parameters. Returns: id, name, role, surface, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
The agp_ vs team_ prefix split is real and documented, but three tool pairs overlap heavily: agp_send/team_send, agp_inbox/team_inbox, and agp_task/team_task all address 'messaging or tasks' with only scope differences that an agent must infer. Multi-action tools like agp_lease and agp_task (list/get/wait/update/cancel) further blur which call to reach for, though descriptions do help separate them.
Most tools follow prefix_verb_noun (agp_register, team_create, team_send), but there are visible deviations: resource-first ordering in agp_artifact_get/put/list and agp_trace_inspect, plus two unprefixed bare names (whoami, docs). The patterns are readable but not uniform.
At 25 tools the surface is at the heavy end, spanning mesh identity, messaging, artifacts, tasks, leases, tracing, and teams. Domain breadth justifies many of them, but several multi-action tools bundle 5-6 operations each, so the count sits right at the borderline of feeling overloaded.
Coverage is broad and lifecycle-complete: register/unregister, send/inbox/ack/ask, artifacts put/get/list, tasks, leases, traces, and full team create/join/spawn/send/shutdown/delete. Minor gaps remain, such as no team_leave, no channel subscribe/unsubscribe despite channels being a routing concept, and no artifact delete.
Maintenance
Related MCP Connectors
- aXDeprecatedio.github.ax-platform
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Coordinate multiple AI agents over MCP: atomic claims, leases, shared ledger, handoffs, tasks.
Shared control plane for AI coding agents — tasks, memory, decisions, file locks. 12 tools.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to share knowledge, coordinate tasks, and maintain persistent memory across distributed infrastructure with secure vaults and 130+ MCP tools.7MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to plan, split, and build one project together through shared tasks, file leases, a versioned contract, and urgent interrupts over MCP.MIT
- AlicenseNot gradedqualityBmaintenanceEnables multi-agent and human collaboration through MCP with scoped rooms, invites, @mentions, task claims, file locks, and push delivery to Claude Code, Codex, and Cursor. Provides cross-company safety, human review, and MCP/A2A protocols for coordinated agent work.1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables teams of AI coding agents (Claude Code, Cursor, Codex) to share persistent, time-aware graph memory and coordinate their work via MCP, so agents recall verified fixes at the moment of failure, learn procedures automatically, avoid file conflicts, claim tasks race-free, and hand off facts and decisions between sessions.2MIT