Skip to content

Auth for MCP - Starlette middleware vs. OAuthAuthorizationServerProvider #702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Westerby opened this issue May 13, 2025 · 0 comments
Open

Comments

@Westerby
Copy link

There has been some discussion in this repo and in the TypeScript MCP repo regarding authentication with MCP servers.

The Python SDK includes an OAuthAuthorizationServerProvider example for implementing authentication.

What was the motivation behind introducing this? It seems that authentication could be implemented more directly—and in my opinion, more simply—using Starlette middleware. Additionally, OAuthAuthorizationServerProvider appears to assume user input as part of the flow, whereas MCP servers will often act as backend resource servers without direct user interaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant