Complete guide to configure OpenCode MCP Server in Continue.dev.
Continue.dev is an open-source AI code assistant extension for VS Code and JetBrains IDEs. It supports MCP servers through YAML configuration files.
Official Docs: https://docs.continue.dev/features/model-context-protocol
- Continue.dev Extension installed
- Node.js 18+ installed
- OpenCode server running (
opencode serve)
-
Create the MCP servers directory in your project:
mkdir -p .continue/mcpServers
-
Create a YAML config file:
touch .continue/mcpServers/opencode.yaml
-
Add configuration (see below)
Create configuration in your user directory:
macOS/Linux:
mkdir -p ~/.continue/mcpServers
touch ~/.continue/mcpServers/opencode.yamlWindows:
%USERPROFILE%\.continue\mcpServers\opencode.yaml
Create .continue/mcpServers/opencode.yaml:
name: OpenCode MCP Server
version: 0.1.0
schema: v1
mcpServers:
- name: opencode
command: npx
args:
- "-y"
- "@opencode-mcp/server"
env:
OPENCODE_SERVER_URL: "http://localhost:4096"name: OpenCode MCP Server
version: 0.1.0
schema: v1
mcpServers:
- name: opencode
command: npx
args:
- "-y"
- "@opencode-mcp/server"
env:
OPENCODE_SERVER_URL: "http://localhost:4096"
OPENCODE_DEFAULT_MODEL: "anthropic/claude-sonnet-4"
OPENCODE_TIMEOUT: "120000"name: OpenCode MCP Server
version: 0.1.0
schema: v1
mcpServers:
- name: opencode
type: sse
url: "http://localhost:3000/mcp"name: Project MCP Servers
version: 0.1.0
schema: v1
mcpServers:
- name: opencode
command: npx
args:
- "-y"
- "@opencode-mcp/server"
env:
OPENCODE_SERVER_URL: "http://localhost:4096"
- name: filesystem
command: npx
args:
- "-y"
- "@modelcontextprotocol/server-filesystem"
- "/path/to/allowed/directory"- Reload VS Code window
- Open Continue.dev sidebar
- Look for MCP tools in the tools dropdown
- Verify OpenCode tools are available
In Continue chat:
Use opencode_run to implement a rate limiter middleware for Express.js
Use opencode_agent_delegate to have the plan agent review the auth module
your-project/
├── .continue/
│ └── mcpServers/
│ └── opencode.yaml
└── ...
# Check YAML syntax
cat .continue/mcpServers/opencode.yaml
# Test server manually
node /path/to/opencode-mcp/dist/index.js- Check YAML syntax is valid
- Ensure paths are correct
- Reload the IDE
# Verify OpenCode server
curl http://localhost:4096/health
# Start if not running
opencode serve| Scope | Path |
|---|---|
| User | ~/.continue/mcpServers/opencode.yaml |
| Workspace | .continue/mcpServers/opencode.yaml |
name: OpenCode MCP Server
version: 0.1.0
schema: v1
mcpServers:
- name: opencode
command: npx
args:
- "-y"
- "@opencode-mcp/server"
env:
OPENCODE_SERVER_URL: "http://localhost:4096"
OPENCODE_AUTO_START: "true"
OPENCODE_TIMEOUT: "120000"