@@ -2,7 +2,11 @@ import type { Integration } from '../../lib/constants';
22import { traceStep } from '../../telemetry' ;
33import { analytics } from '../../utils/analytics' ;
44import clack from '../../utils/clack' ;
5- import { abort , abortIfCancelled } from '../../utils/clack-utils' ;
5+ import {
6+ abort ,
7+ abortIfCancelled ,
8+ askForCloudRegion ,
9+ } from '../../utils/clack-utils' ;
610import { MCPClient } from './MCPClient' ;
711import { CursorMCPClient } from './clients/cursor' ;
812import { ClaudeMCPClient } from './clients/claude' ;
@@ -24,6 +28,17 @@ export const addMCPServerToClientsStep = async ({
2428 cloudRegion ?: CloudRegion ;
2529 askPermission ?: boolean ;
2630} ) : 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+
2742 const hasPermission = askPermission
2843 ? await abortIfCancelled (
2944 clack . select ( {
@@ -83,7 +98,7 @@ export const addMCPServerToClientsStep = async ({
8398 clack . log . info ( 'Removed existing installation.' ) ;
8499 }
85100
86- const personalApiKey = await getPersonalApiKey ( { region : cloudRegion } ) ;
101+ const personalApiKey = await getPersonalApiKey ( { cloudRegion : region } ) ;
87102
88103 await traceStep ( 'adding mcp servers' , async ( ) => {
89104 await addMCPServer ( clients , personalApiKey ) ;
0 commit comments