About this project

opencode-mcp is an MCP (Model Context Protocol) server that bridges MCP clients—such as Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, and others—to OpenCode's headless API. It enables delegating coding tasks, asking questions, implementing features, monitoring background work, responding to prompts and permissions, and reviewing changes across projects. Key features include: - **70 tools, 10 resources, and 5 prompts** for comprehensive interaction. - **Workflow flexibility**: Choose between synchronous runs (`opencode_run`), background execution (`opencode_fire` with `opencode_check`/`opencode_wait`), and job management (`opencode_job_list`, `opencode_job_get`, `opencode_job_cancel`). - **Setup and orientation**: `opencode_setup`, `opencode_context`, and `opencode_provider_models` help configure providers and models. - **Multi-project support**: Project-scoped tools accept absolute paths on the OpenCode server, with support for POSIX, Windows drive, and UNC paths. - **Configuration**: Environment variables like `OPENCODE_BASE_URL`, `OPENCODE_AUTO_SERVE`, `OPENCODE_DEFAULT_PROVIDER`, and `OPENCODE_DEFAULT_MODEL` allow customization. A smaller `essential` tool profile is available via `OPENCODE_TOOL_PROFILE`. - **Development and testing**: Includes unit tests with local fixtures and live smoke tests for controlled verification. Requires Node.js 22 or newer. The package is distributed on npm and can be used via `npx opencode-mcp`. Documentation covers configuration for various clients, tools reference, resources, prompts, examples, and architecture.