docs: add guide for MCP tool authentication and deployment #523
+546
−238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses a significant documentation gap regarding the use of external, authenticated MCP servers with ADK.
The Problem
Currently, there is no documentation explaining how to pass authentication credentials (e.g., Bearer tokens) to a remote MCP server. While the underlying ADK framework supports this via the standard
auth_scheme
andauth_credential
parameters onMCPToolset
, this is not documented anywhere. This leaves users unable to integrate with secured, real-world MCP services.Additionally, there is no guidance on how to deploy agents that use MCP tools to cloud environments like Cloud Run or Agent Engine, which presents challenges with process management and service-to-service authentication.
The Solution
This PR introduces a comprehensive solution:
docs/tools/mcp-authentication.md
, is created to serve as the single source of truth for this topic.agent_with_auth.py
andmock_mcp_server.py
), to demonstrate the pattern clearly.mcp-tools.md
page is updated to link to the new guide and modernize its connection parameter examples.authentication.md
page is updated to listMCPToolset
as a supported tool for the ADK auth framework.cloud-run.md
andagent-engine.md
guides are updated with new sections on best practices for deploying agents with MCP dependencies.This change provides a clear, documented path for users to securely integrate ADK with external MCP tools and confidently deploy their agents to production environments.
Addresses #466