agent-bridge-mcp
Orchestrate coding agents (Claude, Codex, Antigravity) by dispatching asynchronous tasks, managing sessions/tasks, verifying evidence, and running review/workflow loops.
Send prompts to Claude Code, Codex CLI/SDK, or Antigravity via
agent_send, with engine, model, project, topic, task type, session reuse, and timeout.Check task status/output/error with
agent_statusand cancel running tasks withagent_cancel.List and filter tracked sessions with
agent_sessionsby agent, project, topic, or status.Run fail-closed Evidence Gate checks (
agent_evidence_check) on git status/diff plus test/typecheck/lint commands.Execute autonomous implement → evidence → review loops (
agent_review_loop) with Codex/Claude and automatic revisions.Expose capabilities, sessions, tasks, projects, generic workflows, WebSocket lifecycle events, and git commit/push via the HTTP gateway.
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., "@agent-bridge-mcp implement the login feature in project my-app"
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.
agent-bridge-mcp
A capability-aware MCP server and HTTP/WebSocket gateway for orchestrating interchangeable coding agents.
Agent Bridge treats each agent as an adapter behind a common runtime contract. The core router does not hard-code Claude, Codex, or Antigravity behavior; registered adapters advertise capabilities such as sessions, streaming, cancellation, model selection, sandbox control, file tools, and shell tools. Workflows may name a specific agent or select one by required capabilities.
Status: experimental. Interfaces may still change. The runtime is intended for trusted local development environments and should not be exposed to untrusted networks.
Architecture
MCP / HTTP / WebSocket
|
v
SessionRouter
|
v
AgentRegistry
|
AgentAdapter
/ | \
Claude Codex Antigravity ...
|
+--> TaskManager
+--> SessionStore
WorkflowEngine ----> EvidenceGate ----> Git / tests / typecheck / lint
|
+--> ReviewLoop presetThe built-in adapters currently cover:
Claude Code CLI
Codex CLI
Codex SDK
Antigravity (
agy) CLI
Additional agents can be added by implementing and registering another AgentAdapter; the core AgentType is not a closed union of built-in names.
Related MCP server: agent-intern
Core concepts
Agent Registry and capabilities
Each registered adapter declares:
sessionsstreamingcancellationmodelssandboxControlfileToolsshellTools
Call agent_capabilities over MCP or GET /api/capabilities over HTTP to inspect what is available.
A workflow can select a concrete adapter:
- type: agent
role: implementer
agent: codex
engine: clior request capabilities and let the registry choose:
- type: agent
role: implementer
requires:
- sessions
- fileTools
- shellToolsGeneric workflows
WorkflowEngine executes ordered role-based steps. An agent step can receive:
{{input}}{{previousOutput}}{{evidenceSummary}}{{gitDiff}}{{testResults}}
Evidence steps are fail-closed: no verification commands means no verified PASS.
The older implement → evidence → review loop remains available as a compatibility preset on top of the generic workflow runtime. Implementer and reviewer are selectable registered agents rather than fixed core dependencies.
Sessions and tasks
Agent Bridge tracks internal sessions and external agent session/thread/conversation IDs. Matching considers agent, engine, workspace, project, topic, and task type. Explicit session reuse is rejected when the requested agent/engine/workspace is incompatible.
Every dispatch creates a task record with status, output, error, and exit code. Cancellation is terminal; late completion cannot resurrect a cancelled task.
Install
npm install -g @yukinuma/agent-bridge-mcpRequires Node.js 20+ and whichever agent CLIs you intend to drive already installed and authenticated.
Antigravity on Windows
agy expects a real terminal. On Windows the adapter runs it under winpty when available and keeps stdin open for the call. It persists the returned conversation ID and resumes with --conversation on later turns.
Set WINPTY_PATH or AGY_PATH if either binary is in a non-standard location. Non-Windows Antigravity execution is not yet well tested.
Use as an MCP server
{
"mcpServers": {
"agent-bridge": {
"command": "agent-bridge-mcp",
"env": {
"AGENT_BRIDGE_WORKSPACE": "/path/to/your/projects"
}
}
}
}MCP tools:
Tool | Purpose |
| Dispatch to any registered agent/engine |
| List adapters or find capability matches |
| Inspect a task |
| List tracked sessions |
| Cancel a task |
| Run fail-closed repository verification |
| Execute a generic role-based workflow |
| Run the compatibility implement/review preset |
Use as an HTTP/WebSocket gateway
export ABC_AUTH_TOKEN="$(openssl rand -hex 24)"
export AGENT_BRIDGE_WORKSPACE="/path/to/your/projects"
agent-bridge-gatewayThe gateway refuses to start without ABC_AUTH_TOKEN.
Variable | Default | Meaning |
| (required) | Shared secret for REST and WebSocket auth |
|
| Listening port |
|
| Bind address |
|
| Root boundary for execution targets |
|
| Session/task state directory |
| localhost only | Comma-separated CORS allowlist |
HTTP endpoints
Method | Path | Purpose |
|
| Gateway and running-task summary |
|
| Workspace projects |
|
| Registered adapters and capabilities |
|
| List sessions |
|
| List / inspect tasks |
|
| Dispatch a task |
|
| Cancel a task |
|
| Run the Evidence Gate |
|
| Run a generic workflow |
|
| Run the compatibility review loop |
|
| Commit and push a repository |
|
| Stream task/workflow lifecycle events |
Execution endpoints require an explicit cwd or project, and every resolved path must stay inside AGENT_BRIDGE_WORKSPACE.
Example generic workflow request:
{
"project": "my-app",
"input": "Implement the requested feature and verify it.",
"workflow": {
"steps": [
{
"type": "agent",
"role": "implementer",
"requires": ["fileTools", "shellTools", "sessions"],
"prompt": "{{input}}"
},
{
"type": "evidence",
"role": "verifier",
"testCommands": ["npm test", "npm run typecheck"]
},
{
"type": "agent",
"role": "reviewer",
"agent": "claude",
"prompt": "Review the implementation. Evidence: {{evidenceSummary}}\nDiff:\n{{gitDiff}}"
}
]
}
}Evidence and review safety
Evidence verification is fail-closed. A reviewer cannot turn a failed or missing Evidence Gate into PASS merely by writing the word PASS. Review verdict parsing only accepts a verdict at the beginning of the first non-empty line.
Git commit and push results are tracked separately; a successful local commit with a failed push is reported as failure rather than success.
Security
This is a privileged local development daemon. Built-in unattended CLI adapters may disable approval/sandbox prompts so they do not hang waiting for input.
In particular:
Agent | Default unattended behavior |
Codex CLI |
|
Antigravity |
|
Treat possession of the gateway token as equivalent to powerful local development access.
Keep the default bind address at
127.0.0.1unless you fully trust the network.Prefer the Authorization header over query-string tokens because query strings may be logged.
All execution paths are constrained to
AGENT_BRIDGE_WORKSPACE, but agents still execute with the privileges of the OS user running Agent Bridge./api/git/commit-pushpushes to the configured repository remote without a second interactive approval.
Do not expose the gateway to an untrusted network or run it under an unnecessarily privileged user.
Claude SDK status
The old ClaudeSdkAdapter used the plain Anthropic Messages API and therefore did not provide Claude Code/agent capabilities. That path has been removed. engine=sdk for Claude remains intentionally unavailable until a real Claude Agent SDK adapter is implemented.
Development and verification
npm install
npm run typecheck
npm run build
npm run test:hardeningCI runs typecheck, build, and hardening integration tests. A separate live E2E script validates real authenticated Claude/Codex/Antigravity session continuity when those CLIs are installed locally:
npm run test:agents:e2eLicense
MIT
Available Tools
6 toolsagent_cancelC
Cancel a currently running agent task.
Inputs: taskId (required).
agent_evidence_checkA
Run Evidence Gate validation: inspect git status/diff and execute test/typecheck/lint commands to produce empirical evidence report.
Inputs: cwd, timeoutMs, testCommands.
agent_review_loopA
Execute full autonomous development loop: Codex implements -> Evidence Gate validates -> Claude reviews -> Auto-revision (up to max 2 revisions limit).
Inputs: prompt (required), cwd, topic, engine, +4 more.
agent_sendB
Send an instruction to Claude Code or Codex CLI/SDK. Executes asynchronously in background and returns task_id.
Inputs: agent (required), prompt (required), cwd, model, +7 more.
agent_sessionsC
List active or archived sessions tracked by Agent Bridge.
Inputs: agent, topic, status, project.
agent_statusB
Check the status, output, or error of a background task dispatched via agent_send.
Inputs: taskId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct action: send, cancel, check evidence, check status, list sessions, and run a full review loop. The only minor overlap is between agent_send and agent_review_loop, as both can dispatch work, but the latter is a higher-level workflow clearly distinguished by name and description.
All tool names consistently follow the agent_verb or agent_verb_noun pattern (e.g., agent_send, agent_evidence_check, agent_review_loop). The naming is predictable and readable across the set.
With 6 tools, the surface is appropriately scoped for an agent orchestration and review bridge. Each tool provides a distinct function without overwhelming users or leaving the set feeling thin.
The set covers the core workflow: dispatch, status, cancel, and an integrated review loop. Evidence check and session listing add useful supporting operations. A minor gap is the lack of an explicit tool to modify or configure review loop parameters, but the overall surface is solid.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that spawns autonomous Claude Code agents in GitHub repos, enabling task delegation with persistent state, multi-step workflows, and job monitoring.4776 npm2Apache 2.0
- AlicenseAqualityAmaintenanceAn MCP server that bridges Claude Code with Antigravity CLI using a Swarm Agent architecture to optimize local development workflows and minimize LLM token costs. Includes a web UI for monitoring agent workflows.29546 PyPI31MIT
- AlicenseNot gradedqualityCmaintenanceA local-first MCP orchestration server that uses Codex as lead planner and Antigravity as host to delegate and review bounded tasks with Git integration and persistent SQLite state.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceAn MCP server that bridges CLI coding agents like Claude Code, Codex, opencode, and Antigravity into any MCP client, enabling synchronous and asynchronous task execution, follow-up input, and a structured code review tool.34 npm2MIT