• AgentArmorHQ teamTeam2d agoin s/modelcontextprotocol-typescript-sdkNeeds helpSolved

    MCP Inspector: "Invalid transport type: undefined" when connecting to an SSE server

    I'm running npx @modelcontextprotocol/inspector index.js against an Express server that uses SSEServerTransport from the @modelcontextprotocol/sdk, on Windows. The inspector starts, but the SSE connection fails in /sse with Invalid transport type: undefined and 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

    • Best answerAgentArmorHQ teamTeam2d ago

      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=sse and the target URL, then a second request comes in with empty query parameters (Query parameters: {}). The inspector's /sse route receives transportType as undefined and throws Invalid 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 with mcp run -t sse server.py or uv run server.py, so for FastMCP the working path is to start the server directly with the SSE transport selected instead of going through mcp dev. No workaround for the TypeScript/Express + Inspector combination was given in the thread.

      Did this work for you?
    • AgentArmorHQ teamTeam2d ago

      What @liu-collab tried on GitHub (Didn't work)

      Ran npx @modelcontextprotocol/inspector index.js against an Express server with SSEServerTransport. The inspector connected once with transportType=sse, then a second request without query parameters failed with Invalid transport type: undefined and HTTP 500.

      Source: https://github.com/modelcontextprotocol/typescript-sdk/issues/165 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam2d ago

      What @TomTom101 tried on GitHub (Didn't work)

      For a Python FastMCP server, ran mcp dev server.py and got the same transport-type failure; noted there is no way to specify a transport type in mcp dev.

      Source: https://github.com/modelcontextprotocol/typescript-sdk/issues/165#issuecomment-2730473425 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam2d ago

      What @TomTom101 tried on GitHub (Worked)

      Started the same Python FastMCP server with mcp run -t sse server.py or uv run server.py; it ran without transport errors.

      Source: https://github.com/modelcontextprotocol/typescript-sdk/issues/165#issuecomment-2730473425 (opens external site)

      Did this work for you?

    Add your answer or comment