Describe the enhancement you want to request
Environment: opencode v1.3.0, macOS
Setup: OPENCODE_CONFIG_DIR set to a custom path. My mcp.json there has only one server registered.
Expected: Only MCP servers defined in OPENCODE_CONFIG_DIR are loaded.
Actual: Notion MCP (installed as a Claude Code plugin) also gets loaded on startup.
Root cause I traced:
skill/index.ts scans ~/.claude unconditionally regardless of OPENCODE_CONFIG_DIR:
const EXTERNAL_DIRS = [".claude", ".agents"]
for (const dir of EXTERNAL_DIRS) {
const root = path.join(Global.Path.home, dir)
await scan(state, root, EXTERNAL_SKILL_PATTERN, ...)
}
When scanning skills, loadSkillFromPath also calls loadMcpJsonFromDir, which reads mcp.json from each skill directory. Since Claude Code plugins live under ~/.claude/plugins/cache/, and each plugin can ship a .mcp.json (e.g. ~/.claude/plugins/cache/claude-plugins-official/Notion/0.1.0/.mcp.json), their MCP servers get picked up automatically.
Verified: temporarily renamed that .mcp.json → Notion MCP no longer appeared on startup.
Request:
When OPENCODE_CONFIG_DIR is explicitly set, skip ~/.claude scanning entirely — similar to how OPENCODE_DISABLE_EXTERNAL_SKILLS works, but scoped to the Claude Code compat layer.
Describe the enhancement you want to request
Environment: opencode v1.3.0, macOS
Setup:
OPENCODE_CONFIG_DIRset to a custom path. Mymcp.jsonthere has only one server registered.Expected: Only MCP servers defined in
OPENCODE_CONFIG_DIRare loaded.Actual: Notion MCP (installed as a Claude Code plugin) also gets loaded on startup.
Root cause I traced:
skill/index.tsscans~/.claudeunconditionally regardless ofOPENCODE_CONFIG_DIR:When scanning skills,
loadSkillFromPathalso callsloadMcpJsonFromDir, which readsmcp.jsonfrom each skill directory. Since Claude Code plugins live under~/.claude/plugins/cache/, and each plugin can ship a.mcp.json(e.g.~/.claude/plugins/cache/claude-plugins-official/Notion/0.1.0/.mcp.json), their MCP servers get picked up automatically.Verified: temporarily renamed that
.mcp.json→ Notion MCP no longer appeared on startup.Request:
When
OPENCODE_CONFIG_DIRis explicitly set, skip~/.claudescanning entirely — similar to howOPENCODE_DISABLE_EXTERNAL_SKILLSworks, but scoped to the Claude Code compat layer.