inspector icon indicating copy to clipboard operation
inspector copied to clipboard

Allow for string values in token response

Open adam-kuhn opened this issue 2 months ago • 1 comments

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

  1. Go to authentication settings
  2. Click through the step by step flow
  3. 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

adam-kuhn avatar Nov 10 '25 12:11 adam-kuhn

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

adam-kuhn avatar Nov 14 '25 08:11 adam-kuhn