Skip to content

Commit f368f8d

Browse files
committed
MCP enable over UNIX socket
Signed-off-by: John <[email protected]>
1 parent c2ca8e0 commit f368f8d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mcp/client/sse.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ async def sse_client(
2424
headers: dict[str, Any] | None = None,
2525
timeout: float = 5,
2626
sse_read_timeout: float = 60 * 5,
27+
transport: httpx.AsyncHTTPTransport | None = None,
2728
):
2829
"""
2930
Client transport for SSE.
@@ -43,7 +44,10 @@ async def sse_client(
4344
async with anyio.create_task_group() as tg:
4445
try:
4546
logger.info(f"Connecting to SSE endpoint: {remove_request_params(url)}")
46-
async with httpx.AsyncClient(headers=headers) as client:
47+
async with httpx.AsyncClient(
48+
headers=headers,
49+
transport=transport,
50+
) as client:
4751
async with aconnect_sse(
4852
client,
4953
"GET",

0 commit comments

Comments
 (0)