@@ -280,7 +280,9 @@ export function useConnection({
280280
281281 const checkProxyHealth = async ( ) => {
282282 try {
283- const proxyHealthUrl = new URL ( `${ getMCPProxyAddress ( config ) } /health` ) ;
283+ const url = new URL ( sseUrl ) ;
284+ // const proxyHealthUrl = new URL(`${getMCPProxyAddress(config)}/health`);
285+ const proxyHealthUrl = new URL ( `${ url . origin } /health` ) ;
284286 const { token : proxyAuthToken , header : proxyAuthTokenHeader } =
285287 getMCPProxyAuthToken ( config ) ;
286288 const headers : HeadersInit = { } ;
@@ -294,7 +296,7 @@ export function useConnection({
294296 }
295297 } catch ( e ) {
296298 console . error ( "Couldn't connect to MCP Proxy Server" , e ) ;
297- throw e ;
299+ // throw e;
298300 }
299301 } ;
300302
@@ -350,6 +352,16 @@ export function useConnection({
350352 setConnectionStatus ( "error-connecting-to-proxy" ) ;
351353 return ;
352354 }
355+ // const mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/sse`);
356+ const mcpProxyServerUrl = new URL ( sseUrl ) ;
357+ mcpProxyServerUrl . searchParams . append ( "transportType" , transportType ) ;
358+ if ( transportType === "stdio" ) {
359+ mcpProxyServerUrl . searchParams . append ( "command" , command ) ;
360+ mcpProxyServerUrl . searchParams . append ( "args" , args ) ;
361+ mcpProxyServerUrl . searchParams . append ( "env" , JSON . stringify ( env ) ) ;
362+ } else {
363+ mcpProxyServerUrl . searchParams . append ( "url" , sseUrl ) ;
364+ }
353365
354366 try {
355367 // Inject auth manually instead of using SSEClientTransport, because we're
0 commit comments