MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / uninstall

Method uninstall

src/installer/targets/cursor.ts:128–149  ·  view source on GitHub ↗
(loc: Location)

Source from the content-addressed store, hash-verified

126 }
127
128 uninstall(loc: Location): WriteResult {
129 const files: WriteResult['files'] = [];
130
131 const mcpPath = mcpJsonPath(loc);
132 const config = readJsonFile(mcpPath);
133 if (config.mcpServers?.codegraph) {
134 delete config.mcpServers.codegraph;
135 if (Object.keys(config.mcpServers).length === 0) {
136 delete config.mcpServers;
137 }
138 writeJsonFile(mcpPath, config);
139 files.push({ path: mcpPath, action: 'removed' });
140 } else {
141 files.push({ path: mcpPath, action: 'not-found' });
142 }
143
144 if (loc === 'local') {
145 files.push(removeRulesEntry());
146 }
147
148 return { files };
149 }
150
151 printConfig(loc: Location): string {
152 const target = mcpJsonPath(loc);

Callers

nothing calls this directly

Calls 4

readJsonFileFunction · 0.90
writeJsonFileFunction · 0.90
removeRulesEntryFunction · 0.85
mcpJsonPathFunction · 0.70

Tested by

no test coverage detected