Read a `.mcp.json` file (project scope).
(filePath: string)
| 143 | |
| 144 | /** Read a `.mcp.json` file (project scope). */ |
| 145 | function 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). */ |
| 152 | function ancestorDirs(cwd: string): string[] { |
no test coverage detected