Skip to content

Error when connecting to a fastMCP server over SSE (text/event-stream) #39

@jfsanchez91

Description

@jfsanchez91

I''m trying to connect to a MCP server developed with Python fastMCP.
The MCP server runs on SSE (text/event-stream).
The MCP client just hangs for 1 min and then fails with timeout.

here is the simple fastMCP server:

#!/usr/bin/env python3
import datetime
from fastmcp import FastMCP

mcp = FastMCP(name="Simple-MCP-Server")

@mcp.tool()
def current_datetime() -> dict:
    """Provides the current date and time in ISO format."""
    return {"datetime": f"{datetime.datetime.now().isoformat()}"}

if __name__ == "__main__":
    mcp.run(transport="streamable-http")
uv run simple_server.py

the MCP client fails during the initialization process.

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