Open
Description
Describe the bug
While debugging the local fastmcp_api using modelcontextprotocol/inspector, it was observed that:
When building the built-in authentication endpoint, the scope is first retrieved from the query parameters of the request.
If no scope is provided in the query, a default_scope is used instead.
However, this default_scope
is not the AuthConfig.default_scope
.
To Reproduce
- Configure an
AuthConfig
with adefault_scope
:auth_config = AuthConfig(default_scope="openid profile email")
- Start the local
fastmcp_api
and debug usingmodelcontextprotocol/inspector
. - Send a request without the
scope
parameter:GET /auth/authorize?client_id=xxx&response_type=code&redirect_uri=yyy
- Observe that the returned result does not use the
default_scope
fromAuthConfig
.
System Info
- OS: Ubuntu 24.04.x
- Python: 3.12.x
- FastMCP API version: local development (latest
main
branch) - Debugging tool: modelcontextprotocol/inspector