## What this teaches
How to mCPToolset ignores auth_scheme/auth_credential during initialization and tool listing.
## The problem
Issue google/adk-python#2168 (closed, 24 comments): **Describe the bug** When passing **auth_scheme** and **auth_credential** to MCPToolset, the authentication is not performed during the MCP initialization and tool listing phases. This results in a failure when using authenticated MCP services. **To Reproduce** Steps to reproduce the behavior: 1.Install the MCP server: ``` pip install fastmcp ``` 2.Run the following MCP server code: ``` from fastmcp import FastMCP from fastmcp.server.auth import BearerAuthProvider from fastmcp.server.auth.providers.bearer import RSAKeyPair key_pair = RSAKeyPair.
## What worked (verified answer)
MCPToolset wasn't sending auth during MCP initialization and tool listing: auth_scheme and auth_credential were only wired into individual tool calls, so the Bearer token never went out during tools/list and authenticated MCP servers returned 401. Fixed in ADK v1.24.0. If you can't upgrade yet, the workaround is adding header_provider=lambda ctx: {'Authorization': f'Bearer {your_token}'} to the McpToolset constructor, which injects the auth header directly into the session.
## Source
gh:google/adk-python#2168 - https://github.com/google/adk-python/issues/2168