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

Function writeProjectMcpJson

src/mcp/config.ts:201–204  ·  view source on GitHub ↗
(cwd: string, servers: Record<string, McpServerConfig>)

Source from the content-addressed store, hash-verified

199
200/** Write a `.mcp.json` file in the cwd (project scope). */
201export 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). */
207export function readProjectMcpJson(cwd: string): Record<string, McpServerConfig> {

Callers 2

addMcpServerFunction · 0.85
removeMcpServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected