Skip to content

feat(tools): Add GoogleManagedMcpToolset for simplified Google MCP auth#5040

Open
yugborana wants to merge 1 commit intogoogle:mainfrom
yugborana:feat/google-managed-mcp-toolset
Open

feat(tools): Add GoogleManagedMcpToolset for simplified Google MCP auth#5040
yugborana wants to merge 1 commit intogoogle:mainfrom
yugborana:feat/google-managed-mcp-toolset

Conversation

@yugborana
Copy link
Copy Markdown

Introduces GoogleManagedMcpToolset, a McpToolset subclass that automates ADC-based authentication and endpoint URL resolution for Google Managed MCP servers (e.g., BigQuery).

  • Auto-refreshes OAuth2 tokens via google.auth on every request
  • Maps product names to endpoint URLs (initially supports 'bigquery')
  • Supports custom scopes and project ID overrides
  • Updates bigquery_mcp sample to use the new simplified API
  • Adds 16 unit tests covering init, auth, and parameter forwarding

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

2. Or, if no issue exists, describe the change:

If applicable, please follow the issue templates to provide as much detail as
possible.

Problem:
A clear and concise description of what the problem is.

Solution:
A clear and concise description of what you want to happen and why you choose
this solution.

Testing Plan

Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Please include a summary of passed pytest results.

Manual End-to-End (E2E) Tests:

Please provide instructions on how to manually test your changes, including any
necessary setup or configuration. Please provide logs or screenshots to help
reviewers better understand the fix.

Checklist

  • [yes ] I have read the CONTRIBUTING.md document.
  • [ yes] I have performed a self-review of my own code.
  • [yes ] I have commented my code, particularly in hard-to-understand areas.
  • [yes ] I have added tests that prove my fix is effective or that my feature works.
  • [yes ] New and existing unit tests pass locally with my changes.
  • [yes ] I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

Add any other context or screenshots about the feature request here.

Introduces GoogleManagedMcpToolset, a McpToolset subclass that automates
ADC-based authentication and endpoint URL resolution for Google Managed
MCP servers (e.g., BigQuery).

- Auto-refreshes OAuth2 tokens via google.auth on every request
- Maps product names to endpoint URLs (initially supports 'bigquery')
- Supports custom scopes and project ID overrides
- Updates bigquery_mcp sample to use the new simplified API
- Adds 16 unit tests covering init, auth, and parameter forwarding

Closes google#3897
@adk-bot adk-bot added the mcp [Component] Issues about MCP support label Mar 28, 2026
@yugborana
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp [Component] Issues about MCP support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a subclass of MCPToolset to simplify connections to Google Managed MCP servers

2 participants