mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-12 14:45:38 -06:00
[GH-ISSUE #24216] issue: MCP OAuth 2.1 (Static) fails with Google Gmail MCP server – discovery document not found when OAuth server differs from MCP server #107224
Reference in New Issue
Block a user
Originally created by @samuixx on GitHub (Apr 29, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24216
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.9.2
Ollama Version (if applicable)
0.22.0
Operating System
Debian Trixie
Browser (if applicable)
Chrome
Confirmation
README.md.Expected Behavior
Open WebUI should support specifying a separate OAuth authorization server URL (e.g., https://accounts.google.com) independently from the MCP server URL. This is required for providers like Google where the MCP endpoint and OAuth endpoint are on different hosts.
Google's discovery document is available at: https://accounts.google.com/.well-known/openid-configuration
Suggested solution
Add an optional field (e.g., "OAuth Server URL" or "Authorization Server URL") in the External Tools OAuth 2.1 (Static) configuration that allows specifying the OAuth discovery endpoint separately from the MCP server URL. When not set, fall back to the current behavior of using the MCP server host.
This pattern is common with Google Workspace MCP servers (Gmail, Calendar, Drive, People API) which all use accounts.google.com for OAuth but have separate MCP endpoints.
Actual Behavior
When connecting to Google's official Gmail MCP server (https://gmailmcp.googleapis.com/mcp/v1) using OAuth 2.1 (Static), Open WebUI fails to complete the OAuth flow because it searches for the OAuth discovery document on the MCP server host itself.
Google separates the MCP server (gmailmcp.googleapis.com) from the OAuth authorization server (accounts.google.com). Open WebUI only has a single URL field and assumes both are the same host.
Steps to Reproduce
Logs & Screenshots
Browser Log:
Failed to fetch OAuth 2.1 discovery document from [
'https://gmailmcp.googleapis.com/.well-known/oauth-authorization-server/mcp/v1',
'https://gmailmcp.googleapis.com/.well-known/openid-configuration/mcp/v1',
'https://gmailmcp.googleapis.com/mcp/v1/.well-known/openid-configuration',
'https://gmailmcp.googleapis.com/.well-known/oauth-authorization-server',
'https://gmailmcp.googleapis.com/.well-known/openid-configuration'
]
Additional Information
No response
@tjbck commented on GitHub (May 8, 2026):
Addressed in dev.