feat: Support dynamic per-request headers in MCPToolset

Add a header_provider param which is a callable[ReadonlyContext, Dict[str, Any]] for users to build headers in MCPToolset
fix: https://github.com/google/adk-python/issues/3156
PiperOrigin-RevId: 820412372
This commit is contained in:
Kathy Wu
2025-10-16 15:12:43 -07:00
committed by Copybara-Service
parent 2a8fdd94e1
commit 6dcbb5aca6
8 changed files with 243 additions and 5 deletions
@@ -0,0 +1,8 @@
This agent connects to a local MCP server via Streamable HTTP and provides
custom per-request headers to the MCP server.
To run this agent, start the local MCP server first by running:
```bash
uv run header_server.py
```