fix(mcp-loader): read user-level MCP config from ~/.claude.json (#814)

This commit is contained in:
YeonGyu-Kim
2026-02-07 20:01:16 +09:00
parent 4d7f85a7c3
commit c73ae7a6fd
2 changed files with 66 additions and 33 deletions
@@ -1,5 +1,6 @@
import { existsSync, readFileSync } from "fs"
import { join } from "path"
import { homedir } from "os"
import { getClaudeConfigDir } from "../../shared"
import type {
ClaudeCodeMcpConfig,
@@ -16,11 +17,10 @@ interface McpConfigPath {
}
function getMcpConfigPaths(): McpConfigPath[] {
const claudeConfigDir = getClaudeConfigDir()
const cwd = process.cwd()
return [
{ path: join(claudeConfigDir, ".mcp.json"), scope: "user" },
{ path: join(homedir(), ".claude.json"), scope: "user" },
{ path: join(cwd, ".mcp.json"), scope: "project" },
{ path: join(cwd, ".claude", ".mcp.json"), scope: "local" },
]