Skip to content

Commit b08a009

Browse files
authored
Revert "chore: skip mcp on eu cloud region for now (#52)" (#53)
This reverts commit 675419a.
1 parent 675419a commit b08a009

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

src/mcp.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
removeMCPServerFromClientsStep,
55
} from './steps/add-mcp-server-to-clients';
66
import clack from './utils/clack';
7-
import { abort } from './utils/clack-utils';
7+
import { abort, askForCloudRegion } from './utils/clack-utils';
88
import type { CloudRegion } from './utils/types';
99
import opn from 'opn';
1010
import { getCloudUrlFromRegion } from './utils/urls';
@@ -50,9 +50,11 @@ export const runMCPRemove = async () => {
5050
};
5151

5252
export const getPersonalApiKey = async (options: {
53-
cloudRegion: CloudRegion;
53+
region?: CloudRegion;
5454
}): Promise<string> => {
55-
const cloudUrl = getCloudUrlFromRegion(options.cloudRegion);
55+
const cloudRegion = options.region ?? (await askForCloudRegion());
56+
57+
const cloudUrl = getCloudUrlFromRegion(cloudRegion);
5658

5759
const urlToOpen = `${cloudUrl}/settings/user-api-keys?preset=mcp_server`;
5860

src/steps/add-mcp-server-to-clients/index.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ import type { Integration } from '../../lib/constants';
22
import { traceStep } from '../../telemetry';
33
import { analytics } from '../../utils/analytics';
44
import clack from '../../utils/clack';
5-
import {
6-
abort,
7-
abortIfCancelled,
8-
askForCloudRegion,
9-
} from '../../utils/clack-utils';
5+
import { abort, abortIfCancelled } from '../../utils/clack-utils';
106
import { MCPClient } from './MCPClient';
117
import { CursorMCPClient } from './clients/cursor';
128
import { ClaudeMCPClient } from './clients/claude';
@@ -28,17 +24,6 @@ export const addMCPServerToClientsStep = async ({
2824
cloudRegion?: CloudRegion;
2925
askPermission?: boolean;
3026
}): Promise<string[]> => {
31-
const region = cloudRegion ?? (await askForCloudRegion());
32-
33-
if (region === 'eu') {
34-
if (!askPermission) {
35-
await abort(
36-
'The MCP server is not available in the EU region. It is coming soon!',
37-
);
38-
}
39-
return [];
40-
}
41-
4227
const hasPermission = askPermission
4328
? await abortIfCancelled(
4429
clack.select({
@@ -98,7 +83,7 @@ export const addMCPServerToClientsStep = async ({
9883
clack.log.info('Removed existing installation.');
9984
}
10085

101-
const personalApiKey = await getPersonalApiKey({ cloudRegion: region });
86+
const personalApiKey = await getPersonalApiKey({ region: cloudRegion });
10287

10388
await traceStep('adding mcp servers', async () => {
10489
await addMCPServer(clients, personalApiKey);

0 commit comments

Comments
 (0)