Skip to content

Allow for string values in token response #912

@adam-kuhn

Description

@adam-kuhn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues and PRs related to authorizationbugSomething isn't workingp2-mediumMedium priority - normal timeline

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions