We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d463bb commit ae7793eCopy full SHA for ae7793e
src/mcp/server/auth/handlers/register.py
@@ -32,10 +32,8 @@ class RegistrationHandler:
32
async def handle(self, request: Request) -> Response:
33
# Implements dynamic client registration as defined in https://datatracker.ietf.org/doc/html/rfc7591#section-3.1
34
try:
35
- # Parse request body as JSON
36
- # TODO(Marcelo): This is unnecessary. We should use `request.body()`.
37
- body = await request.json()
38
- client_metadata = OAuthClientMetadata.model_validate(body)
+ body = await request.body()
+ client_metadata = OAuthClientMetadata.model_validate_json(body)
39
40
# Scope validation is handled below
41
except ValidationError as validation_error:
src/mcp/server/fastmcp/server.py
@@ -114,7 +114,7 @@ def __init__(
114
website_url: str | None = None,
115
icons: list[Icon] | None = None,
116
version: str | None = None,
117
- auth_server_provider: (OAuthAuthorizationServerProvider[Any, Any, Any] | None) = None,
+ auth_server_provider: OAuthAuthorizationServerProvider[Any, Any, Any] | None = None,
118
token_verifier: TokenVerifier | None = None,
119
*,
120
tools: list[Tool] | None = None,
@@ -123,7 +123,7 @@ def __init__(
123
warn_on_duplicate_resources: bool = True,
124
warn_on_duplicate_tools: bool = True,
125
warn_on_duplicate_prompts: bool = True,
126
- lifespan: (Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None) = None,
+ lifespan: Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None = None,
127
auth: AuthSettings | None = None,
128
):
129
self.settings = Settings(
0 commit comments