GitHub Repo
Open WebUI Reports MCP Authorization Recovery Issue: Still Shows Connected After 401
A community report on November 19 said that after an MCP OAuth 2.1 connection is rejected by a server, Open WebUI may not refresh credentials immediately, causing tool calls to keep failing. The report covers v0.13.4 and the development build from that day. A local fix was tested, but an official patch has not yet been confirmed.
On November 19, Open WebUI received a report of an MCP authorization issue: after a tool server using OAuth 2.1 returns 401 invalid_token, the interface may still show the connection as active even though tool calls continue to fail. The reporter said the issue could be reproduced in both Docker v0.13.4 and that day's development build. At the time of review, the issue remained open, with no linked fix branch or pull request listed. Issue report
This case highlights why authorization status in agent systems cannot be determined solely by local token expiration times. The official MCP SDK documentation maps invalid or expired tokens to HTTP 401 and uses a WWW-Authenticate challenge to provide authorization discovery information. A server may reject a credential even if its locally stored expiration time has not been reached, so clients need to handle these responses. MCP authorization documentation
According to the report's analysis, Open WebUI proactively refreshes a token only when it is less than five minutes from expiration. If the upstream single sign-on session ends earlier, the MCP gateway may reject a token that has not yet expired, while the client neither refreshes it immediately nor clears the signed-in state. In a reproduction setup with a one-hour token lifetime, the failure state could last about 55 minutes. The reporter tested a local change that forces a refresh after a 401 and retries once; if the refresh is rejected, it deletes the session so the interface can show the sign-in option again. This remains a result verified by the reporter. Reproduction and proposed fix
The official documentation also notes that the OAuth discovery check on the settings page only confirms that authorization server metadata can be read; it does not list or run tools. Engineering teams can therefore monitor “discovery succeeded,” “signed in,” and “tools available” as separate states, and add end-to-end tests after revoking a sign-in session in a test environment. Follow-up should track whether an official patch covers both OAuth 2.1 modes and clearly guides users to reauthorize when refresh fails. For now, this single report should not be taken to mean that all deployments are affected. Open WebUI MCP documentation