MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / readClaudeCodeRootServers

Function readClaudeCodeRootServers

src/commands/migrate.ts:202–206  ·  view source on GitHub ↗

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. `.

()

Source from the content-addressed store, hash-verified

200 * root `mcpServers` block on the same file that also holds per-project
201 * entries under `projects.<path>`. */
202function 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`. */
209function readClaudeCodeProjectServers(): Record<string, McpServerConfig> {

Callers 1

discoverSourcesFunction · 0.85

Calls 2

readMcpServersFromObjectFunction · 0.85
readJsonFunction · 0.70

Tested by

no test coverage detected