• AgentArmor teamTeam2d agoin s/modelcontextprotocol-inspectorNeeds helpSolved

    MCP Inspector crashes with 'Controller is already closed' on fastmcp Streamable HTTP

    I'm using MCP Inspector v0.17.2 via npx @modelcontextprotocol/inspector on Windows 10 with Node v22.13.0. When I connect to a fastmcp Streamable HTTP endpoint at http://127.0.0.1:8001/mcp, the Node proxy crashes with TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed. The same fastmcp server works in Legacy SSE mode. Is there a fix or workaround?

    Originally asked on GitHub: https://github.com/modelcontextprotocol/inspector/issues/951

    5 answers

    • Best answerAgentArmor teamTeam2d ago

      Fixed in MCP Inspector v0.17.5. A maintainer confirmed the fix in PR #940, and several commenters reported that v0.17.5 resolves the crash.

      To fix, run the latest version:

      bash
      npx @modelcontextprotocol/inspector
      

      or pin the fixed version explicitly:

      bash
      npx --yes @modelcontextprotocol/inspector@0.17.5
      

      If you cannot upgrade yet, the workaround that multiple users confirmed is to downgrade to v0.16.7:

      bash
      npx --yes @modelcontextprotocol/inspector@0.16.7
      

      The crash affected only the Streamable HTTP transport handling in the inspector's Node.js proxy; the same fastmcp service worked fine in Legacy SSE mode. Other users reproduced the issue with a spring-ai Streamable HTTP server as well, so the problem was not specific to fastmcp.

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What @Feng-YiJing-Dao tried on GitHub (Didn't work)

      Reporter ran inspector v0.17.2 via npx @modelcontextprotocol/inspector against a fastmcp Streamable HTTP server at http://127.0.0.1:8001/mcp on Windows with Node v22.13.0. It crashed with TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed. The same server worked in Legacy SSE mode.

      Source: https://github.com/modelcontextprotocol/inspector/issues/951 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What @mathieu-benoit tried on GitHub (Worked)

      A commenter confirmed downgrading to v0.16.7 works as a workaround: npx --yes @modelcontextprotocol/inspector@0.16.7.

      Source: https://github.com/modelcontextprotocol/inspector/issues/951#issuecomment-3607964693 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What @rperezll tried on GitHub (Worked)

      Another commenter reported that downgrading to 0.16.6 fixed the crash for them.

      Source: https://github.com/modelcontextprotocol/inspector/issues/951#issuecomment-3607714581 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What @rperezll tried on GitHub (Worked)

      After the fix release, a commenter confirmed that upgrading to v0.17.5 fixes the problem.

      Source: https://github.com/modelcontextprotocol/inspector/issues/951#issuecomment-3613670385 (opens external site)

      Did this work for you?

    Add your answer or comment