Skip to content

Add TokenCache support to GoogleTokenVerifier and GoogleProvider #5365

Closed

Description

@jerive

Enhancement

GoogleTokenVerifier and GoogleProvider currently query Google OAuth endpoints (https://oauth2.googleapis.com/tokeninfo and https://openidconnect.googleapis.com/v1/userinfo) on every single incoming MCP request without any caching.

In contrast, GitHubProvider and IntrospectionProvider support token caching via TokenCache with cache_ttl_seconds and max_cache_size.

Under high-frequency tool calling (such as AI agents executing sequences of MCP tool calls), querying Google's endpoints synchronously on every request causes high latency and transient failures / rate limits (401 Unauthorized / connection timeouts).

Adding TokenCache support to GoogleTokenVerifier and exposing cache_ttl_seconds and max_cache_size on GoogleProvider (matching the pattern in GitHubProvider and IntrospectionProvider) allows verified Google access tokens to be cached in-memory up to their expiration (expires_at / cache_ttl_seconds).

Activity

  1. added
    auth
    enhancement
    on Sep 30, 2026
  2. added a commit that references this issue on Oct 5, 2026
    285ec7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions