From 4173a64d348918df6269e99965de746de9b01f5d Mon Sep 17 00:00:00 2001 From: Ayush Tiwari Date: Tue, 3 Jun 2025 11:53:20 +0530 Subject: [PATCH 1/2] Improved docs for better clarity on mounting ASGI apps --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index d76d3d267..e1861819a 100644 --- a/README.md +++ b/README.md @@ -506,6 +506,15 @@ app = Starlette( ] ) +# To mount a specific path, provide the path in the mount_path argument or you can set it in the config +''' +app = Starlette( + routes=[ + Mount('/weather', app=mcp.sse_app(mount_path="/weather")), + ] +) +''' + # or dynamically mount as host app.router.routes.append(Host('mcp.acme.corp', app=mcp.sse_app())) ``` From 98dc6517ad4ef14c8c682f095620470492926751 Mon Sep 17 00:00:00 2001 From: Ayush Tiwari Date: Tue, 3 Jun 2025 11:58:01 +0530 Subject: [PATCH 2/2] Improved docs for better clarity on mounting ASGI apps --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index e1861819a..8999b91db 100644 --- a/README.md +++ b/README.md @@ -506,7 +506,7 @@ app = Starlette( ] ) -# To mount a specific path, provide the path in the mount_path argument or you can set it in the config +# To mount a specific path, provide the path in the mount_path argument or you can set it in the config. The server will now connect on "/weather/sse" ''' app = Starlette( routes=[ @@ -514,7 +514,6 @@ app = Starlette( ] ) ''' - # or dynamically mount as host app.router.routes.append(Host('mcp.acme.corp', app=mcp.sse_app())) ```