feat: adds FastMCP On-Behalf-Of token exchange Python example#81
Merged
feat: adds FastMCP On-Behalf-Of token exchange Python example#81
Conversation
priley86
commented
Apr 27, 2026
Comment on lines
+40
to
+41
| # Add discovery metadata route | ||
| *auth0_mcp.auth_metadata_router().routes, |
Contributor
Author
There was a problem hiding this comment.
changed from:
# Add discovery metadata route
Mount("/", app=auth0_mcp.auth_metadata_router()),
# Add discovery metadata route
*auth0_mcp.auth_metadata_router().routes,
In Starlette, a Mount at / is a catch-all that intercepts everything. By unpacking the router into specific Route objects (.well-known/oauth-protected-resource, .well-known/oauth-authorization-server, etc.), these are evaluated first based on specificity. Remaining requests fall through to the MCP app Mount. This was previously causing issues when using the "Connect" button in MCP Inspector after successfully authenticating.
priley86
commented
Apr 27, 2026
| python = "^3.10" | ||
| python-dotenv = "^1.1.1" | ||
| mcp = "^1.27.0" | ||
| auth0-api-python = {path = "./auth0-api-python-obo", develop = true} |
Contributor
Author
There was a problem hiding this comment.
temporarily included until auth0-api-python is released.
Contributor
Author
There was a problem hiding this comment.
updated reference to 1.0.0b9 release: 06ac20b
This was referenced Apr 27, 2026
agupta-ghub
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🔑 FastMCP On-Behalf-Of Token Exchange Python MCP Quickstart updates
Builds on the SDK changes released in auth0-api-python which add On-Behalf-Of Token Exchange support in:
https://pypi.org/project/auth0-api-python/1.0.0b9/
With our FastMCP quickstarts (based on the existing FastMCP JS Python CTE quickstart).
Changes applied:

📘 Documentation
See the following docs-v2 updates for more details about how to use OBO:
auth0/docs-v2#1053
auth0/docs-v2#1074