Pull the user-scope MCP servers Claude Code stores at the top level of * `~/.claude.json`. This is where `claude mcp add -s user …` writes — the * root `mcpServers` block on the same file that also holds per-project * entries under `projects. `.
()
| 200 | * root `mcpServers` block on the same file that also holds per-project |
| 201 | * entries under `projects.<path>`. */ |
| 202 | function readClaudeCodeRootServers(): Record<string, McpServerConfig> { |
| 203 | const json = readJson(path.join(os.homedir(), ".claude.json")) |
| 204 | if (!json) return {} |
| 205 | return readMcpServersFromObject(json) |
| 206 | } |
| 207 | |
| 208 | /** Pull the per-project MCP servers Claude Code stores in `~/.claude.json`. */ |
| 209 | function readClaudeCodeProjectServers(): Record<string, McpServerConfig> { |
no test coverage detected