@@ -813,7 +813,7 @@ int cbm_remove_zed_mcp(const char *config_path) {
813813/* ── Agent detection ──────────────────────────────────────────── */
814814
815815cbm_detected_agents_t cbm_detect_agents (const char * home_dir ) {
816- cbm_detected_agents_t agents = {false, false, false, false, false, false, false, false};
816+ cbm_detected_agents_t agents = {false, false, false, false, false, false, false, false, false };
817817 if (!home_dir || !home_dir [0 ]) {
818818 return agents ;
819819 }
@@ -874,6 +874,16 @@ cbm_detected_agents_t cbm_detect_agents(const char *home_dir) {
874874 agents .kilocode = true;
875875 }
876876
877+ /* VS Code: User config dir */
878+ #ifdef __APPLE__
879+ snprintf (path , sizeof (path ), "%s/Library/Application Support/Code/User" , home_dir );
880+ #else
881+ snprintf (path , sizeof (path ), "%s/.config/Code/User" , home_dir );
882+ #endif
883+ if (stat (path , & st ) == 0 && S_ISDIR (st .st_mode )) {
884+ agents .vscode = true;
885+ }
886+
877887 return agents ;
878888}
879889
@@ -2156,8 +2166,11 @@ int cbm_cmd_install(int argc, char **argv) {
21562166 if (agents .kilocode ) {
21572167 printf (" KiloCode" );
21582168 }
2169+ if (agents .vscode ) {
2170+ printf (" VS-Code" );
2171+ }
21592172 if (!agents .claude_code && !agents .codex && !agents .gemini && !agents .zed && !agents .opencode &&
2160- !agents .antigravity && !agents .aider && !agents .kilocode ) {
2173+ !agents .antigravity && !agents .aider && !agents .kilocode && ! agents . vscode ) {
21612174 printf (" (none)" );
21622175 }
21632176 printf ("\n\n" );
@@ -2318,7 +2331,23 @@ int cbm_cmd_install(int argc, char **argv) {
23182331 printf (" instructions: %s\n" , instr_path );
23192332 }
23202333
2321- /* Step 12: Ensure PATH */
2334+ /* Step 12: Install VS Code */
2335+ if (agents .vscode ) {
2336+ printf ("VS Code:\n" );
2337+ char config_path [1024 ];
2338+ #ifdef __APPLE__
2339+ snprintf (config_path , sizeof (config_path ),
2340+ "%s/Library/Application Support/Code/User/mcp.json" , home );
2341+ #else
2342+ snprintf (config_path , sizeof (config_path ), "%s/.config/Code/User/mcp.json" , home );
2343+ #endif
2344+ if (!dry_run ) {
2345+ cbm_install_vscode_mcp (self_path , config_path );
2346+ }
2347+ printf (" mcp: %s\n" , config_path );
2348+ }
2349+
2350+ /* Step 13: Ensure PATH */
23222351 char bin_dir [1024 ];
23232352 snprintf (bin_dir , sizeof (bin_dir ), "%s/.local/bin" , home );
23242353 const char * rc = cbm_detect_shell_rc (home );
@@ -2492,6 +2521,20 @@ int cbm_cmd_uninstall(int argc, char **argv) {
24922521 printf (" removed instructions\n" );
24932522 }
24942523
2524+ if (agents .vscode ) {
2525+ char config_path [1024 ];
2526+ #ifdef __APPLE__
2527+ snprintf (config_path , sizeof (config_path ),
2528+ "%s/Library/Application Support/Code/User/mcp.json" , home );
2529+ #else
2530+ snprintf (config_path , sizeof (config_path ), "%s/.config/Code/User/mcp.json" , home );
2531+ #endif
2532+ if (!dry_run ) {
2533+ cbm_remove_vscode_mcp (config_path );
2534+ }
2535+ printf ("VS Code: removed MCP config entry\n" );
2536+ }
2537+
24952538 /* Step 2: Remove indexes */
24962539 int index_count = 0 ;
24972540 const char * cache_dir = get_cache_dir (home );
0 commit comments