We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bcb07c2 commit 655089fCopy full SHA for 655089f
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
@@ -112,7 +112,7 @@ def __init__(
112
website_url: str | None = None,
113
icons: list[Icon] | None = None,
114
version: str | None = None,
115
- auth_server_provider: (OAuthAuthorizationServerProvider[Any, Any, Any] | None) = None,
+ auth_server_provider: OAuthAuthorizationServerProvider[Any, Any, Any] | None = None,
116
token_verifier: TokenVerifier | None = None,
117
*,
118
tools: list[Tool] | None = None,
@@ -121,7 +121,7 @@ def __init__(
121
warn_on_duplicate_resources: bool = True,
122
warn_on_duplicate_tools: bool = True,
123
warn_on_duplicate_prompts: bool = True,
124
- lifespan: (Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None) = None,
+ lifespan: Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None = None,
125
auth: AuthSettings | None = None,
126
):
127
self.settings = Settings(
0 commit comments