cheerio-mcp-bridges
Allows sending prompts to the GitHub Copilot CLI, enabling non-interactive coding assistance with session continuation and optional model selection.
Allows sending prompts to Google Antigravity CLI, enabling coding agent interactions with conversation continuation and configurable sandbox/effort settings.
Allows sending prompts to OpenAI's Codex CLI for coding tasks, supporting thread/session management, sandbox policies, and model overrides.
Click on "Install 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., "@cheerio-mcp-bridgesask Copilot to generate a regex for email validation"
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.
cheerio-mcp-bridges
Four "narrow tool" MCP servers that allow an orchestrator agent that cannot operate a terminal GUI (e.g., Claude running in Cowork) to drive four locally installed, logged-in coding CLIs:
Server | Internal Call | Exposed Tool | Language |
|
|
| Node.js |
|
|
| Node.js |
|
|
| Node.js |
|
|
| Node.js |
The four bridges are independent; you don't need to install all four. First run npm run doctor to see which CLIs are available on this machine, then only enable the corresponding bridges.
Each server exposes a single, scoped tool (not a generic run_command) — it can only "send a prompt to that agent." The residual risk lies in what the underlying CLI can do after receiving the prompt, so the default posture is conservative.
Design Points
Working directory locked by the server: cwd comes from environment variables (
PI_BRIDGE_CWD/AGY_BRIDGE_CWD/CODEX_BRIDGE_CWD/COPILOT_BRIDGE_CWD), the caller's prompt cannot change it.Deterministic session continuation:
pi: Server generates a UUID →
--session-id(pi supports "create if not exists"), returns the id on the first call; subsequent calls use the same id to continue, avoiding the ambiguous "continue the most recent one" semantics.agy: Cannot pre-specify an id. After the first run, extracts the
conversation_idfrom--output-format stream-jsonand returns it; subsequent calls use--conversation <id>to continue.codex: After the first run, extracts the
thread_idfrom thethread.startedevent and returns it; subsequent calls usecodex exec resume <id>to continue.copilot: Server generates a UUID →
--session-id, returns the id on the first call; subsequent calls use the same id to continue.
Zero shell injection: All four use
shell:falsewith direct spawn, the prompt is a single argv element, and no shell special characters are interpreted.Conservative permission flags:
Default allows read/write files (matching user choice), but write/dangerous capabilities are still segmented.
pi defaults to not using project trust
-a(only enabled withapprove_project).agy defaults to not using
--dangerously-skip-permissions; workspace read/write is allowed automatically, shell commands remain gated unlessdangerously_allow_all:true.codex defaults sandbox to
read-only(danger-full-accessmust be explicitly specified).copilot defaults to only
--allow-all-tools(necessary for non-interactive), not--allow-all(which includes paths + urls); the latter requiresdangerously_allow_all:true.
Audit: Each call writes one JSONL line to
logs/<pi|agy|codex|copilot>-YYYYMMDD.jsonl(prompt, session/thread id, exit code, duration, usage).
Related MCP server: all-agents-mcp
Pitfalls Encountered (from actual testing)
stdin must be closed: CLIs treat piped stdin as additional context. Node's default spawn leaves an open stdin pipe, causing the CLI to hang waiting for EOF. Solution:
stdio: ['ignore','pipe','pipe'].pi extensions disabled by default: Interactive extensions (e.g.,
auto-annotate/plannotator) hang in headless mode (waiting for a UI that never appears). Therefore,--no-extensionsis the default; useenable_extensions:trueto re-enable them.codex must use
--skip-git-repo-check: If cwd is not a git repo (e.g.,C:/Cheerio), omitting this flag causes an immediate error and exit.copilot non-interactive mode requires
--allow-all-tools: The documentation explicitly states that non-interactive mode must include this flag, otherwise it hangs waiting for user permission confirmation. The bridge includes--allow-all-toolsby default, but--allow-all(including paths + urls) is only enabled whendangerously_allow_all:true.copilot MCP server loads slowly: Even in non-interactive mode, copilot loads all MCP servers (playwright, notion, tavily, etc.), taking 10-30 seconds just to start. Setting the timeout too short will kill it during the MCP loading phase.
copilot default auto-routing may hit quota limits: When no model is specified, copilot's hydra router automatically selects a model (e.g.,
gpt-5-mini). If that model's quota is exhausted, it fails immediately. It is recommended that the caller explicitly specify a model.Copilot/Codex cannot query remaining quota in non-interactive mode:
Copilot:
copilot billing/copilot limitsare help topics, only useful in the interactive mode UI. The non-interactive CLI has nocopilot usagecommand. The bridge can only get a "snapshot at the time of failure" from themodel.call_failureevent'squotaSnapshots, it cannot proactively query remaining quota.Codex:
codex login statusonly shows the login method (Logged in using ChatGPT), with no usage/quota query.codex doctoronly performs installation diagnostics. The bridge'sturn.completed.usageonly provides token usage for that call, not remaining quota.
Enterprise TLS interception proxies may cause
npm installto fail: Some organizations use TLS inspection proxies (e.g., security vendor certificate interception solutions) to perform man-in-the-middle decryption of HTTPS traffic. This causes Node.js TLS validation to fail, withnpm installreporting errors likeUNABLE_TO_GET_ISSUER_CERT_LOCALLYorcertificate chain incomplete. Solution: Set the environment variableNODE_EXTRA_CA_CERTSto point to the company's complete certificate chain file (PEM format). Note that this needs to be the CA intermediate certificate, not just the leaf cert.Enterprise IP allow list blocking CLI access (bridge handles this by default): If your account's enterprise plan (e.g., GitHub Copilot Enterprise) has an IP allow list enabled,
ask_copilotmay be blocked by the API (error message similar to "enterprise has an IP allow list enabled, and your IP address is not permitted"). The root cause is usually: The bridge server's parent process environment hasHTTP_PROXY/HTTPS_PROXYproxy settings. The child process's CLI tool inherits these proxy variables, causing OAuth requests to go through the enterprise proxy, and the proxy's egress IP is not on the allow list. Starting from v0.2.0, the bridge automatically strips proxy environment variables (HTTP_PROXY/HTTPS_PROXY/ALL_PROXYincluding case variations) from the child process's env by default, allowing the CLI to connect directly to avoid this issue. If your environment requires the opposite (must go through a proxy to reach the target service), setBRIDGE_BYPASS_PROXY=falseto revert to letting the child process inherit proxy settings.
Cross-Machine Installation (From Scratch)
The four bridges are independent. First run
npm run doctorto see which CLIs are available on this machine, only register the corresponding bridges in the MCP client configuration, don't add the ones that aren't installed.
Prerequisites
Node.js ≥ 18 (needs to support
node:testand ES modules)npm ≥ 9
Step 1: Clone & Install
git clone https://github.com/CheerioCorner/cheerio-mcp-bridges.git
cd cheerio-mcp-bridges
npm installStep 2: Check Which CLIs Are Available
npm run doctorThis will output a table showing whether each of the 4 CLIs was found, whether they can successfully run --version, and which bridges are recommended for enabling.
Step 3: Install the CLIs You Need (If Not Already Installed)
Below are the installation and login methods for each CLI. Skip the ones you don't need; you don't have to install them all:
pi (earendil-works/pi)
npm install -g @earendil-works/pi-coding-agent
pi # 首次啟動會引導登入Verify: pi --version or pi --help
agy (Google Antigravity CLI)
# 請參考官方文件安裝,通常是一個獨立執行檔
# https://github.com/nicholasareed/antigravity
agy # 首次啟動會引導 Google 帳號授權Verify: agy --version
codex (OpenAI Codex CLI)
# 請參考 OpenAI 官方文件安裝
# Windows 通常安裝在 %LOCALAPPDATA%/Programs/OpenAI/Codex/
codex login # 會引導 ChatGPT 帳號授權Verify: codex --version, codex login status
copilot (GitHub Copilot CLI)
npm install -g @github/copilot-cli
copilot login # 會引導 GitHub 帳號授權Verify: copilot --version
Step 4: Optionally Enable Bridges
Copy the bridge configurations you need from mcp-config.example.json into your MCP client configuration (e.g., ~/.mcp.json or .mcp.json).
Don't copy all four. Only copy the blocks corresponding to the CLIs that are installed and logged in on this machine, then adjust the paths and environment variables.
For example, if you only have pi and copilot installed, only add the pi-bridge and copilot-bridge blocks.
Step 5: Verify the Bridge is Working
After starting your MCP client, send a small test prompt using the corresponding tool:
ask_pi:{ "prompt": "Reply only: pong" }ask_agy:{ "prompt": "Reply only: pong" }ask_codex:{ "prompt": "Reply only: pong" }ask_copilot:{ "prompt": "Reply only: pong" }
You should receive a pong reply and a line of bridge metadata. If you receive an error message, check:
Whether the CLI executable path (environment variable
*_BRIDGE_ENTRY) is correctWhether the CLI is logged in
Whether the cwd environment variable (
*_BRIDGE_CWD) exists
Quick Start
cd C:/Cheerio/Claude/mcp-bridges # 或你 clone 的路徑
npm install
npm run doctor # 檢查哪些 CLI 可用
npm test # 執行 parser/arg-builder 單元測試(不花 API 額度)Registering with an MCP Client
See mcp-config.example.json. It is a menu — based on the CLIs actually available on your machine, only copy the corresponding blocks into your MCP client configuration (.mcp.json) and adjust according to the actual paths. You don't need to copy all four.
Tool Interfaces
ask_pi
Parameter | Type | Default | Description |
| string | — | The instruction to send to pi (required) |
| string | Auto | Pass the value returned last time to continue the conversation |
| boolean | false | When true, only allows |
| string | — | Override the model |
| boolean | false | Whether to trust the project's local resources (pi -a) |
| boolean | false | Whether to load extensions (risk of hanging) |
| number | 300000 | Hard timeout |
Returns: pi's final text + one line of pi-bridge metadata (including session_id).
ask_agy
Parameter | Type | Default | Description |
| string | — | The instruction to send to agy (required) |
| string | Auto | Pass the value returned last time to continue |
| string | — | Model slug (see |
| low|medium|high | — | Reasoning effort |
| boolean | false | Enable terminal sandbox restrictions (--sandbox) |
| boolean | false | Dangerous: Auto-approve all tool permissions (including shell) |
| number | 300000 | Hard timeout (also used as agy --print-timeout) |
Returns: agy's final response + one line of agy-bridge metadata (including conversation_id, status).
ask_codex
Parameter | Type | Default | Description |
| string | — | The instruction to send to Codex (required) |
| string | Auto | Pass the thread_id returned last time to continue |
| string | — | Override the model (e.g., |
| read-only|workspace-write|danger-full-access | read-only | Sandbox strategy |
| number | 300000 | Hard timeout |
Returns: Codex's final text + one line of codex-bridge metadata (including thread_id, usage).
ask_copilot
Parameter | Type | Default | Description |
| string | — | The instruction to send to Copilot (required) |
| string | Auto | Pass the value returned last time to continue the conversation |
| string | — | Override the model (e.g., |
| none|minimal|low|medium|high|xhigh|max | — | Reasoning effort |
| number | — | Cost cap for a single call (safety valve) |
| boolean | false | Dangerous: Adds |
| number | 300000 | Hard timeout |
Returns: Copilot's final response + one line of copilot-bridge metadata (including session_id, usage, quota_snapshots).
Quota Query Limitation: The Copilot CLI has no non-interactive command to query "remaining total quota."
copilot billing/copilot limitsare only useful in the interactive mode UI. The bridge can only report "how much was consumed in this call" (usage+ the call'squotaSnapshots), it cannot report remaining total quota. Codex is similar;codex login statusonly shows login status, with no usage query.
Environment Variables
Variable | Default |
|
|
| Global path to pi's |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BRIDGE_BYPASS_PROXY: The bridge defaults to stripping HTTP_PROXY/HTTPS_PROXY/ALL_PROXY (including case variations) from the child process's env before calling the underlying CLI, preventing the child process from being affected by enterprise proxy settings inherited from the parent process. The strip behavior is only disabled when explicitly set to the string "false".
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Governed AI agent skills — one library, distributed to devs and exposed to remote agents over MCP.
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
Human-input bridge for AI agents with voice-first answer links, MCP tools, and HTTP APIs.
Related MCP Servers
- AlicenseAqualityFmaintenanceProvides unified access to multiple CLI AI agents (Codex, Gemini, Claude, and OpenCode) through a single MCP interface with real-time task monitoring, enabling specialized code analysis, UI design, implementation, and prototyping workflows.1121MIT
- AlicenseBqualityFmaintenanceEnables orchestrating multiple AI CLI agents (Claude Code, Codex, Gemini CLI, Copilot CLI) through a unified MCP interface for task delegation, cross-agent comparison, and specialized tools like code review and debugging.141314MIT
- AlicenseAqualityDmaintenanceBridges any MCP client (like Claude Code, Zed, VS Code) to any ACP coding agent, enabling multi-agent orchestration from a single chat interface.241409Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP bridge for calling local coding-agent CLIs (Codex, Claude) from another agent, enabling bounded tasks like code review, verification, and bug hunting.MIT