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
-[Mounting to an Existing ASGI Server](#mounting-to-an-existing-asgi-server)
34
35
-[Examples](#examples)
35
36
-[Echo Server](#echo-server)
36
37
-[SQLite Explorer](#sqlite-explorer)
@@ -346,6 +347,31 @@ python server.py
346
347
mcp run server.py
347
348
```
348
349
350
+
### Mounting to an Existing ASGI Server
351
+
352
+
You can mount the SSE server to an existing ASGI server using the `sse_app` method. This allows you to integrate the SSE server with other ASGI applications.
353
+
354
+
```python
355
+
from starlette.applications import Starlette
356
+
from starlette.routes import Mount, Host
357
+
from mcp.server.fastmcp import FastMCP
358
+
359
+
360
+
mcp = FastMCP("My App")
361
+
362
+
# Mount the SSE server to the existing ASGI server
0 commit comments