diff --git a/api/core/mcp/auth/auth_provider.py b/api/core/mcp/auth/auth_provider.py index 09d8924b79..cd55dbf64f 100644 --- a/api/core/mcp/auth/auth_provider.py +++ b/api/core/mcp/auth/auth_provider.py @@ -61,7 +61,7 @@ class OAuthClientProvider: return OAuthTokens( access_token=credentials.get("access_token", ""), token_type=credentials.get("token_type", "Bearer"), - expires_in=int(credentials.get("expires_in", "3600")), + expires_in=int(credentials.get("expires_in", "3600") or 3600), refresh_token=credentials.get("refresh_token", ""), ) diff --git a/api/core/mcp/types.py b/api/core/mcp/types.py index 1c1726c799..99d985a781 100644 --- a/api/core/mcp/types.py +++ b/api/core/mcp/types.py @@ -1192,7 +1192,7 @@ class OAuthClientInformation(BaseModel): class OAuthClientInformationFull(OAuthClientInformation): - client_name: str + client_name: str | None = None redirect_uris: list[str] scope: Optional[str] = None grant_types: Optional[list[str]] = None