-
Notifications
You must be signed in to change notification settings - Fork 281
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.