Skip to content

Commit 71fe93c

Browse files
committed
Adding a ssl_verify flag to the sse_client asynccontextmanager function in the sse client library.
1 parent 70115b9 commit 71fe93c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mcp/client/sse.py

Lines changed: 2 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+
ssl_verify: bool = True,
2728
):
2829
"""
2930
Client transport for SSE.
@@ -43,7 +44,7 @@ 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(headers=headers, verify=ssl_verify) as client:
4748
async with aconnect_sse(
4849
client,
4950
"GET",

0 commit comments

Comments
 (0)