@@ -118,7 +118,7 @@ function parseConfig(text: string): Record<string, any> {
118118function getOpencodeServerEntry ( ) : { type : string ; command : string [ ] ; enabled : boolean } {
119119 return {
120120 type : 'local' ,
121- command : [ 'codegraph' , 'serve' , '--mcp' ] ,
121+ command : [ 'codegraph-vba ' , 'serve' , '--mcp' ] ,
122122 enabled : true ,
123123 } ;
124124}
@@ -199,7 +199,7 @@ function writeMcpEntry(loc: Location): WriteResult['files'][number] {
199199 }
200200
201201 const config = parseConfig ( text ) ;
202- const before = config . mcp ?. codegraph ;
202+ const before = config . mcp ?. [ ' codegraph-vba' ] ;
203203 const after = getOpencodeServerEntry ( ) ;
204204
205205 if ( jsonDeepEqual ( before , after ) ) {
@@ -216,7 +216,7 @@ function writeMcpEntry(loc: Location): WriteResult['files'][number] {
216216
217217 // Surgical edit — preserves comments, formatting, and order of
218218 // every key we don't touch.
219- const edits = modify ( text , [ 'mcp' , 'codegraph' ] , after , {
219+ const edits = modify ( text , [ 'mcp' , 'codegraph-vba ' ] , after , {
220220 formattingOptions : FORMATTING ,
221221 } ) ;
222222 const updated = applyEdits ( text , edits ) ;
@@ -226,17 +226,17 @@ function writeMcpEntry(loc: Location): WriteResult['files'][number] {
226226}
227227
228228/**
229- * Surgically drop `mcp.codegraph` from one config file. Leaves sibling
229+ * Surgically drop `mcp.codegraph-vba ` from one config file. Leaves sibling
230230 * servers, comments, and formatting untouched; drops an emptied `mcp`
231231 * wrapper too. Shared by uninstall and the legacy-%APPDATA% sweep.
232232 */
233233function removeMcpEntryAt ( file : string ) : WriteResult [ 'files' ] [ number ] {
234234 if ( ! fs . existsSync ( file ) ) return { path : file , action : 'not-found' } ;
235235 const text = readConfigText ( file ) ;
236236 const config = parseConfig ( text ) ;
237- if ( ! config . mcp ?. codegraph ) return { path : file , action : 'not-found' } ;
237+ if ( ! config . mcp ?. [ ' codegraph-vba' ] ) return { path : file , action : 'not-found' } ;
238238
239- let edits = modify ( text , [ 'mcp' , 'codegraph' ] , undefined , {
239+ let edits = modify ( text , [ 'mcp' , 'codegraph-vba ' ] , undefined , {
240240 formattingOptions : FORMATTING ,
241241 } ) ;
242242 let updated = applyEdits ( text , edits ) ;
0 commit comments