# OpenCode MCP Server

> Delegate coding work to OpenCode from an MCP client.

- **URL**: https://followmcp.com/en/servers/opencode-mcp
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 168
- **FMRS Score**: 54/100 (Grade D)
- **Source**: https://github.com/AlaeddineMessadi/opencode-mcp
- **Transports**: stdio (local process)
- **Runtimes**: Node.js 22+
- **Auth**: No credential needed

## Overview
OpenCode MCP Server connects MCP clients such as Claude, Cursor, and VS Code to OpenCode's headless API. It supports asking questions, implementing features, monitoring background work, responding to questions and permission requests, and reviewing project changes. Version 3.x requires Node.js 22 or newer and works with OpenCode 1.x. The README describes 70 tools, 10 resources, and 5 prompts; the tool profile can be full or the smaller essential set.

## Best for
- Developers who want to use OpenCode's headless API from an MCP client.
- Users who need to delegate coding work in a project and observe its progress.

## Not for
- Users without access to an OpenCode server who are not prepared to start one; the default setup expects a running server.
- Users who require OpenCode 2.x support; the README says this is planned for 4.0.

## Required permissions
- Requires access to an OpenCode server; project tools use absolute paths on that server.
- The project initialization tool creates or opens a directory on the MCP host.
- Tasks may read or modify files in the selected project; independent sessions share filesystem changes.
- Optional server authentication credentials are supplied through configuration variables.

## Risks
- Coding tasks can change project files; independent sessions do not isolate filesystem changes.
- An observation timeout returns current progress and does not mean a task failed or was cancelled.
- Relative project paths are rejected, and OpenCode checks path existence and access.
- Automatic startup supports only local loopback HTTP endpoints; custom OpenCode CLI flags require a manually started server.

## Client config (JSON)
```json
{"mcpServers":{"opencode":{"command":"npx","args":["-y","opencode-mcp"]}}}
```

## Tools (15)
- `opencode_setup`: Check and configure the OpenCode connection.
- `opencode_context`: Inspect OpenCode context information.
- `opencode_provider_models`: List models available from configured providers.
- `opencode_ask`: Ask OpenCode a question or follow up in a conversation.
- `opencode_reply`: Reply to a question in an OpenCode conversation.
- `opencode_run`: Start work and wait for the result.
- `opencode_fire`: Start work in the background.
- `opencode_check`: Check background task progress.
- `opencode_wait`: Wait for background task progress.
- `opencode_job_list`: List recorded jobs.
- `opencode_job_get`: Get details for a recorded job.
- `opencode_job_cancel`: Cancel a recorded job.
- `opencode_job_input`: Provide input to a job that requires it.
- `opencode_review_changes`: Review changes produced by a task.
- `opencode_conversation`: Inspect an OpenCode conversation.
