agent-bridge
Summary: agent-bridge is a Windows MCP server that lets one AI agent inspect and steer another agent's existing Codex, Claude desktop, or Claude Code CLI chats.
List projects and chats for
codex,claude_code, orclaude_cli, with activity order, goal status, and busy/idle state.Read recent messages and each turn's final answer from a chat.
Send text into an existing chat or start a new chat in a project/folder; busy Codex chats receive it as a Steer, and running
claude_clichats receive it in the live process.Wait for a sent message's reply by
job_id; desktop callers can get replies typed back into their chat.Get, pause, resume, or edit a Codex chat's goal and verify changes against Codex's goal store.
Ask Codex to generate an image and copy the result files to a destination directory.
agent-bridge
Let Claude steer Codex, and Codex steer Claude, in the real desktop chats you already have open.
agent-bridge is a single-file MCP server for Windows. It lets one AI coding agent list, read and message another agent's chats. It covers Codex in the ChatGPT desktop app, the Claude desktop Code tab and headless Claude Code CLI sessions. It drives the desktop apps through Windows UI Automation, filling the same composer and pressing the same buttons you would. No subprocess copy and no hidden session: the message lands in the chat you are watching, with that chat's full context.
Claude as PI, Codex as worker. Claude reads a long-running Codex chat, steers it mid-turn, and pauses, resumes or rewrites its goal.
Replies come back on their own. When the caller is itself a desktop chat, the answer is typed into the caller's chat when it is ready.
It works in both directions. Register it in Codex and Codex can hand work to a Claude session.
Tools
Tool | What it does |
| Projects (folders) for |
| Chats in a project, newest first, with each Codex chat's goal status and each Claude chat's busy/idle state. |
| The last messages of a chat: what was asked and each turn's final answer. |
| Types into an existing chat, or starts a new one in any folder. A busy Codex chat gets the message as a Steer; a running |
| Waits for the answer to a send. |
| Gets, pauses, resumes or edits a Codex chat's goal, and checks the change against Codex's goal store. |
| Has Codex make an image with its |
Related MCP server: win-computer-use
Install
Requires Windows, Python 3.11+, and the Codex (ChatGPT) and/or Claude desktop apps installed and signed in.
Claude Code
claude mcp add -s user agent-bridge -- uvx agent-bridge-mcpCodex (~/.codex/config.toml). Replies can take a while, so raise the tool timeout:
[mcp_servers.agent_bridge]
command = "uvx"
args = ["agent-bridge-mcp"]
tool_timeout_sec = 1800Any other MCP client
{ "mcpServers": { "agent-bridge": { "command": "uvx", "args": ["agent-bridge-mcp"] } } }Without uv: pip install agent-bridge-mcp, then use agent-bridge-mcp as the command.
From source: uvx --from git+https://github.com/EngMarchG/agent-bridge agent-bridge-mcp.
Example
Read my Codex chat "Implement milestones" in project
bridges, tell me where it is stuck, and steer it toward the failing test.
The calling agent runs list_chats, read_chat and then send_message. The answer arrives in its chat when Codex finishes the turn.
How it works
Listing and reading opens each app's own local files read-only: Codex's SQLite state and rollouts, and Claude's session JSON and JSONL transcripts.
Sending goes through UI Automation. The bridge first switches the ChatGPT app to Codex mode, then opens the chat from the sidebar. It handles a split Claude window. A busy Codex chat shows Queue and then Steer, and the bridge clicks Steer. Afterwards it puts back the chats you were looking at.
Replies. Every send starts a detached watcher. The watcher waits for the turn to end in the transcript and stores the reply in
~/.agent-bridge/jobs/(setAGENT_BRIDGE_HOMEto move it). If the caller is a desktop chat, the watcher types the reply into it.claude_clirunsclaude -p --resumeheadless with thepermission_modeyou pass, in stream-json mode (--input-format stream-json --output-format stream-json). The watcher owns the process and keeps its stdin open.Mid-run messages (
claude_cli). A chat runs one process at a time. A send to a chat whose run is still going does not start a second process: it goes into the running one's stdin within about a second, and the run takes it in, usually in the same turn. The job showsinto(the run's job id), and both jobs get the run's last result as their reply. Withsend_now=truethe bridge also sends the CLI's send-now control, so the running turn makes way for the message at once instead of after the tool call under way. When a result has stood a few seconds with nothing new, the bridge closes stdin and the process exits; a later send resumes the chat as usual.
Limits and safety
Windows only. It depends on UI Automation, and on the apps' current labels and layout, so an app update can break it.
It types into your real chats and briefly brings the app window forward. Don't type in the target window during a send.
Run one call at a time. Parallel calls drive the same UI and collide. A file lock serialises calls across processes.
Wake the window if needed. If a send fails with "no window found", the Chromium window has its accessibility tree off. Click into the app once.
The bridge never accepts "Trust this workspace?" for you. It never overwrites a draft that's already in the composer.
Prompt injection. Text in one agent's reply becomes input for another. Treat chains of agents with the same care as any other untrusted input.
Development
python test_agent_bridge.pyThe test checks transcript parsing only and touches no app.
License
MIT
Available Tools
7 toolscodex_generate_imageA
Ask Codex (new chat in project) to make an image with its image_gen tool, wait, and copy the
result(s) into dest_dir. Returns the copied file paths; open them with your image viewer/Read tool.
Inputs: prompt (required), dest_dir (required), project, timeout_s.
codex_goalB
Read or steer the goal of a Codex chat (id or exact title).
action: 'get' | 'pause' (the stop button) | 'resume' (the start button) | 'edit' (opens Edit goal, replaces the
objective with objective, presses Save). Changes are checked against Codex's goal store.
Inputs: chat (required), action, project, objective.
list_chatsC
List chats in a project (name or path from list_projects), newest first. codex chats show their goal status; claude chats show busy / idle / closed.
Inputs: app (required), project (required), limit. Returns: result
list_projectsB
List projects (folders) for app = 'codex', 'claude_code' or 'claude_cli', most recently active first.
Inputs: app (required). Returns: result
read_chatB
Read the last messages of a chat (id or exact title): what was asked and each turn's final answer.
Inputs: app (required), chat (required), last, project.
send_messageA
Send text into a chat and press Enter.
chat: id or exact title of an existing chat. Or leave chat empty to start a new chat: in project (a project
name from list_projects, or any folder path; Codex gets a project made for a new folder), or with no folder
when project is empty too.
codex / claude_code are driven through the desktop app; a split Claude window is fine (a chat already on screen
is used in place, otherwise it opens in the focused pane). The view returns to the chats the user was on.
claude_cli runs claude -p --resume headless with permission_mode.
Returns a job_id. When the answer is ready it is saved; if you are a desktop chat it is also typed into your
chat (notify_caller). Otherwise call wait_reply(job_id).
Inputs: app (required), text (required), chat, project, +2 more.
wait_replyA
Wait until the chat behind job_id has answered (or timeout_s passes) and return the job with its reply.
Inputs: job_id (required), timeout_s.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a distinct resource+action: list_projects vs list_chats vs read_chat are clearly layered by scope, and send_message/wait_reply form a complementary pair rather than overlapping. codex_goal and codex_generate_image are Codex-specific but clearly named, though a few tools (read_chat vs list_chats) require reading descriptions to fully separate.
Most tools follow a consistent verb_noun pattern (list_projects, list_chats, read_chat, send_message, wait_reply). The codex_* prefix on codex_goal and codex_generate_image is a sensible namespace convention rather than a break, giving mostly consistent naming.
7 tools is well-scoped for an agent-bridge: it covers discovery, messaging, waiting, and two Codex-specific extras without bloat. Each tool earns its place in the bridging workflow.
Core lifecycle is covered: list projects/chats, read, send, wait for reply, plus goal control and image generation. Creation is implicitly handled by send_message with an empty chat, but there is no explicit project creation, chat deletion/close, or job cancellation—minor gaps agents can mostly work around.
Maintenance
Related MCP Connectors
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
Give your AI hands on every computer you own. Remote control of your Windows, Mac and Linux machines from one ChatGPT, Claude or Cursor chat — even from your phone. Ask it to find out why the office server is crawling, update every PC in the house, sort out your mom's laptop from another city, or ship the site from your work machine while you're on a train. It runs commands, reads files and takes a screenshot when it needs to see the screen. You decide what each computer allows, and you can cut any of them off in a second.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to control Windows desktop applications by wrapping Codex's Computer Use capability.1311MIT
- AlicenseNot gradedqualityFmaintenanceEnables Claude Code to control a Windows desktop via screenshots, mouse, keyboard, and window/display enumeration, reusing the native binding from the Claude desktop app.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code on Windows to read the foreground window's UI Automation tree as structured text and then act on it with real, human-like SendInput mouse and keyboard events. It drives desktop apps through a perceive-decide-act loop without screenshots, a vision model, or any locally hosted LLM.MIT
- AlicenseAqualityFmaintenanceLets Claude Desktop and Claude Code inspect and drive Windows desktop applications in the background, including clicking, typing, launching, and verifying results, while the user keeps their mouse, keyboard, and foreground window.7420 PyPI4MIT