mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[GH-ISSUE #20291] issue: MCP Atlassian OAuth token refresh fails with "Constructor parameter should be str" in v0.6.43 #19144
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rolandscho on GitHub (Dec 31, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20291
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.43
Ollama Version (if applicable)
0.13.1
Operating System
Ubuntu 22.04 (Docker Swarm cluster)
Browser (if applicable)
Chrome 143.0.7499.170
Confirmation
README.md.Expected Behavior
When the Atlassian MCP OAuth access token expires, Open WebUI should automatically refresh it using the stored refresh_token, maintaining a valid session without user intervention.
Actual Behavior
After approximately 1 day of inactivity (or when the OAuth token expires), the token refresh fails with the error Constructor parameter should be str. The OAuth session is then deleted, requiring the user to manually re-authenticate via Settings → External Tools → Atlassian.
This issue is similar to #17829 which was fixed in v0.6.33, but that fix appears to only address OIDC providers (Google, Microsoft, OIDC), not MCP OAuth clients like Atlassian.
Steps to Reproduce
Logs & Screenshots
Error logs when token refresh fails:
Subsequent requests show no OAuth session:
Note: The day before, the MCP connection was working fine:
MCP Configuration Screenshot:

Initial authentication works fine. The issue only occurs when the token needs to be refreshed after expiration.
Additional Information
Related Issues:
#17829 - Fixed Constructor parameter should be str for OIDC providers in v0.6.33, but MCP clients still affected
#19820 - Discussion about MCP OAuth tokens not being proactively refreshed
#19811 - PR that attempted to fix proactive token refresh (closed by maintainer)
Root Cause Hypothesis:
The fix in v0.6.33 (commit for #17829) properly registered and stored OAuth clients for Google, Microsoft, and OIDC providers. However, MCP OAuth clients (like mcp:atlassian_mcp) appear to follow a different code path in _perform_token_refresh() where the OAuth client registration/lookup fails, causing the Constructor parameter should be str exception.
The error suggests that somewhere in the token refresh flow, a parameter that should be a string is receiving a different type (possibly None or an object).
Workaround:
Users must manually re-authenticate via Settings → External Tools → Atlassian before using MCP tools after the token expires.
@owui-terminator[bot] commented on GitHub (Dec 31, 2025):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#19823 Issue: Auth 2.1 Authorization/Token retrival is broken in v0.6.41
by mllab-nl • Dec 08, 2025 •
bug#19116 issue: MCP OAuth 2.1 client registration fails when policy_uri, client_uri, logo_uri or tos_uri are not set
by xqqp • Nov 11, 2025 •
bug#18010 issue: MCP OAuth 2.1 flow doesn't match standard (missing code_challenge and resource_url)
by hsuyuming • Oct 02, 2025 •
bug#19993 issue: Microsoft SSO signup doesn't work after 0.6.41 update
by avatsaev • Dec 16, 2025 •
bug#19148 issue: Verify OAuth mcp server sends incorrect authorization header
by Oleg52 • Nov 12, 2025 •
bugShow 5 more related issues
#19813 issue: Failed to connect to MCP server, while the connection test works fine
by spi-dlp • Dec 08, 2025 •
bug#17655 issue: Bug when refreshing tokens with oauth
by Clement44Ges • Sep 22, 2025 •
bug#19415 issue: v0.6.37 breaks Okta OAuth: "Cannot supply multiple client credentials" error
by WonwooKang • Nov 24, 2025 •
bug#17829 issue: Exception during token refresh for provider oidc: Constructor parameter should be str
by davidshen84 • Sep 27, 2025 •
bug#18981 issue: 0.6.35 error using tools through mcpo
by GlisseManTV • Nov 06, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@tjbck commented on GitHub (Dec 31, 2025):
Should be addressed in dev.