Problem
OpenCode integration config is inconsistent across wrap, mcp install, and persistent install.
1. wrap opencode writes remote /mcp
headroom wrap opencode writes:
"headroom": {
"type": "remote",
"url": "http://127.0.0.1:8787/mcp",
"enabled": true
}
But the Headroom proxy does not expose MCP at /mcp; it returns 404. Headroom MCP is a stdio server launched with headroom mcp serve.
2. OpencodeRegistrar writes invalid local command config
headroom mcp install --agent opencode serializes stdio MCP as:
{
"type": "remote",
"url": "",
"enabled": true,
"command": ["headroom", "mcp", "serve"]
}
OpenCode's schema expects local MCP config to use:
{
"type": "local",
"command": ["headroom", "mcp", "serve"],
"enabled": true
}
Environment variables belong under environment, not env.
3. --no-mcp still writes persistent MCP
headroom wrap opencode --no-mcp skips runtime MCP config but inject_opencode_provider_config() still writes mcp.headroom into opencode.json.
4. mcp uninstall/status are not symmetric with install
headroom mcp install supports multiple registrars, including OpenCode, but headroom mcp uninstall and headroom mcp status only handle Claude Code and ~/.claude/mcp.json.
5. Persistent install docs/CLI are inconsistent
Docs say:
headroom install apply --preset persistent-service --providers manual --target opencode
But --target opencode is not accepted by the CLI choice list.
Also, default scope is user, while OpenCode config mutation only happens in provider scope, so the documented command does not write OpenCode config.
Expected behavior
OpenCode MCP should be configured as local stdio:
"headroom": {
"type": "local",
"command": ["headroom", "mcp", "serve"],
"enabled": true
}
For custom proxy ports:
"environment": {
"HEADROOM_PROXY_URL": "http://127.0.0.1:9000"
}
--no-mcp should not write mcp.headroom.
mcp uninstall/status should use the same registrar set as install, or clearly document that they are Claude-only.
Persistent install should accept --target opencode and docs should show --scope provider when relying on direct OpenCode config mutation.
Problem
OpenCode integration config is inconsistent across
wrap,mcp install, and persistent install.1.
wrap opencodewrites remote/mcpheadroom wrap opencodewrites:But the Headroom proxy does not expose MCP at
/mcp; it returns 404. Headroom MCP is a stdio server launched withheadroom mcp serve.2.
OpencodeRegistrarwrites invalid local command configheadroom mcp install --agent opencodeserializes stdio MCP as:{ "type": "remote", "url": "", "enabled": true, "command": ["headroom", "mcp", "serve"] }OpenCode's schema expects local MCP config to use:
{ "type": "local", "command": ["headroom", "mcp", "serve"], "enabled": true }Environment variables belong under
environment, notenv.3.
--no-mcpstill writes persistent MCPheadroom wrap opencode --no-mcpskips runtime MCP config butinject_opencode_provider_config()still writesmcp.headroomintoopencode.json.4.
mcp uninstall/statusare not symmetric with installheadroom mcp installsupports multiple registrars, including OpenCode, butheadroom mcp uninstallandheadroom mcp statusonly handle Claude Code and~/.claude/mcp.json.5. Persistent install docs/CLI are inconsistent
Docs say:
But
--target opencodeis not accepted by the CLI choice list.Also, default scope is
user, while OpenCode config mutation only happens in provider scope, so the documented command does not write OpenCode config.Expected behavior
OpenCode MCP should be configured as local stdio:
For custom proxy ports:
--no-mcpshould not writemcp.headroom.mcp uninstall/statusshould use the same registrar set as install, or clearly document that they are Claude-only.Persistent install should accept
--target opencodeand docs should show--scope providerwhen relying on direct OpenCode config mutation.