File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,14 @@ const App = () => {
79
79
const [ sseUrl , setSseUrl ] = useState < string > ( ( ) => {
80
80
return localStorage . getItem ( "lastSseUrl" ) || "http://localhost:3001/sse" ;
81
81
} ) ;
82
- const [ transportType , setTransportType ] = useState < "stdio" | "sse" | "streamable-http" > ( ( ) => {
82
+ const [ transportType , setTransportType ] = useState <
83
+ "stdio" | "sse" | "streamable-http"
84
+ > ( ( ) => {
83
85
return (
84
- ( localStorage . getItem ( "lastTransportType" ) as "stdio" | "sse" | "streamable-http" ) || "stdio"
86
+ ( localStorage . getItem ( "lastTransportType" ) as
87
+ | "stdio"
88
+ | "sse"
89
+ | "streamable-http" ) || "stdio"
85
90
) ;
86
91
} ) ;
87
92
const [ logLevel , setLogLevel ] = useState < LoggingLevel > ( "debug" ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {
14
14
} from "@modelcontextprotocol/sdk/client/stdio.js" ;
15
15
import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js" ;
16
16
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js" ;
17
- import { StreamableHTTPClientTransport } from ' @modelcontextprotocol/sdk/client/streamableHttp.js' ;
17
+ import { StreamableHTTPClientTransport } from " @modelcontextprotocol/sdk/client/streamableHttp.js" ;
18
18
import express from "express" ;
19
19
import { findActualExecutable } from "spawn-rx" ;
20
20
import mcpProxy from "./mcpProxy.js" ;
@@ -96,7 +96,9 @@ const createTransport = async (req: express.Request): Promise<Transport> => {
96
96
console . log ( "Connected to SSE transport" ) ;
97
97
return transport ;
98
98
} else if ( transportType === "streamable - http ") {
99
- const transport = new StreamableHTTPClientTransport ( new URL ( query . url as string ) ) ;
99
+ const transport = new StreamableHTTPClientTransport (
100
+ new URL ( query . url as string ) ,
101
+ ) ;
100
102
await transport . start ( ) ;
101
103
console . log ( "Connected to Streamable HTTP transport" ) ;
102
104
return transport ;
You can’t perform that action at this time.
0 commit comments