Add example on external MCPTool usage and proper auth management
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 1.3k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 34
Description
When an agent need to initialize a connection to a custom MCP tool, it is required to manipulate the MCP tool calls on agent side for adding/checking headers (i.e. auth info could come from the application wrapping the agent). I think it would be nice to have a working ADK sample with the best practices for working with external MCP server (i.e. implemented as streamable http protocol via fast MCP) with proper handling of auth tokens highlithing the proper callbacks functions and context variables to use. This example should clearly illustrate the use of the aforementioned ADK callbacks/extension points and context variables.
The current documentation does not fully clarify the lifecycle of a MCPTool in terms of initialization, agent internal MCPTool instance retrivial and how to properly use callback to customize the interactions between agent and tool.
Contributor guide
Assessment
This issue has not been assessed yet.