opencode-navigator
opencode-navigator
An MCP server that lets Claude Code plan while cheaper (or free) models do the coding through opencode. Claude stays the only interface: opencode's permission requests and questions come back to you inside Claude Code, and several jobs can run in parallel in separate git worktrees.
Features
Switch between any model opencode knows (OpenCode Zen, OpenRouter, and others) per job, with defaults and routing by task type (
explore,implement,hard,review).Approvals and questions end to end: native dialogs where the client supports MCP elicitation, otherwise Claude Code's own approval prompt.
Parallel jobs, each in its own worktree and branch (
oc/<job>); merge only after you have seen the diff, with checks for failed verification, secret-looking strings and conflicts.Compact results for Claude's context: short summary, structured report, changed files; full text and patches stay in files.
verify(your test command), automatic second-modelreview,allowed_pathsscope limits,max_costbudget cap, cost ledger, macOS notifications.Jobs persist across restarts. Long jobs are fine:
checkwaits up to 120 s per call and theopencode-workersubagent keeps polling until the job ends.
Related MCP server: opencode-delegate
Requirements
Node 20 or newer
opencode installed and logged in (
opencode --version)Claude Code (CLI or desktop Code tab)
Install
git clone https://github.com/yogthesharma/opencode-navigator.git && cd opencode-navigator
npm installRegister it for all your projects:
claude mcp add --scope user opencode -- node "$(pwd)/server.mjs"
mkdir -p ~/.claude/agents && cp .claude/agents/opencode-worker.md ~/.claude/agents/Or only for a project: the included .mcp.json does that when you open this folder. Then start a new session and check /mcp.
Optionally copy the delegation guidance from CLAUDE.md into ~/.claude/CLAUDE.md so Claude delegates by default.
Use
Ask Claude to delegate: "use the opencode-worker to add tests for X on a free model". Useful tools: list_models, set_default_model, set_routing, run, check_all, diff, verify, review, worktree_finish, usage.
For verify, add .opencode-navigator.json to your project (see .opencode-navigator.example.json):
{ "verify": "npm test" }Other MCP clients
The server speaks plain MCP over stdio, so any client that can launch an MCP server can use it (for example Cursor, VS Code, Windsurf, Cline, Zed, Codex CLI or Gemini CLI). The usual entry is:
{ "mcpServers": { "opencode": { "command": "node", "args": ["/absolute/path/to/server.mjs"] } } }Claude Code is the tested client. Muse Code (Meta's terminal agent, v1.4) also loads the server and lists all tools: add the entry above under mcpServers in ~/.config/muse/settings.json and run muse in a trusted workspace (it reports its client name as tbh). Differences to expect elsewhere:
No
opencode-workersubagent. That is a Claude Code feature, so the client's own model callsrunandcheck_all(wait_seconds)itself.AGENTS.mdhas the same guidance for clients that read it.Approvals.
approve,remove_worktreesandrevoke_permissionare only safe if the client asks you before each tool call, so they refuse any client except Claude Code. If your client prompts for every tool call (auto-run off), setOPENCODE_NAVIGATOR_TRUST_CLIENT=1in the server's environment. Otherwise usemode: "auto"or"readonly", which need no approvals, and watchdiffbefore merging.bridge_infoshowsgated_tools_allowed.Dialogs and questions use MCP elicitation where the client supports it (
client_supports_dialogsinbridge_info); otherwisecheckreturns them aspending.
Modes
Mode | Behaviour |
| reads and questions allowed; edits and commands need your approval |
| everything allowed except a destructive deny list ( |
| exploration only |
auto is the default in git repos (set with set_default_mode); folders that are not git repos fall back to ask. Use worktree: true so changes can be reviewed and discarded.
Configuration
Variable | Default | Meaning |
|
| path to the opencode binary |
|
| concurrent jobs |
|
|
|
| unset |
|
State lives in ~/.opencode-navigator (jobs, results, logs, worktrees, cost ledger) and <project>/.opencode-navigator/state.json (default model, routing, mode).
Security notes
The bridge starts its own
opencode serveon127.0.0.1with a random password and stops it on exit.Free models may log prompts; keep secrets out of briefs.
approvealways goes through Claude Code's permission prompt and must echo the real action and resources.Worktree merges refuse on secret-looking strings;
forceis for use after you agree.
Tests
node test/tools.mjs runs offline: it checks tool annotations and the tools that need no job. The other integration scripts in test/ drive the server over stdio and need a working opencode: node test/e2e.mjs, parallel.mjs, interact.mjs, dialog.mjs, features.mjs, saved.mjs, modes.mjs (needs a git dir and a non-git dir as arguments). They call real models, so they can be slow or hit free-tier limits.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Multi-brand AI code review for Claude: up to 12 reviewers and a judge, no install.
Paid remote MCP for Claude Code skill update gate MCP, structured receipts, audit logs, and reviewer
Shared long-term memory & Stop-hook task handoff across Claude Code, Codex, Cursor, and mobile.
Coding agents from Claude Code, Cursor and Codex claim jobs and lock files on one shared board.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceLets Claude Code offload cheap, mechanical tasks to opencode's free models for codebase summaries, exploration, web research, and bulk edits, saving paid tokens.-
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code and Claude Desktop to delegate coding tasks to any model available in OpenCode while Claude remains the orchestrator, planning work, reviewing diffs, and running tests. Supports synchronous and async delegation, model selection, session continuation, and permission-aware execution.6MIT
- AlicenseBqualityBmaintenanceEnables Claude Code to delegate prompts, reviews, and file-changing tasks to other coding agents such as Codex, Antigravity, Claude, Aider, and Goose, running each job in an isolated git worktree whose diff can be inspected before applying or discarding. All traffic passes through one policy layer with trusted folders, permission modes, minimal environments, timeouts, quota-aware fallback, and a hash-chained audit log.1857 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to hand scoped, implementation-only coding tasks to any model available in a local opencode install — including Kimi, GPT, Gemini and local models — and to run many of them in parallel. Claude stays the orchestrator: it briefs each worker, collects results and needs-flags, then reviews diffs and runs tests, lint and builds itself.1MIT