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 (e.g., Claude running in Cowork) that cannot operate a terminal GUI to drive four locally installed, logged-in coding CLIs:
Server | Internal Command | 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 enable only the corresponding bridge.
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 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 first call; subsequent calls use the same id to continue, without relying on the fuzzy semantics of "continue the most recent one."agy: cannot pre-specify an id; on first run, extracts
conversation_idfrom--output-format stream-jsonand returns it; subsequent calls use--conversation <id>to continue.codex: on first run, extracts
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 first call; subsequent calls use the same id to continue.
Zero shell injection: all four use
shell:falsedirectly with spawn, the prompt is a single argv element, no shell special characters are interpreted.Conservative permission flags:
Default allows read/write files (as the user chooses), but write/dangerous capabilities are still compartmentalized.
pi defaults without project trust
-a(only enabled withapprove_project).agy defaults without
--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(required for non-interactive), not--allow-all(which includes paths + urls); the latter requiresdangerously_allow_all:true.
Auditing: each call writes one JSONL line to
logs/<pi|agy|codex|copilot>-YYYYMMDD.jsonl(prompt, session/thread id, exit code, duration, usage).
Pitfalls Encountered (from actual testing)
stdin must be closed: CLIs treat piped stdin as extra context; Node spawn leaves an open stdin pipe by default, 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) will hang in headless mode (waiting for a UI that never appears). Therefore, default is--no-extensions, enable withenable_extensions:truewhen needed.codex must include
--skip-git-repo-check: if cwd is not a git repo (e.g.,C:/Cheerio), without this flag it will immediately error and exit.copilot non-interactive mode must have
--allow-all-tools: documentation explicitly states non-interactive mode requires this flag, otherwise it will hang waiting for user permission confirmation. The bridge includes--allow-all-toolsby default, but--allow-all(paths + urls) is only enabled withdangerously_allow_all:true.copilot MCP server loads very slowly: in non-interactive mode, copilot still loads all MCP servers (playwright, notion, tavily, etc.), startup alone takes 10~30 seconds. Setting timeout too short will kill it during MCP loading.
copilot default auto-routing may hit quota: 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 will fail directly. It is recommended that the caller explicitly specify a model.Copilot/Codex cannot query remaining total quota non-interactively:
Copilot:
copilot billing/copilot limitsare help topics, only useful in interactive mode UI. The non-interactive CLI has nocopilot usagecommand. The bridge can only obtain "snapshot at time of failure" fromquotaSnapshotsin themodel.call_failureevent, cannot actively query remaining quota.Codex:
codex login statusonly shows login method (e.g.,Logged in using ChatGPT), no usage/quota query.codex doctoronly does installation diagnostics. The bridge'sturn.completed.usageonly contains token usage for that turn, no remaining quota.
Enterprise TLS intercepting proxy may cause
npm installfailure: some organizations use TLS-inspecting proxies (e.g., certificate interception solutions from security vendors) to perform man-in-the-middle decryption on HTTPS traffic. This causes Node.js TLS validation to fail, withnpm installreporting errors likeUNABLE_TO_GET_ISSUER_CERT_LOCALLYorcertificate chain incomplete. Solution: set environment variableNODE_EXTRA_CA_CERTSto point to the company's complete certificate chain file (PEM format); note that you need the CA intermediate certificate, not just the leaf cert.GitHub Copilot Enterprise IP allow list may block CLI access: if your GitHub Copilot Enterprise account has an IP allow list enabled,
ask_copilotmay be directly blocked by the API (error message similar to "enterprise has an IP allow list enabled, and your IP address is not permitted"). This is completely unrelated to bridge / MCP configuration; you need to contact your GitHub Enterprise administrator to confirm whether the current egress IP is on the allow list, or whether you need to use a specific VPN / corporate network.
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 into the MCP client configuration, do not add the ones not 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 which of the 4 CLIs were found, whether they can run --version, and which bridges are recommended to enable.
Step 3: Install the CLIs you need (if not already installed)
Below are the installation and login methods for each CLI, skip the ones not installed, you don't need to install 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 configuration you need from mcp-config.example.json into your MCP client configuration (e.g., ~/.mcp.json or .mcp.json).
Do not copy all four. Only copy the blocks corresponding to the CLIs that are installed and logged in on this machine, then adjust 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 bridge works correctly
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 get an error, 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 MCP Client
See mcp-config.example.json. It's 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 actual paths. Not all four need to be copied.
Tool Interface
ask_pi
Parameter | Type | Default | Description |
| string | — | Instruction to send to pi (required) |
| string | auto-generated | Pass the value returned from previous call to continue |
| boolean | false | When true, only allows |
| string | — | Override model |
| boolean | false | Whether to trust project 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 | — | Instruction to send to agy (required) |
| string | auto-captured | Pass the value returned from previous call to continue |
| string | — | Model slug (see |
| low|medium|high | — | Reasoning effort |
| boolean | false | Enable terminal sandbox (--sandbox) |
| boolean | false | Dangerous: auto-approve all tool permissions (including shell) |
| number | 300000 | Hard timeout (also used as agy --print-timeout synchronously) |
Returns: agy's final response + one line of agy-bridge metadata (including conversation_id, status).
ask_codex
Parameter | Type | Default | Description |
| string | — | Instruction to send to Codex (required) |
| string | auto-generated | Pass the thread_id from previous call to continue |
| string | — | Override model (e.g., |
| read-only|workspace-write|danger-full-access | read-only | Sandbox strategy |
| number | 300000 | Hard timeout |
Returns: Codex final text + one line of codex-bridge metadata (including thread_id, usage).
ask_copilot
Parameter | Type | Default | Description |
| string | — | Instruction to send to Copilot (required) |
| string | auto-generated | Pass the value returned from previous call to continue |
| string | — | Override model (e.g., |
| none|minimal|low|medium|high|xhigh|max | — | Reasoning effort |
| number | — | Spend cap for a single call (safety valve) |
| boolean | false | Dangerous: add |
| number | 300000 | Hard timeout |
Returns: Copilot 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 interactive mode UI. The bridge can only report "how much this call consumed" (usage+quotaSnapshotsfor that call), cannot report remaining total quota. Codex is similar:codex login statusonly shows login status, no usage query.
Environment Variables
Variable | Default |
|
|
| Global path to pi's |
| Path to |
|
|
|
|
| Path to |
|
|
|
|
| Path to |
|
|
|
|
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
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CheerioCorner/cheerio-mcp-bridges'
If you have feedback or need assistance with the MCP directory API, please join our Discord server