@@ -13,10 +13,17 @@ import { ClaudeMCPClient } from './clients/claude';
1313import { getPersonalApiKey } from '../../mcp' ;
1414import type { CloudRegion } from '../../utils/types' ;
1515
16- export const getSupportedClients = ( ) : MCPClient [ ] => {
17- return [ new CursorMCPClient ( ) , new ClaudeMCPClient ( ) ] . filter ( ( client ) =>
18- client . isClientSupported ( ) ,
19- ) ;
16+ export const getSupportedClients = async ( ) : Promise < MCPClient [ ] > => {
17+ const allClients = [ new CursorMCPClient ( ) , new ClaudeMCPClient ( ) ] ;
18+ const supportedClients : MCPClient [ ] = [ ] ;
19+
20+ for ( const client of allClients ) {
21+ if ( await client . isClientSupported ( ) ) {
22+ supportedClients . push ( client ) ;
23+ }
24+ }
25+
26+ return supportedClients ;
2027} ;
2128
2229export const addMCPServerToClientsStep = async ( {
@@ -57,7 +64,7 @@ export const addMCPServerToClientsStep = async ({
5764 return [ ] ;
5865 }
5966
60- const clients = getSupportedClients ( ) ;
67+ const clients = await getSupportedClients ( ) ;
6168
6269 const installedClients = await getInstalledClients ( ) ;
6370
@@ -182,7 +189,7 @@ export const removeMCPServerFromClientsStep = async ({
182189} ;
183190
184191export const getInstalledClients = async ( ) : Promise < MCPClient [ ] > => {
185- const clients = getSupportedClients ( ) ;
192+ const clients = await getSupportedClients ( ) ;
186193
187194 const installedClients : MCPClient [ ] = [ ] ;
188195
0 commit comments