Skip to content
Discussion options

You must be logged in to vote

Hi @madtank! I'm Dosu and I’m helping the inspector team.

In MCP Jam, the refreshOAuthTokens() function is not triggered automatically by a 401 response. Instead, it must be called explicitly—either by user action or as part of connection setup logic. The codebase does not intercept 401s to trigger a refresh, and clients like Claude Code do not appear to initiate a refresh flow when they receive a 401; they just keep sending the expired token, resulting in repeated 401 errors (source, source).

If a client does not implement automatic token refresh, there is nothing you can do server-side to keep sessions alive except to issue longer-lived access tokens or require the client to re-authent…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by madtank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant