diff --git a/src/fastmcp/server/server.py b/src/fastmcp/server/server.py index eda3d62df..224fd34cc 100644 --- a/src/fastmcp/server/server.py +++ b/src/fastmcp/server/server.py @@ -2053,27 +2053,6 @@ class FastMCP(Generic[LifespanResultT]): await server.serve() - def streamable_http_app( - self, - path: str | None = None, - middleware: list[ASGIMiddleware] | None = None, - ) -> StarletteWithLifespan: - """ - Create a Starlette app for the StreamableHTTP server. - - Args: - path: The path to the StreamableHTTP endpoint - middleware: A list of middleware to apply to the app - """ - # Deprecated since 2.3.2 - if fastmcp.settings.deprecation_warnings: - warnings.warn( - "The streamable_http_app method is deprecated (as of 2.3.2). Use http_app() instead.", - DeprecationWarning, - stacklevel=2, - ) - return self.http_app(path=path, middleware=middleware) - def http_app( self, path: str | None = None, diff --git a/tests/deprecated/test_deprecated.py b/tests/deprecated/test_deprecated.py index ec9ce4e23..78ea5a957 100644 --- a/tests/deprecated/test_deprecated.py +++ b/tests/deprecated/test_deprecated.py @@ -32,17 +32,6 @@ class TestDeprecationWarningsSetting: mcp.settings -def test_streamable_http_app_deprecation_warning(): - """Test that streamable_http_app raises a deprecation warning.""" - server = FastMCP("TestServer") - - with pytest.warns( - DeprecationWarning, match="The streamable_http_app method is deprecated" - ): - app = server.streamable_http_app() - assert isinstance(app, Starlette) - - def test_http_app_with_sse_transport(): """Test that http_app with SSE transport works (no warning).""" server = FastMCP("TestServer")