fix(mcp-loader): read user-level MCP config from ~/.claude.json (#814)
This commit is contained in:
@@ -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" },
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user