Skip to content

Conversation

ruhulio
Copy link

@ruhulio ruhulio commented Sep 4, 2025

Description

Adds support for passing the audience to the upstream provider if it was specified on the token verifier. This is necessary when using a provider like Auth0 that requires audience scoping for the tokens.

This was manually tested via MCP Inspector against an Auth0 app for the positive case, and a GitHub app for the negative case.

This can be considered a smaller peer change to the recent PKCE forwarding changes (#1733).

Contributors Checklist

  • My change is related to issue #(issue number)
  • I have followed the repository's development workflow
  • I have tested my changes manually and by adding relevant tests
  • I have performed all required documentation updates

Review Checklist

  • I have self-reviewed my changes
  • My Pull Request is ready for review

@marvin-context-protocol marvin-context-protocol bot added enhancement Improvement to existing functionality. For issues and smaller PR improvements. server Related to FastMCP server implementation or server-side functionality. auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. labels Sep 4, 2025
@dmikusa
Copy link
Contributor

dmikusa commented Sep 4, 2025

I hit this issue with Auth0 too, so +1 for this. It'd be nice if it just worked automatically.

FYI, if anyone else hits this. I worked around it by setting .../authorize?audience=<my-audience> as my upstream_authorization_endpoint value. It was smart enough to retain that audience query param.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. enhancement Improvement to existing functionality. For issues and smaller PR improvements. server Related to FastMCP server implementation or server-side functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants