mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 14:54:24 +01:00
Fix inconsistencies in examples
This commit is contained in:
@@ -11,7 +11,7 @@ Example usage:
|
||||
# Create Starlette routes for SSE and message handling
|
||||
routes = [
|
||||
Route("/sse", endpoint=handle_sse),
|
||||
Mount("/messages", endpoint=handle_messages, methods=["POST"])
|
||||
Mount("/messages", app=sse.handle_post_message),
|
||||
]
|
||||
|
||||
# Define handler functions
|
||||
@@ -23,9 +23,6 @@ Example usage:
|
||||
streams[0], streams[1], app.create_initialization_options()
|
||||
)
|
||||
|
||||
async def handle_messages(request):
|
||||
await sse.handle_post_message(request.scope, request.receive, request._send)
|
||||
|
||||
# Create and run Starlette app
|
||||
starlette_app = Starlette(routes=routes)
|
||||
uvicorn.run(starlette_app, host="0.0.0.0", port=port)
|
||||
|
||||
Reference in New Issue
Block a user