opencode-executor-mcp
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., "@opencode-executor-mcpsummarize this log file"
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.
opencode-executor-mcp
MCP server exposing an ask_opencode tool that delegates a prompt to an
OpenCode agent session. Lets a Claude Code
orchestrator hand off executor-role / bulk work to a cheaper backend
instead of spawning another Claude subagent.
Not tied to any specific provider: by default it uses OpenCode's own
bundled Zen free models (only needs opencode auth login, no company
gateway required). If you have a company/paid gateway configured in
OpenCode, pass it explicitly per-call.
Claude Code (orchestrator)
-> MCP tool call: ask_opencode(prompt, provider?, model?, sessionId?)
-> this server
-> opencode serve (localhost:4096) REST API
-> whichever provider is selected (default: OpenCode Zen free tier)Prerequisites
Node.js 18+ (global
fetchrequired)OpenCode CLI installed
opencode auth loginrun once (sets up the bundled Zen free-tier credentials used as the default)Optional: any additional provider configured in OpenCode (company gateway, other API key, etc.) if you want to target something other than the default free models
Related MCP server: claude-code-codex-agents
Setup
Install dependencies:
npm installAuthenticate OpenCode's default (Zen) provider, if you haven't:
opencode auth loginStart the OpenCode server (must stay running while you use the tool):
opencode serve --port 4096Verify at least one provider is live:
curl -s http://127.0.0.1:4096/config/providers | jqYou should see a provider with id
opencode(the bundled Zen models). Any additional provider you've configured will show up alongside it.Register this server with Claude Code. Add to
~/.claude.jsonundermcpServers(seedocs/claude-code-integration.mdfor the exact block):"opencode-executor": { "type": "stdio", "command": "node", "args": ["/absolute/path/to/opencode-mcp/index.js"] }Restart Claude Code. The
ask_opencodeandlist_opencode_modelstools are now available.
Usage
list_opencode_models()
# -> [{ providerID: "opencode", modelID: "big-pickle", name: "Big Pickle", bundled: true }, ...]
ask_opencode({ prompt: "summarize this log file" })
# uses the default bundled Zen model
ask_opencode({ prompt: "...", provider: "my-provider", model: "some-model-id" })
# targets a specific configured provider insteadOmit sessionId for a fresh one-off session (no memory of prior calls).
Pass the sessionId returned by a previous ask_opencode call to continue
that same conversation — OpenCode retains the history, so the model sees
prior turns. This is still call-and-response driven by Claude Code calling
the tool each turn; OpenCode never initiates on its own.
Calls can be issued concurrently (fan-out / swarm) since each session is
independent unless you deliberately reuse a sessionId; see
docs/architecture.md.
Configuration
Env var | Default | Purpose |
|
| Base URL of the running |
| unset | Pin a default provider/model for every call that doesn't specify one, instead of auto-picking the bundled Zen provider |
Troubleshooting
See docs/troubleshooting.md.
Docs
docs/architecture.md— how the pieces fit together, why this shapedocs/claude-code-integration.md— wiring into Claude Code'smcpServersconfigdocs/troubleshooting.md— common failures and fixes
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 Servers
- Alicense-qualityDmaintenanceEnables Claude Code to consult Gemini for complex coding problems with session management, file attachments, and conversation persistence.Last updated105MIT
- Alicense-qualityDmaintenanceEnables Claude Code to delegate tasks to OpenAI's Codex CLI (GPT-5.4) with structured execution traces, parallel execution, session persistence, and adversarial code review.Last updatedMIT
- Alicense-qualityBmaintenanceEnables Codex to offload expensive code reading, editing, and checking to a worker agent via Claude Code, supporting async jobs and long-running tasks.Last updatedMIT
- AlicenseAqualityBmaintenanceLets your primary coding agent delegate grunt work to a cheaper model via OpenCode, enabling cost-effective task distribution.Last updated5MIT
Related MCP Connectors
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
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/sohryuu101/opencode-executor-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server