Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions src/fastmcp/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2053,27 +2053,6 @@ async def run_http_async(

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,
Expand Down
11 changes: 0 additions & 11 deletions tests/deprecated/test_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ def test_deprecation_warnings_setting_false(self):
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")
Expand Down