You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/migration.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -244,7 +244,29 @@ from mcp.server.streamable_http_manager import StreamableHTTPASGIApp
244
244
245
245
## New Features
246
246
247
-
<!-- Add new features below -->
247
+
### `streamable_http_app()` available on lowlevel Server
248
+
249
+
The `streamable_http_app()` method is now available directly on the lowlevel `Server` class, not just `FastMCP`. This allows using the streamable HTTP transport without the FastMCP wrapper.
250
+
251
+
```python
252
+
from mcp.server.lowlevel.server import Server
253
+
254
+
server = Server("my-server")
255
+
256
+
# Register handlers...
257
+
@server.list_tools()
258
+
asyncdeflist_tools():
259
+
return [...]
260
+
261
+
# Create a Starlette app for streamable HTTP
262
+
app = server.streamable_http_app(
263
+
streamable_http_path="/mcp",
264
+
json_response=False,
265
+
stateless_http=False,
266
+
)
267
+
```
268
+
269
+
The lowlevel `Server` also now exposes a `session_manager` property to access the `StreamableHTTPSessionManager` after calling `streamable_http_app()`.
0 commit comments