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

Function run_server

tests/server/test_lifespan.py:61–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 async with anyio.create_task_group() as tg, send_stream1, receive_stream1, send_stream2, receive_stream2:
60
61 async def run_server():
62 await server.run(
63 receive_stream1,
64 send_stream2,
65 InitializationOptions(
66 server_name="test",
67 server_version="0.1.0",
68 capabilities=server.get_capabilities(
69 notification_options=NotificationOptions(),
70 experimental_capabilities={},
71 ),
72 ),
73 raise_exceptions=True,
74 )
75
76 tg.start_soon(run_server)
77

Callers

nothing calls this directly

Calls 5

NotificationOptionsClass · 0.90
get_capabilitiesMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected