agent-bridge-mcp
agent-bridge-mcp
Claude Code、Codex、Antigravity (agy) のCLIセッションにコーディングタスクをディスパッチし、それらのセッションを追跡し、オプションで実際のリポジトリに対して実装 → レビュー → 検証ループを実行するMCPサーバー兼HTTPゲートウェイです。
ステータス: 実験的。 これは個人的なオーケストレーション用の装置として始まったもので、セッションルーティングとエビデンスゲートの部分が他の人の役に立つことを願って公開しています。インターフェースは変更される予定です。
機能
セッションルーティング — プロジェクトとトピックごとにClaude Code / Codexセッションを開始・再開し、後続のプロンプトが同じコンテキストに届くようにします。
タスク追跡 — ディスパッチされたすべての処理は、ステータス、出力、終了コードを持つタスクになります。
エビデンスゲート — リポジトリ内で指定したテストコマンドを実行し、変更を受け入れる前に、その変更が実際にテスト合格によって裏付けられているかを報告します。
レビューループ — 実装エージェントとレビューエージェントを交互にディスパッチし、エビデンスチェックを条件として、改訂回数の上限まで実行します。
ゲートウェイ — 同じ機能をHTTP + WebSocketで提供し、リモートクライアント(たとえばスマートフォン)が作業をディスパッチして出力をストリーミングできます。
Related MCP server: agent-intern
インストール
npm install -g @yukinuma/agent-bridge-mcpNode.js 20+ が必要です。また、使用予定のエージェントCLI(claude、codex、agyのいずれか)がインストールされ、認証済みである必要があります。
antigravityエージェントに関する注意
agyは内部言語サーバーを実行し、実際のターミナルを必要とします。通常のパイプから起動すると、応答する前にシャットダウンしてしまい、呼び出し側からはハングアップと区別がつきません。そのため、Windowsではこのアダプターはwinpty(Git for Windowsに同梱)の下でagyを実行し、呼び出しの間stdinを開いたままにします。
知っておく価値のある2つの結果:
winptyは終了処理中に自身のアサーションで異常終了するため、その終了コードはagyの動作を反映しません。pty経由で実行する場合、アダプターは終了コードではなく応答が返ってきたかどうかで成功を判断し、取得した出力からアサーションテキストを除外します。タイムアウト時にはプロセスツリーをPIDで強制終了します。イメージ名で強制終了すると、他の場所で開いている対話型の
agyまで終了してしまうため、意図的にそうしていません。
いずれかのバイナリが非標準の場所にある場合は、WINPTY_PATHまたはAGY_PATHを設定してください。非Windowsプラットフォームではagyは直接起動されますが、これはテストされていません。
MCPサーバーとして使用する
{
"mcpServers": {
"agent-bridge": {
"command": "agent-bridge-mcp",
"env": {
"AGENT_BRIDGE_WORKSPACE": "/path/to/your/projects"
}
}
}
}公開されるツール: agent_send、agent_status、agent_sessions、agent_cancel。
ゲートウェイとして使用する
export ABC_AUTH_TOKEN="$(openssl rand -hex 24)"
export AGENT_BRIDGE_WORKSPACE="/path/to/your/projects"
agent-bridge-gatewayゲートウェイはABC_AUTH_TOKENなしでは起動を拒否します。デフォルトのトークンはありません。
変数 | デフォルト | 意味 |
| (必須) | RESTおよびWebSocket認証用の共有シークレット |
|
| リッスンポート |
|
| バインドアドレス |
|
|
|
|
| セッションとタスクの状態ファイルが書き込まれる場所 |
| localhostのみ | カンマ区切りのCORS許可リスト |
エンドポイント
メソッド | パス | 備考 |
|
| ゲートウェイと実行中タスクの概要 |
|
| ワークスペース内で見つかったディレクトリ |
|
| セッションの一覧 |
|
| タスクの一覧 / 詳細 |
|
| エージェントにタスクをディスパッチ |
|
| 実行中のタスクをキャンセル |
|
| エビデンスゲートを実行 |
|
| リポジトリをコミットしてプッシュ |
|
| 実装/レビューループを実行 |
|
| タスク出力とライフサイクルイベント |
/api/dispatch、/api/git/commit-push、/api/review-loopは、明示的なターゲット(cwdまたはワークスペース内に解決されるproject)を必要とします。デフォルトのディレクトリにフォールバックするのではなく400を返し、ワークスペース外に解決されるproject値は拒否されます。
セキュリティ
このサービスは、セーフティプロンプトをオフにした状態でコーディングエージェントを実行します。 これにより無人ディスパッチが機能します。承認を求めて停止するエージェントは、キーボードの前に誰もいないと単にハングアップするからです。しかし、これはAPIに到達できる誰もが、ゲートウェイを実行しているユーザーとして任意のコードを実行できることを意味します。
具体的には、CLIアダプターは次のフラグを渡します:
エージェント | フラグ | オプトアウト |
Codex |
|
|
Antigravity |
|
|
どちらもデフォルトでバイパスします。オプトアウトはアダプターレベルのオプションであり、MCPツールやREST APIにはまだ接続されていないため、HTTP経由では現在バイパスは無条件です。
これは特権を持つローカルデーモンとして扱ってください:
デフォルトでは
127.0.0.1にバインドします。AGENT_BRIDGE_HOSTを他の値に設定すると、タスクディスパッチ、サンドボックスなしのコード実行、git pushがネットワークに公開されます。認証トークンは単一の共有シークレットで、ベアラーヘッダーまたは
tokenクエリパラメータとして送信されます。クエリパラメータはログに残るため、可能な場合はヘッダーを優先してください。そのトークンが漏洩することは、シェルを渡すことと同等です。ワークスペースのパスチェック以外に、プロジェクト間のサンドボックス化はありません。
/api/git/commit-pushは、ターゲットリポジトリに設定されているリモートにプッシュします。プッシュ前に再度確認はしません。
これを信頼できないネットワークに公開しないでください。また、作業に実際に必要な以上のアクセス権を持つユーザーとして実行しないでください。
開発
npm install
npm run typecheck
npm run buildライセンス
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.47168 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.33604 PyPI35MIT
- 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.25 npm3MIT