[GH-ISSUE #12498] issue: Cannot connect OpenAPI proxy with MCP #16623

Closed
opened 2026-04-19 22:31:03 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @qdrddr on GitHub (Apr 5, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12498

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone, docker compose

Open WebUI Version

v0.6.1

Ollama Version (if applicable)

No response

Operating System

macOS 15

Browser (if applicable)

Edge

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 listed steps to reproduce the bug in detail.

Expected Behavior

Be able to utilize tools proxied via OpenAPI for my MCP Server:

Actual Behavior

open-webui cannot connet to the openAPI proxy to use the tools. getting the message in UI:
Failed to connect to http://mcp:8000/openapi.json OpenAPI tool server

Steps to Reproduce

My Docker-compose

services:

  open-webui:
    #build:
    #  context: .
    #  args:
    #    OLLAMA_BASE_URL: '/ollama'
    #  dockerfile: Dockerfile
    image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
    container_name: open-webui
    volumes:
      - open-webui:/app/backend/data
    ports:
      - ${OPEN_WEBUI_PORT-3053}:8080
    environment:
      - 'OLLAMA_BASE_URL=http://ollama:11434'
      - 'WEBUI_SECRET_KEY='
    extra_hosts:
      - host.docker.internal:host-gateway
    restart: unless-stopped

  mcp:
    image: mcp-proxy-server
    container_name: mcp
    ports:
      - ${MCP_PORT-3054}:8000

volumes:
  ollama: {}
  open-webui: {}

My Dockerfile:

FROM python:3.11-slim
WORKDIR /app
RUN pip install mcpo uv
# Replace with your MCP server command; example: uvx mcp-server-time
CMD ["uvx", "mcpo", "--host", "0.0.0.0", "--port", "8000", "--", "uvx", "mcp-server-time", "--local-timezone=America/New_York"]
  1. docker-compose up
  2. go to Settings > Tools > Manage Tool Servers add http://mcp:8000, press Save

Logs & Screenshots

Image
Image

When I open the MCP container, I have these logs and I can open /openapi.json file and I can see the MCP tools for time MCP Server listed:

mcp         | Starting MCP OpenAPI Proxy on 0.0.0.0:8000 with command: uvx mcp-server-time --local-timezone=America/New_York
mcp         | INFO:     192.168.65.1:56027 - "GET /docs HTTP/1.1" 200 OK
mcp         | INFO:     192.168.65.1:56027 - "GET /openapi.json HTTP/1.1" 200 OK
mcp         | INFO:     192.168.65.1:56027 - "GET /openapi.json HTTP/1.1" 200 OK

The open-webui container does not produce any error messages in the terminal.

Additional Information

When I open terminal in the open-webui container, I can using curl successfully access http://mcp:8000/openapi.json with: curl http://mcp:8000/openapi.json

Image

Originally created by @qdrddr on GitHub (Apr 5, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12498 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone, docker compose ### Open WebUI Version v0.6.1 ### Ollama Version (if applicable) _No response_ ### Operating System macOS 15 ### Browser (if applicable) Edge ### 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 listed steps to reproduce the bug in detail. ### Expected Behavior Be able to utilize tools proxied via OpenAPI for my MCP Server: ### Actual Behavior open-webui cannot connet to the openAPI proxy to use the tools. getting the message in UI: `Failed to connect to http://mcp:8000/openapi.json OpenAPI tool server` ### Steps to Reproduce My Docker-compose ```yaml services: open-webui: #build: # context: . # args: # OLLAMA_BASE_URL: '/ollama' # dockerfile: Dockerfile image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main} container_name: open-webui volumes: - open-webui:/app/backend/data ports: - ${OPEN_WEBUI_PORT-3053}:8080 environment: - 'OLLAMA_BASE_URL=http://ollama:11434' - 'WEBUI_SECRET_KEY=' extra_hosts: - host.docker.internal:host-gateway restart: unless-stopped mcp: image: mcp-proxy-server container_name: mcp ports: - ${MCP_PORT-3054}:8000 volumes: ollama: {} open-webui: {} ``` My Dockerfile: ```Dockerfile FROM python:3.11-slim WORKDIR /app RUN pip install mcpo uv # Replace with your MCP server command; example: uvx mcp-server-time CMD ["uvx", "mcpo", "--host", "0.0.0.0", "--port", "8000", "--", "uvx", "mcp-server-time", "--local-timezone=America/New_York"] ``` 1. docker-compose up 2. go to Settings > Tools > Manage Tool Servers add `http://mcp:8000`, press Save ### Logs & Screenshots ![Image](https://github.com/user-attachments/assets/20419513-55ac-4ffd-b98b-00bfa1a2f5f4) ![Image](https://github.com/user-attachments/assets/e840b2c3-cae5-49cb-bdc7-abe25de5b0b7) When I open the MCP container, I have these logs and I can open `/openapi.json` file and I can see the MCP tools for time MCP Server listed: ``` mcp | Starting MCP OpenAPI Proxy on 0.0.0.0:8000 with command: uvx mcp-server-time --local-timezone=America/New_York mcp | INFO: 192.168.65.1:56027 - "GET /docs HTTP/1.1" 200 OK mcp | INFO: 192.168.65.1:56027 - "GET /openapi.json HTTP/1.1" 200 OK mcp | INFO: 192.168.65.1:56027 - "GET /openapi.json HTTP/1.1" 200 OK ``` The open-webui container does not produce any error messages in the terminal. ### Additional Information When I open terminal in the open-webui container, I can using curl successfully access `http://mcp:8000/openapi.json` with: `curl http://mcp:8000/openapi.json` ![Image](https://github.com/user-attachments/assets/52dbb0ab-9b10-4cdc-a244-1ec5da16dd02)
GiteaMirror added the bug label 2026-04-19 22:31:03 -05:00
Author
Owner

@tjbck commented on GitHub (Apr 6, 2025):

Please read the docs. If you want to use internal device address you should add them from admin tool servers settings

<!-- gh-comment-id:2781141608 --> @tjbck commented on GitHub (Apr 6, 2025): Please read the docs. If you want to use internal device address you should add them from admin tool servers settings
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16623