Files
adk-python/tests
Michael Jones bfed19cd78 feat: expose mcps streamable http custom httpx factory parameter
Merge https://github.com/google/adk-python/pull/3634

Reopen of https://github.com/google/adk-python/pull/2997 after the accepted changes in that PR were reverted by https://github.com/google/adk-python/commit/e15e19da05ee1b763228467e83f6f73e0eced4b5

---

This PR addresses https://github.com/google/adk-python/issues/3005 and https://github.com/google/adk-python/issues/2963 to allow control over the ssl cert used when connecting to an mcp server by exposing the `httpx_client_factory` parameter exposed when creating a `MCPSessionManager` in adk. Overlaps with https://github.com/google/adk-python/pull/2966 but I don't believe that that PR's implementation will work. `streamablehttp_client` needs a client factory, not a client.

## testing plan

Adds test checking that `streamablehttp_client` uses the custom httpx factory. Could also test that a factory which obeys the `McpHttpClientFactory` protocol produces valid behavior when the session is opened?

## related issues

#2227 and #2881 both request _slightly different_ options to control the ssl certs used internally by adk. I think exposing a httpx factory is a good pattern which could be followed for those issues too.

Co-authored-by: Kathy Wu <wukathy@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3634 from mikeedjones:feat/expose-mcps-streamable-http-custom-httpx-factory-parameter 1017a9875c697b28b96a7a8d1311494ef89af65a
PiperOrigin-RevId: 852443631
2026-01-05 13:57:26 -08:00
..
2025-11-06 11:21:59 -08:00