Describe the bug
On Windows, CodeGraph's opencode installer target writes config to %APPDATA%\opencode\ instead of ~/.config/opencode\. However, opencode uses ~/.config/opencode/ on all platforms including Windows, so the MCP config is never picked up.
This is a known issue affecting multiple projects — see:
To Reproduce
- Install CodeGraph globally on Windows
- Run
codegraph init -i in a project
- Select opencode as a target
- Config is written to
%APPDATA%\opencode\ (wrong location)
- OpenCode does not detect CodeGraph MCP server
Expected behavior
Config should be written to ~/.config/opencode/opencode.jsonc on all platforms including Windows.
Environment
- OS: Windows
- CodeGraph version: latest
- OpenCode config path:
C:\Users\<user>\.config\opencode\opencode.jsonc
Workaround
Manually create/edit ~/.config/opencode/opencode.jsonc:
{
"mcp": {
"codegraph": {
"type": "local",
"command": ["<path-to-codegraph-binary>", "serve", "--mcp"],
"enabled": true
}
}
}
Describe the bug
On Windows, CodeGraph's opencode installer target writes config to
%APPDATA%\opencode\instead of~/.config/opencode\. However, opencode uses~/.config/opencode/on all platforms including Windows, so the MCP config is never picked up.This is a known issue affecting multiple projects — see:
To Reproduce
codegraph init -iin a project%APPDATA%\opencode\(wrong location)Expected behavior
Config should be written to
~/.config/opencode/opencode.jsoncon all platforms including Windows.Environment
C:\Users\<user>\.config\opencode\opencode.jsoncWorkaround
Manually create/edit
~/.config/opencode/opencode.jsonc:{ "mcp": { "codegraph": { "type": "local", "command": ["<path-to-codegraph-binary>", "serve", "--mcp"], "enabled": true } } }