(cwd: string, servers: Record<string, McpServerConfig>)
| 199 | |
| 200 | /** Write a `.mcp.json` file in the cwd (project scope). */ |
| 201 | export function writeProjectMcpJson(cwd: string, servers: Record<string, McpServerConfig>): void { |
| 202 | const config: McpJsonConfig = { mcpServers: servers } |
| 203 | fs.writeFileSync(path.join(cwd, ".mcp.json"), JSON.stringify(config, null, "\t") + "\n") |
| 204 | } |
| 205 | |
| 206 | /** Read just the project-scope `.mcp.json` from the cwd (no parent walk). */ |
| 207 | export function readProjectMcpJson(cwd: string): Record<string, McpServerConfig> { |
no outgoing calls
no test coverage detected