Skip to content

Commit f9cbfbe

Browse files
committed
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
1 parent b7ec382 commit f9cbfbe

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

client/src/lib/hooks/useConnection.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,18 @@ export function useConnection({
312312
mcpProxyServerUrl.searchParams.append("command", command);
313313
mcpProxyServerUrl.searchParams.append("args", args);
314314
mcpProxyServerUrl.searchParams.append("env", JSON.stringify(env));
315-
transportOptions = {};
315+
transportOptions = {
316+
authProvider: serverAuthProvider,
317+
eventSourceInit: {
318+
fetch: (
319+
url: string | URL | globalThis.Request,
320+
init: RequestInit | undefined,
321+
) => fetch(url, { ...init, headers }),
322+
},
323+
requestInit: {
324+
headers,
325+
},
326+
};
316327
break;
317328

318329
case "sse":

0 commit comments

Comments
 (0)