Open
Description
Describe the bug
Hi guys. I am using self-hosted version of Ory Hydra as a OAuth2 server for my MCP server application. While debugging my application using MCP Inspector, I am facing the following issue:
Failed to start OAuth flow: [ { "code": "invalid_type", "expected": "array", "received": "null", "path": [ "contacts" ], "message": "Expected array, received null" } ]
To Reproduce
Start Ory Hydra: https://www.ory.sh/docs/hydra/self-hosted/quickstart
curl -X POST 'http://localhost:4445/admin/clients' \
--header 'Content-Type: application/json' \
--data-raw '{
"redirect_uris": [
"http://127.0.0.1:6274/oauth/callback/debug"
],
"token_endpoint_auth_method": "none",
"grant_types": [
"authorization_code",
"refresh_token"
],
"response_types": [
"code"
],
"client_name": "MCP Inspector",
"client_uri": "https://github.com/modelcontextprotocol/inspector"
}'
Response includes contacts: null
Additional context
This is the following code:
- Metadata API call: https://github.com/modelcontextprotocol/inspector/blob/ec24f7bbbf1535084c5f03157c80eceb4e79278d/client/src/lib/auth.ts#L22-L31
- MCP Typescript SDK schema:
typescript-sdk/src/shared/auth.ts
Line 94 in 0c4b308
Expected behavior
I am not sure if this is an error in Ory Hydra side of the system or is it an error in Schema defined in MCP Typescript SDK where nullable
contacts should be supported.