@@ -293,17 +293,14 @@ export const createMCPPluginStoreSlice: StateCreator<
293293 ( ! option ?. connection ?. type && ! option ?. connection ?. url ) ,
294294 ) ;
295295
296- const hasNonHttpDeployment = deploymentOptions . some ( ( option ) => {
297- const type = option ?. connection ?. type ;
298- if ( ! type && option ?. connection ?. url ) return false ;
296+ // Check if cloudEndPoint is available: stdio type + haveCloudEndpoint exists
297+ // Both desktop and web should use cloud endpoint if available
298+ const hasCloudEndpoint = stdioOption && haveCloudEndpoint ;
299299
300- return type && type !== 'http' ;
301- } ) ;
302-
303- // Check if cloudEndPoint is available: web + stdio type + haveCloudEndpoint exists
304- const hasCloudEndpoint = ! isDesktop && stdioOption && haveCloudEndpoint ;
305-
306- let shouldUseHttpDeployment = ! ! httpOption && ( ! hasNonHttpDeployment || ! isDesktop ) ;
300+ // Prioritize endpoint (http/cloud) over stdio in all environments
301+ // Desktop: endpoint > stdio
302+ // Web: endpoint only (stdio not supported)
303+ let shouldUseHttpDeployment = ! ! httpOption ;
307304
308305 if ( hasCloudEndpoint ) {
309306 // Use cloudEndPoint, create cloud type connection
@@ -664,10 +661,10 @@ export const createMCPPluginStoreSlice: StateCreator<
664661 errorLog,
665662 params : connection
666663 ? {
667- args : connection . args ,
668- command : connection . command ,
669- type : connection . type ,
670- }
664+ args : connection . args ,
665+ command : connection . command ,
666+ type : connection . type ,
667+ }
671668 : undefined ,
672669 step : 'installation_error' ,
673670 timestamp : Date . now ( ) ,
0 commit comments