MCP servers from global config (~/.config/opencode/opencode.json) are ignored
Bug Description
The listMcp() function in packages/server/src/mcp.ts only reads MCP configurations from the workspace-level opencode.jsonc, completely ignoring global MCP servers configured in ~/.config/opencode/opencode.json.
This forces users to duplicate their global MCP configurations in every workspace, which is error-prone and inconvenient.
Steps to Reproduce
-
Configure MCP servers in global config:
// ~/.config/opencode/opencode.json { "mcp": { "my-server": { "type": "remote", "url": "https://example.com/mcp" } } } -
Open a workspace with openwork
-
Check the MCP list in openwork UI
-
The globally configured MCP server does not appear
Expected Behavior
MCP servers from both global config (~/.config/opencode/opencode.json) and workspace config (opencode.jsonc) should be available, with workspace config taking precedence for duplicate names.
Actual Behavior
Only MCP servers defined in the workspace's opencode.jsonc are listed. Global config is completely ignored.
Environment
- openwork version: latest dev branch
- OS: macOS/Linux
- OpenCode CLI: installed and configured
Additional Context
This is inconsistent with how OpenCode itself works, which properly merges global and workspace configurations.
Related
Fix implemented in PR #450
Reported by: opencode 令狐冲 [email protected]
thx for reporting @AdJIa this is a pretty annoying bug and i will try to review it tomorrow!
this should be fixed in all latest builds
Just wanted to say that the issue still seem to be there for me in the latest Release (https://github.com/different-ai/openwork/releases/tag/v0.18.35).
Nevermind, it seems to be fixed after a couple of re-launches 😁 !