opencode-mcp
The opencode-mcp server hands coding tasks to the OpenCode agent from Claude, Cursor and VS Code and tracks their progress.
- 162 ★ on the repository
- Last commit
Broad access
Why this level
- The server launches another coding agent that edits files and runs commands in the project.
- OpenCode sends code to the model provider per your setup.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/opencode-mcpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The server launches another coding agent that edits files and runs commands in the project.
- OpenCode sends code to the model provider per your setup.
This is third-party code. Review the repository files before installing.
What it does
The MCP server connects Claude, Cursor, VS Code and other clients to the OpenCode headless API. An agent in the client sets a task, OpenCode performs it in the project and the client tracks progress, answers questions and permissions and reviews changes. The server offers about seventy tools, ten resources and five prompts. Tool groups: setup `opencode_setup`, `opencode_context`, `opencode_provider_models`; quick questions `opencode_ask`, `opencode_reply`; start and wait `opencode_run`; background work `opencode_fire` with `opencode_check` and `opencode_wait`; job control; change review `opencode_review_changes`. Version 3 needs Node.js 22 or newer and OpenCode 1.x.
Who it is for. Developers who want to hand part of the work to OpenCode directly from Claude, Cursor or another MCP client.
Good fit when
- A Claude agent asks OpenCode to add input validation to an API route and waits for the result.
- A long task starts in the background with `opencode_fire` and its status is polled.
- OpenCode asks for permission or a question and the client answers.
- Changes after OpenCode work are reviewed with a separate call.
Not a fit when
- OpenCode is not installed and its server is not running: the tools do not work without `opencode serve`.
- You need OpenCode 2.x: support is planned for version 4.0.
- You need a task without delegation: calling OpenCode directly is simpler.
Example request
Ask OpenCode to add input validation to POST /api/users in the background and tell me when it is done.MCP
- Transport
- stdio
- Authentication
- not required
Environment variables
OPENCODE_BASE_URL- OpenCode server address if it is not `http://127.0.0.1:4096`
OPENCODE_DEFAULT_PROVIDER- Default provider, set together with the model
OPENCODE_DEFAULT_MODEL- Default model, set together with the provider
Limitations
Version 3.x needs Node.js 22 or newer and OpenCode 1.x, tested on 1.18.31 and 1.19.3. Before work run `opencode serve --hostname 127.0.0.1 --port 4096` or share a server with the TUI through `opencode --port 4096`. For another address set `OPENCODE_BASE_URL`. Pick a provider and model through `opencode_setup` or the `OPENCODE_DEFAULT_PROVIDER` and `OPENCODE_DEFAULT_MODEL` variables together. OpenCode itself performs tasks under its own rights and with its providers, so configure access limits in OpenCode. Background jobs are recorded and listed through `opencode_job_list`.
How to disable. Remove the `opencode` entry with `claude mcp remove opencode` or from the client config and stop the `opencode serve` server.
FAQ
What must run in advance?
The OpenCode server: `opencode serve --hostname 127.0.0.1 --port 4096`. With the TUI start it with `opencode --port 4096` and share that server.
How do I pick a model?
Call `opencode_setup`, choose a provider from the configured ones, then `opencode_provider_models`. You can also set `OPENCODE_DEFAULT_PROVIDER` and `OPENCODE_DEFAULT_MODEL` at once.
How do I work in the background?
Start `opencode_fire` with a project directory and a prompt, then poll `opencode_check` or wait with `opencode_wait`.
Which clients are supported?
Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Continue, Zed and Amazon Q; configurations are in `docs/configuration.md`.
How do I upgrade from version 2?
Follow the migration notes in the CHANGELOG for version 3.0.0 of 16 September 2026.
Discussion
No questions or reviews yet.
Related
MCP serversAn OpenCode plugin: an orchestrator hands work to six specialists, each on its own model, and merges their results into one answer
Codex MCP Server: Codex inside Claude Code
Codex MCP Server
An MCP server that hands tasks to the Codex CLI from inside Claude Code: code questions, change review, web search and resumable sessions
A terminal AI coding agent built on opencode: any model with your own keys, subagent swarms, goals and output compression.
An OpenCode plugin that runs a team of parallel agents with separate sessions, a shared task board and messaging
Orchestrator plugin for OpenCode and Codex CLI: multiple agents, hooks, built-in MCPs, ultrawork mode and hash-anchored edits
A CLI that turns any MCP server, OpenAPI spec or GraphQL endpoint into commands at runtime, with no codegen
README in short
The README covers an MCP server for delegating tasks to OpenCode: quick start, client configs, a table of workflows with tools and a background run example. Node.js and OpenCode versions and links to detailed docs are listed.