-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
`ClaudecodeMcp.fromFile()` and `ClaudecodeMcp.fromRulesyncMcp()` both accept a `global` parameter and use it to resolve paths via `getSettablePaths({ global })`, but neither passes it through to the `ClaudecodeMcp` constructor.
This means instances created by these factory methods always have `this.global = false` (the default), causing `isDeletable()` to incorrectly return `true` even in global mode. In global mode, `~/.claude/.claude.json` may contain other user settings and should not be deleted.
// src/features/mcp/claudecode-mcp.ts (lines 61–67)
return new ClaudecodeMcp({
baseDir,
relativeDirPath: paths.relativeDirPath,
relativeFilePath: paths.relativeFilePath,
fileContent: JSON.stringify(newJson, null, 2),
validate,
// missing: global,
});The same issue exists in fromRulesyncMcp (lines 86–92).
For reference, CursorMcp (added in #1273) correctly passes global in both factory methods.
Fix: Add global to the constructor argument object in both fromFile and fromRulesyncMcp.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers