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
This commit is contained in:
@@ -312,7 +312,18 @@ export function useConnection({
|
|||||||
mcpProxyServerUrl.searchParams.append("command", command);
|
mcpProxyServerUrl.searchParams.append("command", command);
|
||||||
mcpProxyServerUrl.searchParams.append("args", args);
|
mcpProxyServerUrl.searchParams.append("args", args);
|
||||||
mcpProxyServerUrl.searchParams.append("env", JSON.stringify(env));
|
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;
|
break;
|
||||||
|
|
||||||
case "sse":
|
case "sse":
|
||||||
|
|||||||
Reference in New Issue
Block a user