trio-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
trio-mcp
Claude Code, OpenAI Codex and Google Antigravity call each other over MCP. It uses the CLIs you already have installed and signed in. No API keys, no proxies.
English · 简体中文
Why
One orchestrator with specialist peers. The CLI you are working in acts as the lead. It can ask
agy(Gemini) for unbiased strategy, askclaudefor architecture, and hand implementation tocodex.Isolated background jobs. Each coding task gets its own
git worktreeon branchtrio/<id>, and the call returns right away. You check on it later, so long jobs are not killed by the host's tool-call timeout.Zero-context cross review. A new read-only reviewer reads the diff and replies
PASSorREVISEon its first line. If that line is missing, the verdict isUNKNOWN. After twoREVISEverdicts in a row on the same target, trio advises handing the decision to a human.
flowchart LR
H["Orchestrator<br/>claude · codex · agy"] -->|stdio MCP| T["trio-mcp"]
T -->|"trio_ask · read-only"| S["strategist · agy"]
T -->|"trio_ask · read-only"| A["architect · claude"]
T -->|"trio_dispatch · worktree"| C["coder · codex"]
T -->|"trio_review · zero-context"| R["reviewer · codex"]Related MCP server: agentmux
Quick start
You need Python 3.11+, git, and at least two of claude, codex, agy installed and signed in.
uv tool install git+https://github.com/lbt81957/trio-mcp.git
trio doctor # git + CLI login status
trio setup-mcp # dry run: prints what would be registered
trio setup-mcp --target all --apply # or --target claude | codex | antigravity--apply registers the trio stdio server with each host:
Host | Registration |
Claude Code |
|
Codex |
|
Antigravity | adds |
For Codex, also add tool_timeout_sec = 900 under [mcp_servers.trio] in ~/.codex/config.toml. Otherwise Codex may cut off synchronous trio_ask and trio_review calls. Reload the host, then give it a plain request:
Ask the strategist for clearer names for the export API. Then have a coder implement it with pytest tests, get it reviewed, and summarize the diff for me.
What happens:
trio_ask(role="strategist")runsagyread-only in an empty scratch directory. It can't see your code, so the prompt has to include any context it needs.trio_dispatch(role="coder")startscodexin a new worktree in the background and returns awrk_…ID.Poll with
trio_status(conv_id=..., wait_sec=110)until the job finishes.trio_review(target_conv_id=...)then reviews that worktree's diff.Check the diff and bring the worker changes back with
trio_apply(conv_id=...). Once you verify the applied changes, remove the worker's copy withtrio_cleanup(force=True).
You can also have an agent install trio for you. Send it: Read https://github.com/lbt81957/trio-mcp/blob/main/docs/ai-install.md and follow Step 0 to Step 9 to install, register and verify trio-mcp. The same guide covers installing into a venv without uv.
MCP tools
Tool | Purpose |
| Ask a peer a read-only question (default role |
| Continue a session by |
| Start a background worktree job. Options include |
| Review the repo diff, a worker via |
| Inspect a job with |
| Three-way merge in a temporary index, then install files with rollback on failure. Preserves the caller's index. |
| Replay the saved prompt of an eligible failed, timed-out, or empty job. The new ID is linked by |
| Remove a finished worker's worktree and branch. |
| Show the active role presets after TOML overrides and the harnesses' web capabilities. |
Statuses are queued, running, done, failed and timeout. A single-job lookup also returns resumable, plus a response_path that points to the full reply saved as Markdown. If a job times out, trio keeps whatever the agent had already written. Every tool except trio_retry also has a CLI command (trio ask, trio dispatch --bg, trio status, …). The CLI adds trio doctor, trio setup-mcp and trio diff <wrk_id>.
An empty reply from a successful CLI turn produces
empty_responsefor an ask or a worktree dispatch with a verified clean diff. An in-place dispatch (worktree=false) finishes asdonewith anempty_response_unverifiedentry inwarnings, including the exit code and output tails.Dispatch retries require a verified clean saved diff and a current worktree that matches its recorded base, including the Git index and non-ignored untracked files. For in-place dispatch, inspect the checkout and submit a new job for the remaining work.
snapshot="working"includes tracked edits and non-ignored untracked files within a 200 MB budget. It lists skipped files insnapshot_skipped_pathsand starts diffs after the snapshot commit. Set[dispatch] snapshot_max_mborTRIO_SNAPSHOT_MAX_MBto change the budget.write_settakes preferred repo-relative globs. Use**for nested directories. Status lists violations and warns about overlapping in-place runs.accept_cmdor[acceptance] cmdtakes an argument array such as["python", "-m", "pytest"]or a shell-quoted string. Trio resolves the executable outside the worker directory and runs it directly with a cleaned environment. Status records the exit code and last 50 lines when acceptance finishes.Restart the MCP host after updating trio to refresh tool schemas. Server defaults come from
[dispatch] allow_unsandboxed_writeand[status] include_diff/fullin.trio/roles.toml, orTRIO_ALLOW_UNSANDBOXED_WRITE,TRIO_INCLUDE_DIFFandTRIO_FULL. Explicit arguments override environment variables, which override TOML.
Roles
Role | Harness | Runs as | Effort | Timeout |
|
| read-only, empty scratch dir |
| 600 s |
|
| read-only, repo root |
| 1800 s |
|
| read-only, fresh session |
| 1800 s |
|
|
|
| 1800 s |
trio does not hard-code any model IDs. Each CLI uses the model it is already configured with. Any call can override to, effort and timeout_sec.
Overrides:
~/.trio-mcp/roles.toml, then<repo>/.trio/roles.toml. Later files win. Check the merged result withtrio_roles.Shared context: if
.trio/context.mdexists, trio puts it at the start of every agent prompt, including the strategist's.
Safety model
Windows permits direct Claude and Antigravity writes by default and shows a sandbox warning. Set
allow_unsandboxed_write=Falseor[harnesses.<name>] allow_unsandboxed_write = falseto opt out. Direct dispatch uses the harness's normal hooks and settings.Direct Claude dispatch auto-approves Bash and accepts edits in the working directory. Supply
extra_read_dirs(CLI--extra-read-dir, repeatable) to grant file-tool reads from absolute local directories. Claude's editing tools deny edits there. Bash still runs with the worker's OS permissions.write_mode="blocks"runs read-only, suppresses workspace hooks and plugins, and applies returned UTF-8 files. Git-ignored block outputs are included with a warning. Concurrent caller edits stop the batch.Dispatch warns about write-set violations. Patch delivery requires
allow_outside=Truefor outside-set files, always blocks reserved.gitand.triopaths and unsafe links, and rolls back on failure.Host acceptance launches an executable directly. On timeout, Windows stops the Job Object tree and POSIX stops the original process group. A POSIX child that starts a new session can survive.
Dispatch uses its own worktree by default. Trio stores state and per-worker temporary files under
.trio/. Useforce=Trueto clean up a worktree after you have preserved its edits.Clean-context agy asks can create temporary files inside their conversation's scratch directory. Failed agy turns report denied actions when available and reference the CLI log under
.trio/logs/.
AI install guide · 简体中文 · MIT License
Development
From the repository root, run python -m pytest -q. For a read-only checkout, set TRIO_TEST_TMPDIR to a directory writable by the sandbox. Pytest uses it for default capture, test repositories, and subprocess temporary files.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Shared rooms where Claude Code, Codex, Cursor and other MCP agents talk and split work.
Shared memory and mail for your AI agents. Verified with Claude Code; other MCP clients in testing.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables multi-agent AI collaboration by connecting Claude Code, OpenAI Codex, and Google Antigravity, providing cross-model code reviews, independent second opinions, and autonomous validation through MCP tools.1MIT
- AlicenseBqualityBmaintenanceEnables any MCP host to delegate work to multiple coding-agent CLIs such as Codex, Claude Code, and Antigravity as subagents, preserving native sessions and supporting team-based supervision and agent-to-agent messaging.1719 npmApache 2.0
- AlicenseAqualityBmaintenanceEnables MCP-compliant AI coding agents to dispatch tasks to other CLI harnesses, execute work in isolated Git worktrees, apply generated diffs, and collaborate across separate subscription accounts.62MIT
- AlicenseNot gradedqualityBmaintenanceEnables multiple AI agents to hold same-round discussions, approve a shared plan, split and execute file and command work in parallel, verify results, and request read-only Claude advice on failure, all through a single MCP service with dashboard and CLI access.MIT