Skip to main content
Legacy reference: this page describes OCX 2 for OpenCode V1. For OCX 3 and OpenCode V2, see the V2 documentation.

Overview

MCP (Model Context Protocol) servers add external tools to OpenCode. Configure local command-based servers or remote HTTP servers with optional OAuth authentication.

Local MCP Server

Local Server Options

Remote MCP Server

Remote Server Options

OAuth Configuration

Per-Agent MCP Tools

Restrict MCP tools to specific agents:
This disables MCP tools globally but enables them only for the researcher agent.

Registry Shorthand

In registry component manifests, remote MCP servers use URL shorthand:
This expands to { "type": "remote", "url": "https://...", "enabled": true }.

See Also