fix(mcp-loader): also read ~/.claude/.mcp.json for CLI-managed user MCP config

PR #1616 replaced ~/.claude/.mcp.json with ~/.claude.json but both paths
should be read:
- ~/.claude.json: user/local scope MCP settings (mcpServers field)
- ~/.claude/.mcp.json: CLI-managed MCP servers (claude mcp add)

Fixes #814
This commit is contained in:
YeonGyu-Kim
2026-02-07 22:29:51 +09:00
parent 2c394cd497
commit ac6e7d00f2
2 changed files with 55 additions and 0 deletions
@@ -17,10 +17,12 @@ interface McpConfigPath {
}
function getMcpConfigPaths(): McpConfigPath[] {
const claudeConfigDir = getClaudeConfigDir()
const cwd = process.cwd()
return [
{ path: join(homedir(), ".claude.json"), scope: "user" },
{ path: join(claudeConfigDir, ".mcp.json"), scope: "user" },
{ path: join(cwd, ".mcp.json"), scope: "project" },
{ path: join(cwd, ".claude", ".mcp.json"), scope: "local" },
]