Three-Tier MCP System
oh-my-opencode supports MCPs from three sources:| Tier | Source | Mechanism | Priority |
|---|---|---|---|
| 1. Built-in | src/mcp/ | 3 remote HTTP MCPs | Highest |
| 2. Claude Code | .mcp.json | ${VAR} env expansion | Medium |
| 3. Skill-embedded | SKILL.md YAML | Managed by SkillMcpManager | Lowest |
Built-in MCPs
oh-my-opencode provides 3 built-in remote MCPs:Websearch
Web search via Exa AI (default) or Tavily.Default provider: Exa AISwitch to Tavily:Environment variables:
EXA_API_KEY(optional for Exa)TAVILY_API_KEY(required for Tavily)
- Exa:
https://mcp.exa.ai - Tavily:
https://mcp.tavily.com
Context7
Library documentation search.Environment variables:
CONTEXT7_API_KEY(optional)
https://mcp.context7.com/mcp
Grep App
GitHub code search via grep.app.Environment variables:
- None required
https://mcp.grep.app
Disabling Built-in MCPs
Two methods to disable built-in MCPs:Method 1: Global Array
Method 2: Per-MCP Config
Claude Code MCP Loading
Tier 2 loads MCPs from.mcp.json files using the claude-code-mcp-loader.
Supported Locations
| Scope | Path |
|---|---|
| Home (legacy) | ~/.claude.json |
| User | ~/.config/opencode/.mcp.json |
| Project (1) | .mcp.json |
| Project (2) | .claude/.mcp.json |
Environment Variable Expansion
Supports${VAR} syntax for environment variables:
Example Configuration
Enabling/Disabling
Enable/disable Claude Code MCP loading.Disable all Keep built-in MCPs, disable
.mcp.json files:.mcp.json:Skill-Embedded MCPs
Tier 3 loads MCPs embedded in skill YAML frontmatter.MCP Definition in Skills
Skills can bundle MCPs using YAML frontmatter:Supported MCP Types
- stdio
- http
Stdio MCP (command-based):
Built-in Skills with MCPs
Some built-in skills include MCPs:| Skill | MCP Type | MCP Server |
|---|---|---|
playwright | stdio | @playwright/mcp |
MCP OAuth Support
oh-my-opencode supports OAuth 2.0 + PKCE + Dynamic Client Registration (RFC 7591) for MCP servers. Manage OAuth flows:list— Show all OAuth tokensrevoke <server>— Revoke token for serverclear— Clear all tokens
Listing Active MCPs
Check which MCPs are active:Complete Example
A comprehensive MCP configuration:.mcp.json:
Debugging MCPs
Check MCP Status
View MCP Logs
Logs are written to:Common Issues
MCP server not starting
MCP server not starting
Check:
- Command path is correct (
which npx,which docker) - Environment variables are set
- Permissions for stdio commands
Environment variables not expanding
Environment variables not expanding
Issue:
${VAR} not replacedSolution:- Verify variable is exported:
echo $MY_VAR - Check
.mcp.jsonsyntax (no spaces:${VAR}, not${ VAR }) - Restart OpenCode after setting env vars
Skill MCP not loading
Skill MCP not loading
Check:
- Skill is enabled (not in
disabled_skills) - YAML frontmatter is valid
- Skill source path is correct
Next Steps
Skills
Learn about skill system and skill-embedded MCPs
Hooks
Customize lifecycle hooks