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

Function readMcpJson

src/mcp/config.ts:145–149  ·  view source on GitHub ↗

Read a `.mcp.json` file (project scope).

(filePath: string)

Source from the content-addressed store, hash-verified

143
144/** Read a `.mcp.json` file (project scope). */
145function readMcpJson(filePath: string): Record<string, McpServerConfig> {
146 const json = readJson(filePath)
147 if (!json || !isPlainObject(json.mcpServers)) return {}
148 return normalizeServers(json.mcpServers)
149}
150
151/** Walk from cwd up to the filesystem root, collecting directories (root last). */
152function ancestorDirs(cwd: string): string[] {

Callers 2

loadMcpConfigFunction · 0.85
readProjectMcpJsonFunction · 0.85

Calls 3

normalizeServersFunction · 0.85
readJsonFunction · 0.70
isPlainObjectFunction · 0.70

Tested by

no test coverage detected