Skip to content

ModuleNotFoundError Exception raised when enabling SSE transport #2

@kellyjonbrazil

Description

@kellyjonbrazil

When running multi_ssh_mcp.py with MCP_TRANSPORT=sse a ModuleNotFoundError exception is raised:

# MCP_TRANSPORT=sse MCP_HOST=0.0.0.0 MCP_PORT=30040 python multi_ssh_mcp.py 
INFO:ssh-mcp-server:Loaded 1 server configurations
INFO:ssh-mcp-server:Starting FastMCP SSH Server with config: /srv/multi-ssh-mcp-1/servers.json
INFO:ssh-mcp-server:Loaded 1 server(s): linux-client-1
Traceback (most recent call last):
  File "/srv/multi-ssh-mcp-1/multi_ssh_mcp.py", line 775, in <module>
    main()
    ~~~~^^
  File "/srv/multi-ssh-mcp-1/multi_ssh_mcp.py", line 760, in main
    from fastmcp.sse import create_sse_transport
ModuleNotFoundError: No module named 'fastmcp.sse'

# pip show fastmcp
Name: fastmcp
Version: 2.12.4
Summary: The fast, Pythonic way to build MCP servers and clients.
Home-page: https://gofastmcp.com
Author: Jeremiah Lowin
Author-email: 
License-Expression: Apache-2.0
Location: /srv/multi-ssh-mcp-1/.venv/lib/python3.13/site-packages
Requires: authlib, cyclopts, exceptiongroup, httpx, mcp, openapi-core, openapi-pydantic, pydantic, pyperclip, python-dotenv, rich
Required-by: 

It looks like SSE support may be changed in the version of fastmcp that got downloaded with pip against the requirements.txt file. Also, it looks like newer versions of fastmcp now support http-streamable, so it might be nice to add that transport method since sse is deprecated.

I tried downgrading fastmcp to various versions all the way down to v0.1.0 but I still got the same Exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions