MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / handle_sse

Function handle_sse

tests/interaction/_connect.py:335–338  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

333 lowlevel = server._lowlevel_server if isinstance(server, MCPServer) else server
334
335 async def handle_sse(request: Request) -> Response:
336 async with sse.connect_sse(request.scope, request.receive, request._send) as (read, write):
337 await lowlevel.run(read, write, lowlevel.create_initialization_options())
338 return Response()
339
340 app = Starlette(
341 routes=[

Callers

nothing calls this directly

Calls 3

connect_sseMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected