fix: allow SSE server router to be nested (#240)

* fix: allow SSE server router to be nested
This commit is contained in:
Sylvain Wallez 2025-06-07 04:40:26 +02:00 • committed by GitHub
commit 47518b3906
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,10 +1,10 @@
from mcp import ClientSession, StdioServerParameters, types
from mcp.client.sse import sse_client
import sys
async def run():
async with sse_client("http://localhost:8000/sse") as (read, write):
url = sys.argv[1]
async with sse_client(url) as (read, write):
async with ClientSession(
read, write
) as session:
@ -25,4 +25,4 @@ async def run():
if __name__ == "__main__":
import asyncio
asyncio.run(run())
asyncio.run(run())