[GH-ISSUE #18913] issue: MCP ignores HTTP_PROXY #18711

Closed
opened 2026-04-20 00:55:11 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @jarrod-mg on GitHub (Nov 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/18913

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.34

Ollama Version (if applicable)

n/a

Operating System

open-webui container running inside AWS ECS Fargate

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

To be able to verify the connection (and register as a client) of an MCP server, when open-webui is running behind a proxy.

Actual Behavior

The connection never verifies. Register client never succeeds. I see a network timeout.

Steps to Reproduce

  1. Set up a network environment for open-webui, where there is no internet access, but there is a proxy with access to the internet
  2. Run the docker container, with HTTP_PROXY=
  3. -> Admin Panel -> Settings -> External Tools
  4. Set Type to MCP Streamable HTTP
  5. Set the URL to an external MCP server, such as https://mcp.atlassian.com/v1/sse
  6. Set the Auth to OAut 2.1
  7. Click Verify Connection (or Register Client)

Logs & Screenshots

2025-11-04 02:55:55.732 | DEBUG | open_webui.routers.configs:verify_tool_servers_config:211 - Trying to fetch OAuth 2.1 discovery document from https://mcp.atlassian.com/.well-known/oauth-authorization-server
2025-11-04 02:57:25.987 | DEBUG | open_webui.routers.configs:verify_tool_servers_config:303 - Failed to connect to the tool server: Connection timeout to host https://mcp.atlassian.com/.well-known/oauth-authorization-server

Additional Information

I believe the issue is backend/open_webui/utils/oauth.py:254 in get_oauth_client_info_with_dynamic_client_registration, where there is:

async with aiohttp.ClientSession() as session:

I think this should be:

async with aiohttp.ClientSession(trust_env=True) as session:

Which is a pattern used elsewhere.

Thanks.

Originally created by @jarrod-mg on GitHub (Nov 4, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/18913 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.34 ### Ollama Version (if applicable) n/a ### Operating System open-webui container running inside AWS ECS Fargate ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior To be able to verify the connection (and register as a client) of an MCP server, when open-webui is running behind a proxy. ### Actual Behavior The connection never verifies. Register client never succeeds. I see a network timeout. ### Steps to Reproduce 1. Set up a network environment for open-webui, where there is no internet access, but there is a proxy with access to the internet 2. Run the docker container, with HTTP_PROXY=<your-proxy> 3. <Name> -> Admin Panel -> Settings -> External Tools 4. + 5. Set Type to MCP Streamable HTTP 6. Set the URL to an external MCP server, such as https://mcp.atlassian.com/v1/sse 7. Set the Auth to OAut 2.1 8. Click Verify Connection (or Register Client) ### Logs & Screenshots 2025-11-04 02:55:55.732 | DEBUG | open_webui.routers.configs:verify_tool_servers_config:211 - Trying to fetch OAuth 2.1 discovery document from https://mcp.atlassian.com/.well-known/oauth-authorization-server 2025-11-04 02:57:25.987 | DEBUG | open_webui.routers.configs:verify_tool_servers_config:303 - Failed to connect to the tool server: Connection timeout to host https://mcp.atlassian.com/.well-known/oauth-authorization-server ### Additional Information I believe the issue is backend/open_webui/utils/oauth.py:254 in get_oauth_client_info_with_dynamic_client_registration, where there is: async with aiohttp.ClientSession() as session: I think this should be: async with aiohttp.ClientSession(trust_env=True) as session: Which is a pattern used elsewhere. Thanks.
GiteaMirror added the bug label 2026-04-20 00:55:11 -05:00
Author
Owner

@jarrod-mg commented on GitHub (Nov 4, 2025):

I think line 290 will also need the same change.

<!-- gh-comment-id:3483614850 --> @jarrod-mg commented on GitHub (Nov 4, 2025): I think line 290 will also need the same change.
Author
Owner

@tjbck commented on GitHub (Nov 4, 2025):

Addressed in dev!

<!-- gh-comment-id:3487189158 --> @tjbck commented on GitHub (Nov 4, 2025): Addressed in dev!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#18711