-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
When running:
rulesync generate --targets opencode --features mcp --globalRulesync writes the OpenCode MCP config to ~/opencode.json.
But OpenCode reads its config from ~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\opencode.json). As a result, the generated MCP servers are not picked up unless the file is copied/moved.
Suggested fix: in global mode, write OpenCode MCP output to ~/.config/opencode/opencode.json (align with other OpenCode global outputs like skills/commands).
(edited) clarified that the underlying issue affects other global outputs (e.g., agents.md) in addition to MCP.
Code pointers (v5.4.0):
src/features/mcp/opencode-mcp.ts:OpenCodeMcp.getSettablePaths({ global })returnsrelativeDirPath: "."andrelativeFilePath: "opencode.json"(same for global/project).src/config/config-resolver.ts: whenglobalis enabled,baseDirsis forced to[os.homedir()].src/types/ai-file.ts: final output path ispath.join(baseDir, relativeDirPath, relativeFilePath).
So in global mode the computed path becomes os.homedir() + /opencode.json.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers