From f9cbfbe8221397952a8baadafcaa908ebb91980b Mon Sep 17 00:00:00 2001 From: cliffhall Date: Fri, 2 May 2025 17:50:00 -0400 Subject: [PATCH] Create the appropriate TransportOptions object for the selected transport * In useConnection.ts - In the case for "stdio", let the transportOptions be the same as "sse" because it will use that transport to the proxy regardless --- client/src/lib/hooks/useConnection.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/client/src/lib/hooks/useConnection.ts b/client/src/lib/hooks/useConnection.ts index 5ae9f69..f7554f9 100644 --- a/client/src/lib/hooks/useConnection.ts +++ b/client/src/lib/hooks/useConnection.ts @@ -312,7 +312,18 @@ export function useConnection({ mcpProxyServerUrl.searchParams.append("command", command); mcpProxyServerUrl.searchParams.append("args", args); mcpProxyServerUrl.searchParams.append("env", JSON.stringify(env)); - transportOptions = {}; + transportOptions = { + authProvider: serverAuthProvider, + eventSourceInit: { + fetch: ( + url: string | URL | globalThis.Request, + init: RequestInit | undefined, + ) => fetch(url, { ...init, headers }), + }, + requestInit: { + headers, + }, + }; break; case "sse":