Opencode
FreeNot checkedAn MCP server that lets an AI coding agent delegate implementation work to the OpenCode CLI, choosing an explicit provider + model on every call.
About
An MCP server that lets an AI coding agent delegate implementation work to the OpenCode CLI, choosing an explicit provider + model on every call.
README
Send every coding task to the right-priced model automatically — cheap models for
the grunt work, your heavy hitter for the hard problems — and never lose work to a
failed backend. mcp-orchestrate is one MCP server that maps three tiers
(light / standard / heavy) onto the coding CLIs you already run — opencode,
grok, and codex — with capability filtering, cooldowns, and a fallback that only
retries on a fast, clean failure with a byte-identical git tree, so a
half-finished run is never silently redone somewhere else.
Works with any MCP client — Claude Code, Codex, Cursor, opencode, or your own.
mcp-orchestrate --init # guided setup
Is it for you?
Use it if you run more than one coding-agent CLI and want cost/capability control without hand-picking a model every time — plus safe automatic failover. If you only use a single backend or a single model, you don't need the router; install that backend's own MCP (see below) instead.
One server, or just the individual MCPs
mcp-orchestrate— the main product. One MCP server with tier routing, cooldowns, and safe fallback built in. Configure once with--init, done.Just want the individual MCPs? If you only need a plain MCP for each coding CLI you use — no routing — install them directly and let your assistant call whichever it needs:
# Claude Code (Codex: swap `claude mcp add` for `codex mcp add`) claude mcp add opencode -- npx -y mcp-opencode claude mcp add grok -- npx -y mcp-grok # codex ships its own MCP via the codex CLI: `codex mcp ...`These are siblings of the router over the same CLIs — no tiers, cooldowns, or fallback.
Requirements
The router spawns the backend CLIs you enable, so each must be installed and authenticated:
opencode,grok, and/orcodex— whichever backends your tiers use.- Node.js >= 20.
Quick start
Register the stdio server with your MCP client — generic form first, then common clients:
# generic: any MCP client spawns this command
npx -y mcp-orchestrate
# Claude Code
claude mcp add orchestrate -- npx -y mcp-orchestrate
# Codex
codex mcp add orchestrate -- npx -y mcp-orchestrate
Then configure your tiers (you choose every model — nothing is baked in):
mcp-orchestrate --init # interactive wizard; writes ~/.config/mcp-router/config.json
mcp-orchestrate --check # validate an existing config
A minimal config:
{
"tiers": {
"light": { "backend": "grok", "model": "grok-4.5" },
"standard": { "backend": "opencode", "model": "<provider>/<model>" },
"heavy": { "backend": "codex", "model": "<model>" }
},
"fallbacks": { "heavy": "standard", "standard": "light" }
}
Now a route(tier: "heavy", …) call runs codex. If it fails fast and cleanly and
your git tree is untouched, the router retries the next configured entry
(cross-provider hops require an explicit opt-in) — so a half-finished run is never
silently redone on another backend.
How it works — it spawns CLIs, not MCPs
your MCP client ──calls──▶ mcp-orchestrate ──spawns──▶ opencode / grok / codex (CLI binaries)
mcp-opencode, mcp-grok ── siblings: separate MCP servers over the same CLIs
(the router never calls them)
The router is only an MCP server — it has no MCP client inside it, so it never
calls mcp-opencode, mcp-grok, or the codex MCP. Whether those are installed has
no effect on whether a route works.
Backends vs. models. A backend is the CLI program that runs the task
(opencode / grok / codex); a model is the AI it runs (e.g. grok-4.5,
glm-5p2, gpt-5.6-terra). One backend can front many models — which ones you can
route to depends on how you've configured that CLI (your opencode install might
front Anthropic, OpenAI, Fireworks, or a local provider). The router never adds
models; it routes to whatever your installed CLIs already expose. (There is no
separate claude backend — reach Claude models through a backend that serves them.)
Packages
- mcp-orchestrate — the tier router (main product); spawns the opencode/grok/codex CLIs. Published: mcp-orchestrate.
- mcp-opencode — single-backend MCP over the opencode CLI. Published: mcp-opencode.
- mcp-grok — single-backend MCP over the Grok Build CLI. Published: mcp-grok.
Per-package READMEs carry the full tool schemas, config format, environment variables, and security limitations:
- mcp-orchestrate tiers, fallback, init, and config
- mcp-opencode setup and tools
- mcp-grok setup and tools
@mcp-coding-agents/core is a private, never-published package holding the shared
run/parse/classify/redact/validateCwd runtime; it is bundled into each product's
dist at build, so it is never a runtime npm dependency.
Develop
Clone and build from source (contributor setup — end users don't need this):
npm install
npm run build
npm test
Iterate on one package in isolation:
npm run build --workspace mcp-orchestrate
npm test --workspace mcp-orchestrate
The root package is private and has no bin, files, or publishable behavior.
License
MIT. Each publishable package contains its own copy of LICENSE.
Installing Opencode
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/shreeraman96/mcp-coding-agentsFAQ
Is Opencode MCP free?
Yes, Opencode MCP is free — one-click install via Unyly at no cost.
Does Opencode need an API key?
No, Opencode runs without API keys or environment variables.
Is Opencode hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Opencode in Claude Desktop, Claude Code or Cursor?
Open Opencode on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Opencode with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
