subway-mcp-server
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., "@subway-mcp-server Delegate to claude to refactor the main function"
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.
subway-mcp-server
MCP server local que expone codex, claude (Claude Code) y agy (Antigravity) como tools de delegación, para que un agente orquestador les reparta tareas vía CLI en modo no interactivo.
Tools
delegate_to_codex—codex execdelegate_to_claude—claude -p --output-format jsondelegate_to_agy—agy -p
Todas comparten el mismo input:
Campo | Tipo | Default | Descripción |
| string | — | instrucciones para el sub-agente |
| string | cwd del server | directorio de trabajo absoluto |
| string | el default de cada CLI | override de modelo |
| number | 600 (máx 1800) | mata el proceso si excede |
| boolean | false | evita prompts de permisos de la CLI (necesario para casi cualquier tarea real, porque no hay terminal para aprobar) |
Output: { success, final_message, exit_code, timed_out, stderr? } (stderr solo si success=false).
Related MCP server: agyforclaude
Build
npm install
npm run buildTests
npm testCubre cliRunner (spawn, captura de stdout/stderr, cwd, timeout, comando inexistente) y la construcción de argumentos/parseo de salida de cada tool (argBuilders), sin invocar los CLIs reales de pago.
Cobertura local: npm run coverage. En CI, el job coverage la calcula en cada push a master y commitea badges/coverage.json (leído por el badge del README vía shields.io endpoint) — delegate.ts e index.ts quedan en 0% porque solo se ejercitan invocando los CLIs reales, fuera del alcance de estos tests.
Registrar en Claude Code
claude mcp add subway -- node D:/Repo/subway/dist/index.jsEjemplo de uso
Una vez registrado, desde cualquier sesión de Claude Code en el proyecto podés pedirle al agente que delegue directamente, por ejemplo:
Delegá a agy: "Reply with exactly: PONG", con auto_approve true
Eso dispara una llamada al tool mcp__subway__delegate_to_agy con:
{
"prompt": "Reply with exactly: PONG",
"auto_approve": true
}y devuelve:
{
"success": true,
"final_message": "PONG",
"exit_code": 0,
"timed_out": false
}Mismo patrón para delegate_to_codex y delegate_to_claude, cambiando solo el nombre del tool. Para correr en otro directorio o con otro modelo:
{
"prompt": "Corré los tests y reportá cuáles fallan",
"cwd": "D:/Repo/otro-proyecto",
"model": "claude-opus-4-8",
"auto_approve": true,
"timeout_seconds": 900
}Notas
Requiere que
codex,claudeyagyestén en el PATH y ya autenticados en la máquina.No hay gate de verificación (CCDD) ni orquestación de multi-tarea acá — es solo el mecanismo de delegación. Componer lógica de PM/orquestación por encima queda del lado del agente que use este MCP.
Available Tools
3 toolsdelegate_to_agyDelegate task to Antigravity (agy) CLIADestructive
Runs the Antigravity CLI non-interactively (agy -p) to execute a task and returns its response.
Args:
prompt (string, required): task instructions for the agy agent
cwd (string, optional): absolute working directory for the task
model (string, optional): model override
timeout_seconds (number, optional, default 600): kill the process after this many seconds
auto_approve (boolean, optional, default false): bypass agy's tool-permission prompts (--dangerously-skip-permissions). Without this, tasks that need to use tools will fail immediately since there is no terminal to approve from.
Returns structured JSON: { success, final_message, exit_code, timed_out, stderr? }. Note: agy has no JSON output mode, so final_message is the raw trimmed stdout.
Error Handling:
success=false with a non-zero exit_code and stderr populated means the CLI reported an error
timed_out=true means the task exceeded timeout_seconds and was killed
Inputs: prompt (required), cwd, model, auto_approve, +1 more. Returns: stderr, success, exit_code, timed_out, +1 more
delegate_to_claudeDelegate task to Claude Code CLIADestructive
Runs Claude Code non-interactively (claude -p --output-format json) to execute a task and returns its final message.
Args:
prompt (string, required): task instructions for Claude
cwd (string, optional): absolute working directory for the task
model (string, optional): model override (e.g. "claude-opus-4-8")
timeout_seconds (number, optional, default 600): kill the process after this many seconds
auto_approve (boolean, optional, default false): bypass Claude's tool-permission prompts (--dangerously-skip-permissions). Without this, tasks that need to use tools will fail immediately since there is no terminal to approve from.
Returns structured JSON: { success, final_message, exit_code, timed_out, stderr? }.
Error Handling:
success=false with a non-zero exit_code and stderr populated means the CLI reported an error (e.g. auth, invalid model)
timed_out=true means the task exceeded timeout_seconds and was killed
Inputs: prompt (required), cwd, model, auto_approve, +1 more. Returns: stderr, success, exit_code, timed_out, +1 more
delegate_to_codexDelegate task to Codex CLIADestructive
Runs OpenAI's Codex CLI non-interactively (codex exec) to execute a coding task and returns its final message.
Args:
prompt (string, required): task instructions for Codex
cwd (string, optional): absolute working directory for the task
model (string, optional): model override (e.g. "gpt-5.6-luna")
timeout_seconds (number, optional, default 600): kill the process after this many seconds
auto_approve (boolean, optional, default false): bypass Codex's shell/edit approval prompts. Without this, tasks that need to run a command or edit a file will fail immediately since there is no terminal to approve from.
Returns structured JSON: { success, final_message, exit_code, timed_out, stderr? }.
Error Handling:
success=false with a non-zero exit_code and stderr populated means Codex reported an error (e.g. auth, invalid model, sandbox denial)
timed_out=true means the task exceeded timeout_seconds and was killed
Inputs: prompt (required), cwd, model, auto_approve, +1 more. Returns: stderr, success, exit_code, timed_out, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools are nearly identical in description and parameters, differing only in the target CLI. An agent would struggle to choose between them without additional context about each CLI's capabilities.
All tools follow the consistent pattern 'delegate_to_<name>', making it clear they are delegation actions to specific CLIs.
Three tools is appropriate for a server focused on delegating to a specific set of AI CLIs. The count is within the typical well-scoped range.
The server covers three major AI CLIs, but lacks tools for listing available CLIs, models, or managing runs, which leaves minor gaps for agent workflows.
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that exposes a library of delegation prompts to orchestrate tasks between a primary LLM and specialized sub-agents. It enables the execution of self-contained, bounded tasks with built-in support for configuration discovery and project-specific delegation libraries.3-
- AlicenseNot gradedqualityAmaintenanceMCP server enabling delegation of tasks to the Antigravity (Gemini) CLI from any AI client supporting MCP.8 npmMIT
- FlicenseNot gradedqualityBmaintenanceLocal MCP server for asynchronous coding-agent delegation, enabling Claude Code or Codex to delegate tasks to Cursor, Pi, Codex, or Claude Code and collect results later.1-
- AlicenseNot gradedqualityCmaintenanceMCP server that bridges Claude Code to Google Antigravity's CLI, enabling Claude to orchestrate Gemini workers in parallel for reading, writing, verifying, and autonomous tasks. It provides tools for single dispatch, parallel fan-out, background jobs, and handles permission, cwd, and shell pitfalls.2MIT