| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -950,13 +950,12 @@ By default, SSE servers are mounted at `/sse` and Streamable HTTP servers are mo | |||
| 950 | 950 | The following example shows how to use `streamable_http_app()`, a method that returns a `Starlette` application object. | |
| 951 | 951 | You can then append additional routes to that application as needed. | |
| 952 | 952 | ||
| 953 | - ``` | ||
| 954 | - from starlette.routing import Route | ||
| 955 | - | ||
| 953 | + ```python | ||
| 956 | 954 | mcp = FastMCP("My App") | |
| 957 | 955 | ||
| 958 | 956 | app = mcp.streamable_http_app() | |
| 959 | 957 | # Additional non-MCP routes can be added like so: | |
| 958 | + # from starlette.routing import Route | ||
| 960 | 959 | # app.router.routes.append(Route("/", endpoint=other_route_function)) | |
| 961 | 960 | ``` | |
| 962 | 961 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments