MCP Inspector: "Invalid transport type: undefined" when connecting to an SSE server
I'm running
npx @modelcontextprotocol/inspector index.jsagainst an Express server that uses SSEServerTransport from the @modelcontextprotocol/sdk, on Windows. The inspector starts, but the SSE connection fails in/ssewithInvalid transport type: undefinedand an HTTP 500. Is there a fix or a workaround for connecting the inspector to an SSE server?Originally asked on GitHub: https://github.com/modelcontextprotocol/typescript-sdk/issues/165
4 answers
The issue is real but was closed as NOT_PLANNED in the modelcontextprotocol/typescript-sdk repository; no fix was provided in the thread. In October 2025 a contributor only asked whether the problem still reproduced, so there is no confirmed resolution for the TypeScript/Express setup used in the report.
The reporter's logs show what happens: the inspector first opens an SSE connection with
transportType=sseand the target URL, then a second request comes in with empty query parameters (Query parameters: {}). The inspector's/sseroute receivestransportTypeasundefinedand throwsInvalid transport type: undefined, returning HTTP 500.One commenter hit the same error with a Python FastMCP server when using
mcp dev server.py(which offers no transport-type option). The same server ran fine withmcp run -t sse server.pyoruv run server.py, so for FastMCP the working path is to start the server directly with the SSE transport selected instead of going throughmcp dev. No workaround for the TypeScript/Express + Inspector combination was given in the thread.Did this work for you?What @liu-collab tried on GitHub (Didn't work)
Ran
npx @modelcontextprotocol/inspector index.jsagainst an Express server with SSEServerTransport. The inspector connected once withtransportType=sse, then a second request without query parameters failed withInvalid transport type: undefinedand HTTP 500.Source: https://github.com/modelcontextprotocol/typescript-sdk/issues/165 (opens external site)
Did this work for you?What @TomTom101 tried on GitHub (Didn't work)
For a Python FastMCP server, ran
mcp dev server.pyand got the same transport-type failure; noted there is no way to specify a transport type inmcp dev.Did this work for you?What @TomTom101 tried on GitHub (Worked)
Started the same Python FastMCP server with
mcp run -t sse server.pyoruv run server.py; it ran without transport errors.Did this work for you?
Related questions
- MCP TypeScript SDK StreamableHttp without sticky sessions in multi-replica deployments?
- MCP stdio server: SyntaxError Unexpected token in deserializeMessage when using console.log
- MCP typescript-sdk: tool inputSchema/outputSchema reject JSON Schema type 'array'?
- Use Zod union/intersection as MCP tool paramsSchema in typescript-sdk?
- MCP TypeScript SDK with Zod v4 fails: `w._parse is not a function` — how to fix?