Allow for string values in token response
Inspector Version
- v0.17.2
Describe the bug When using Azure/Entra auth with the guided authentication flow. The "Token Request" step fails after successfully retrieving the token, because "expires_in" is coming back as a string instead of a number
[ { "code": "invalid_type", "expected": "number", "received": "string", "path": [ "expires_in" ], "message": "Expected number, received string" } ]
To Reproduce Steps to reproduce the behavior: Have an MCP server configured to work with Entra login
- Go to authentication settings
- Click through the step by step flow
- See error, at the "Token Request" step
Expected behavior
Since the token response is outside of our control, the mcp inspector should allow for string values in addition to numbers
Example request token response:
{
"token_type": "Bearer",
"scope": "email openid profile User.Read",
"expires_in": "5287",
"ext_expires_in": "5287",
"expires_on": "1762781958",
"not_before": "1762776370",
"resource": "<resource>",
"access_token": "<access_token>",
"refresh_token": "<refresh_token>",
"id_token": "<id_token>"
}
Environment (please complete the following information):
- OS: iOS
- Browser chrome
After some digging I discovered the issue to be in the TS SDK. https://github.com/modelcontextprotocol/typescript-sdk/pull/1111
It might be that this issue is in other SDK's as well but I have not had the time to look into this