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:researcher agent.
Registry Shorthand
In registry component manifests, remote MCP servers use URL shorthand:{ "type": "remote", "url": "https://...", "enabled": true }.
See Also
- Plugin Development — Build plugins with embedded tools.
- Custom Tools — Custom tool implementations.
- Permissions — Tool access control.