We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29f62cb commit 4c8afefCopy full SHA for 4c8afef
backend/api/core/mcps.py
@@ -8,7 +8,9 @@
8
9
10
@asynccontextmanager
11
-async def mcp_sse_client() -> AsyncGenerator[ClientSession]:
+async def mcp_sse_client(
12
+ mcp_host: str = "mcp",
13
+) -> AsyncGenerator[ClientSession]:
14
"""
15
Creates and initializes an MCP client session over SSE.
16
@@ -18,7 +20,9 @@ async def mcp_sse_client() -> AsyncGenerator[ClientSession]:
18
20
Yields:
19
21
ClientSession: An initialized MCP client session.
22
- async with sse_client(f"http://mcp:{settings.mcp_server_port}/sse") as (
23
+ async with sse_client(
24
+ f"http://{mcp_host}:{settings.mcp_server_port}/sse"
25
+ ) as (
26
read_stream,
27
write_stream,
28
):
0 commit comments