File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,9 @@ 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" > ( ( ) => {
82
+ const [ transportType , setTransportType ] = useState < "stdio" | "sse" | "streamable-http" > ( ( ) => {
83
83
return (
84
- ( localStorage . getItem ( "lastTransportType" ) as "stdio" | "sse" ) || "stdio"
84
+ ( localStorage . getItem ( "lastTransportType" ) as "stdio" | "sse" | "streamable-http" ) || "stdio"
85
85
) ;
86
86
} ) ;
87
87
const [ logLevel , setLogLevel ] = useState < LoggingLevel > ( "debug" ) ;
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ import {
39
39
40
40
interface SidebarProps {
41
41
connectionStatus : ConnectionStatus ;
42
- transportType : "stdio" | "sse" ;
43
- setTransportType : ( type : "stdio" | "sse" ) => void ;
42
+ transportType : "stdio" | "sse" | "streamable-http" ;
43
+ setTransportType : ( type : "stdio" | "sse" | "streamable-http" ) => void ;
44
44
command : string ;
45
45
setCommand : ( command : string ) => void ;
46
46
args : string ;
@@ -111,7 +111,7 @@ const Sidebar = ({
111
111
</ label >
112
112
< Select
113
113
value = { transportType }
114
- onValueChange = { ( value : "stdio" | "sse" ) =>
114
+ onValueChange = { ( value : "stdio" | "sse" | "streamable-http" ) =>
115
115
setTransportType ( value )
116
116
}
117
117
>
@@ -121,6 +121,7 @@ const Sidebar = ({
121
121
< SelectContent >
122
122
< SelectItem value = "stdio" > STDIO</ SelectItem >
123
123
< SelectItem value = "sse" > SSE</ SelectItem >
124
+ < SelectItem value = "streamable-http" > Streamable HTTP</ SelectItem >
124
125
</ SelectContent >
125
126
</ Select >
126
127
</ div >
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import { getMCPServerRequestTimeout } from "@/utils/configUtils";
42
42
import { InspectorConfig } from "../configurationTypes" ;
43
43
44
44
interface UseConnectionOptions {
45
- transportType : "stdio" | "sse" ;
45
+ transportType : "stdio" | "sse" | "streamable-http" ;
46
46
command : string ;
47
47
args : string ;
48
48
sseUrl : string ;
Original file line number Diff line number Diff line change @@ -14,6 +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
18
import express from "express" ;
18
19
import { findActualExecutable } from "spawn-rx" ;
19
20
import mcpProxy from "./mcpProxy.js" ;
@@ -94,6 +95,11 @@ const createTransport = async (req: express.Request): Promise<Transport> => {
94
95
95
96
console . log ( "Connected to SSE transport" ) ;
96
97
return transport ;
98
+ } else if ( transportType === "streamable - http ") {
99
+ const transport = new StreamableHTTPClientTransport ( new URL ( query . url as string ) ) ;
100
+ await transport . start ( ) ;
101
+ console . log ( "Connected to Streamable HTTP transport" ) ;
102
+ return transport ;
97
103
} else {
98
104
console . error ( `Invalid transport type: ${ transportType } ` ) ;
99
105
throw new Error ( "Invalid transport type specified" ) ;
You can’t perform that action at this time.
0 commit comments