Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions src/steps/add-mcp-server-to-clients/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ import { ClaudeMCPClient } from './clients/claude';
import { getPersonalApiKey } from '../../mcp';
import type { CloudRegion } from '../../utils/types';

export const getSupportedClients = (): MCPClient[] => {
return [new CursorMCPClient(), new ClaudeMCPClient()].filter((client) =>
client.isClientSupported(),
);
export const getSupportedClients = async (): Promise<MCPClient[]> => {
const allClients = [new CursorMCPClient(), new ClaudeMCPClient()];
const supportedClients: MCPClient[] = [];

for (const client of allClients) {
if (await client.isClientSupported()) {
supportedClients.push(client);
}
}

return supportedClients;
};

export const addMCPServerToClientsStep = async ({
Expand Down Expand Up @@ -57,7 +64,7 @@ export const addMCPServerToClientsStep = async ({
return [];
}

const clients = getSupportedClients();
const clients = await getSupportedClients();

const installedClients = await getInstalledClients();

Expand Down Expand Up @@ -182,7 +189,7 @@ export const removeMCPServerFromClientsStep = async ({
};

export const getInstalledClients = async (): Promise<MCPClient[]> => {
const clients = getSupportedClients();
const clients = await getSupportedClients();

const installedClients: MCPClient[] = [];

Expand Down
Loading