[GH-ISSUE #91] Error 401 Unauthorized #42

Closed
opened 2026-10-18 21:10:47 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @phamkhactu on GitHub (Apr 22, 2025).
Original GitHub issue: https://github.com/open-webui/mcpo/issues/91

Check Existing Issues

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

mcpo Version

Lastest

Open WebUI Version (if applicable)

v0.6.5

Operating System

Ubuntu 24.04

Browser (if applicable)

Chrome

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both MCPO and Open WebUI.
  • 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

Run MCP well

Actual Behavior

401 Unauthorized

I saw in your code, you have added CORS

Steps to Reproduce

As the same issue in open webui https://github.com/open-webui/open-webui/issues/12379

My reproduce:

  1. Run mcpo with default tutorial.
  2. Go to open webui -> Setting -> Tool -> add -> add url: http://localhost:8089, API_KEY 123a@.
  3. Save and connect sucessfully.
  4. Open new chat -> Trigger tool: tool_get_current_time ->Error 401.

Logs & Screenshots

uvx mcpo --port 8089 --api-key "123a@" -- uvx mcp-server-time --local-timezone=America/New_York
Installed 34 packages in 92ms
Starting MCP OpenAPI Proxy on 0.0.0.0:8089 with command: uvx mcp-server-time --local-timezone=America/New_York
INFO:     Started server process [2068171]
INFO:     Waiting for application startup.
Installed 22 packages in 31ms
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8089 (Press CTRL+C to quit)
INFO:     127.0.0.1:49320 - "GET / HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:49320 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:49320 - "GET /d%C3%B3c HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:49320 - "GET /docs HTTP/1.1" 200 OK
INFO:     127.0.0.1:49320 - "GET /openapi.json HTTP/1.1" 200 OK
INFO:     10.168.5.138:52856 - "OPTIONS /openapi.json HTTP/1.1" 200 OK
INFO:     10.168.5.138:52856 - "GET /openapi.json HTTP/1.1" 200 OK
INFO:     10.168.5.138:52856 - "GET /openapi.json HTTP/1.1" 200 OK
INFO:     10.168.5.138:52856 - "GET /openapi.json HTTP/1.1" 200 OK
INFO:     10.168.5.138:52856 - "GET /openapi.json HTTP/1.1" 200 OK
INFO:     10.168.5.138:52868 - "GET /openapi.json HTTP/1.1" 200 OK
INFO:     10.168.5.138:52937 - "OPTIONS /get_current_time HTTP/1.1" 200 OK
INFO:     10.168.5.138:52937 - "POST /get_current_time HTTP/1.1" 401 Unauthorized

Additional Information

No response

Originally created by @phamkhactu on GitHub (Apr 22, 2025). Original GitHub issue: https://github.com/open-webui/mcpo/issues/91 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of mcpo. ### mcpo Version Lastest ### Open WebUI Version (if applicable) v0.6.5 ### Operating System Ubuntu 24.04 ### Browser (if applicable) Chrome ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** MCPO and Open WebUI. - [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 Run MCP well ### Actual Behavior 401 Unauthorized I saw in your code, you have added CORS ### Steps to Reproduce As the same issue in open webui https://github.com/open-webui/open-webui/issues/12379 My reproduce: 1. Run mcpo with default tutorial. 2. Go to open webui -> Setting -> Tool -> add -> add url: http://localhost:8089, API_KEY 123a@. 3. Save and connect sucessfully. 4. Open new chat -> Trigger tool: tool_get_current_time ->Error 401. ### Logs & Screenshots ``` uvx mcpo --port 8089 --api-key "123a@" -- uvx mcp-server-time --local-timezone=America/New_York Installed 34 packages in 92ms Starting MCP OpenAPI Proxy on 0.0.0.0:8089 with command: uvx mcp-server-time --local-timezone=America/New_York INFO: Started server process [2068171] INFO: Waiting for application startup. Installed 22 packages in 31ms INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8089 (Press CTRL+C to quit) INFO: 127.0.0.1:49320 - "GET / HTTP/1.1" 404 Not Found INFO: 127.0.0.1:49320 - "GET /favicon.ico HTTP/1.1" 404 Not Found INFO: 127.0.0.1:49320 - "GET /d%C3%B3c HTTP/1.1" 404 Not Found INFO: 127.0.0.1:49320 - "GET /docs HTTP/1.1" 200 OK INFO: 127.0.0.1:49320 - "GET /openapi.json HTTP/1.1" 200 OK INFO: 10.168.5.138:52856 - "OPTIONS /openapi.json HTTP/1.1" 200 OK INFO: 10.168.5.138:52856 - "GET /openapi.json HTTP/1.1" 200 OK INFO: 10.168.5.138:52856 - "GET /openapi.json HTTP/1.1" 200 OK INFO: 10.168.5.138:52856 - "GET /openapi.json HTTP/1.1" 200 OK INFO: 10.168.5.138:52856 - "GET /openapi.json HTTP/1.1" 200 OK INFO: 10.168.5.138:52868 - "GET /openapi.json HTTP/1.1" 200 OK INFO: 10.168.5.138:52937 - "OPTIONS /get_current_time HTTP/1.1" 200 OK INFO: 10.168.5.138:52937 - "POST /get_current_time HTTP/1.1" 401 Unauthorized ``` ### Additional Information _No response_
bsakaguchi 2026-10-18 21:10:47 +00:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/mcpo#42
No description provided.