diff --git a/tools/mcp_tool.py b/tools/mcp_tool.py index aecc0cc23..2de479338 100644 --- a/tools/mcp_tool.py +++ b/tools/mcp_tool.py @@ -994,6 +994,7 @@ class MCPServerTask: url = config["url"] headers = dict(config.get("headers") or {}) connect_timeout = config.get("connect_timeout", _DEFAULT_CONNECT_TIMEOUT) + ssl_verify = config.get("ssl_verify", True) # OAuth 2.1 PKCE: route through the central MCPOAuthManager so the # same provider instance is reused across reconnects, pre-flow @@ -1024,6 +1025,7 @@ class MCPServerTask: client_kwargs: dict = { "follow_redirects": True, "timeout": httpx.Timeout(float(connect_timeout), read=300.0), + "verify": ssl_verify, } if headers: client_kwargs["headers"] = headers @@ -1052,6 +1054,7 @@ class MCPServerTask: _http_kwargs: dict = { "headers": headers, "timeout": float(connect_timeout), + "verify": ssl_verify, } if _oauth_auth is not None: _http_kwargs["auth"] = _oauth_auth