MCPcopy
hub / github.com/upstash/context7 / writeJsonConfig

Function writeJsonConfig

packages/cli/src/setup/mcp-writer.ts:102–108  ·  view source on GitHub ↗
(
  filePath: string,
  config: Record<string, unknown>
)

Source from the content-addressed store, hash-verified

100}
101
102export async function writeJsonConfig(
103 filePath: string,
104 config: Record<string, unknown>
105): Promise<void> {
106 await mkdir(dirname(filePath), { recursive: true });
107 await writeFile(filePath, JSON.stringify(config, null, 2) + "\n", "utf-8");
108}
109
110export async function readTomlServerExists(filePath: string, serverName: string): Promise<boolean> {
111 try {

Callers 3

uninstallMcpFunction · 0.85
setupAgentFunction · 0.85
setup.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected