How to Configure MCP in OpenCode
OpenCode coding agent with local and remote MCP servers configured under the mcp key.
macOS
<project>/opencode.jsonWindows
<project>\opencode.jsonLinux
<project>/opencode.jsonSetup and verification
Configuration: opencode.json / mcp / Guide only
Documentation reviewed: 2026-11-02. This is not a runtime test or security audit.
- Open the project opencode.json (JSONC is also supported), or global ~/.config/opencode/opencode.json.
- Use the documented mcp object. Local servers require type: local, a command array and environment; remote servers use type: remote, url and optional headers.
- Enable the server and review authentication and tool permissions in OpenCode.
OpenCode does not use the Claude-style mcpServers schema. No OpenCode-specific generated snippets are published here.
Review every command and requested permission. Merge only the relevant server entries; do not overwrite unrelated settings. Keep credentials out of version control.
Reviewed configurations for OpenCode
0 servers with a documentation-reviewed configuration for at least one platform. Check the platform selector before copying.
No reviewed configurations for this client are published yet. Other clients' server lists are not evidence of compatibility. Use the official setup guide.