opencode-mcp
by AlaeddineMessadi·★ 39·Score 47
MCP server that integrates OpenCode AI's 79 tools with MCP clients for autonomous coding tasks.
Overview
opencode-mcp is a comprehensive MCP server that bridges MCP clients to OpenCode's headless API, enabling AI assistants to delegate real coding work to OpenCode sessions. The server provides 79 tools across multiple categories including workflow tools, session management, file operations, and system monitoring. It supports multi-project handling, auto-start functionality, and works with various MCP clients like Claude Desktop, Cursor, Windsurf, VS Code Copilot, and more. The implementation is well-structured with TypeScript and includes comprehensive documentation and testing.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose opencode-mcp when you need to delegate complex coding tasks to an autonomous AI agent that can read, write, and execute code in your project while working alongside your primary AI assistant.
When NOT to choose this
Don't choose this if you're already invested in a different coding assistant ecosystem or if you prefer direct control over all code changes without delegation to an external tool.
Tools this server exposes
12 tools extracted from the READMEopencode_setupCheck server health, providers, and project status. Use first.
opencode_askCreate session + send prompt + get answer. One call.
opencode_runSend a task and wait for completion (session + async send + polling)
opencode_fireFire-and-forget: dispatch a task, return immediately
opencode_checkCompact progress report for a running session
opencode_sessions_overviewQuick overview of all sessions
opencode_contextProject + VCS + config + agents in one call
opencode_review_changesFormatted diff summary for a session
opencode_waitPoll an async session until it finishes
opencode_provider_testQuick-test whether a provider is working
opencode_statusHealth + providers + sessions + VCS dashboard
opencode_conversationGet formatted conversation history
Comparable tools
Installation
Installation
Prerequisite: [OpenCode](https://opencode.ai/) must be installed.
**Claude Code:**
claude mcp add opencode -- npx -y opencode-mcp**Claude Desktop / Cursor / Windsurf:** Add to your MCP config:
{
"mcpServers": {
"opencode": {
"command": "npx",
"args": ["-y", "opencode-mcp"]
}
}
}**VS Code Copilot / Zed / Amazon Q:** See [Configuration](docs/configuration.md) for client-specific setup.
FAQ
- What MCP clients are supported?
- The server works with Claude Desktop, Claude Code, Cursor, Windsurf, VS Code Copilot, Cline, Continue, Zed, Amazon Q, and any other MCP-compatible client.
- Does this require OpenCode to be installed locally?
- Yes, OpenCode must be installed on your machine. The MCP server will automatically start the OpenCode server if it's not already running.
Compare opencode-mcp with
Last updated · Auto-generated from public README + GitHub signals.