[GH-ISSUE #20629] issue: MCP server response fails #57905

Closed
opened 2026-05-05 21:54:01 -05:00 by GiteaMirror · 23 comments
Owner

Originally created by @thrasher on GitHub (Jan 12, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20629

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.7.2

Ollama Version (if applicable)

v0.13.5

Operating System

MacOS Tahoe 26.1

Browser (if applicable)

Chrome 143.0.7499.193

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

After adding a local MCP server, a chat submitted through Open-WebUI should use data from the MCP server to render a response using ollama.

Actual Behavior

An error is generated where the chat response should be:
cannot pickle '_asyncio.Future' object
Image

Steps to Reproduce

Start running a fresh docker image

docker stop open-webui
docker rm -f open-webui
docker pull ghcr.io/open-webui/open-webui:main
docker run -d \
  -p 3000:8080 \
  --add-host=host.docker.internal:host-gateway \
  -e WEBUI_SECRET_KEY=nolimits \
  -v open-webui:/app/backend/data \
  --name open-webui \
   [ghcr.io/open-webui/open-webui:main](http://ghcr.io/open-webui/open-webui:main)

Run a local MCP server, using FastMCP v2.14.2 (latest):

# note Python 3.14.2
python -m venv myenv
pip install fastmcp ollama
# code mcp_server.py, see below
source myenv/bin/activate
python mcp_server.py

Code for mcp_server.py

from fastmcp import FastMCP

# Create the MCP server instance
mcp = FastMCP("hello-world-mcp")

# Define Tool 4: Get current time
@mcp.tool()
def get_time() -> str:
    """Get the current time"""
    from datetime import datetime
    return datetime.now().strftime("%I:%M %p")

@mcp.tool()
def get_weather(city: str) -> str:
    """Get weather information for a city"""
    # In real app, call a weather API
    # For demo, return fake data
    weather_data = {
        "New York": "Sunny, 72°F",
        "London": "Rainy, 15°C",
        "Tokyo": "Cloudy, 20°C",
        "Berlin": "Snow, -10°C"
    }
    return weather_data.get(city, f"Weather data not available for {city}")

if __name__ == "__main__":
    # Start the server
    mcp.run(transport="http", stateless_http=True, host="127.0.0.1", port=8000, path="/mcp") # streaming

Configure Open-WebUI to use the MCP Server.
Navigate: Admin Panel / Settings / External Tools / "+"
Set as follows:

Image

Test the connection:

Image

In Open-WebUI, enable the MCP tool:

Image

Submit a new chat "What is the weather in Berlin?"

Observe the error message:

Image

Observe the console output for the FastMCP server.

  1. on "Verify Connection", three MCP requests are made without error.
  2. on "Trigger call from chat", four MCP requests are made without error.
Image

Logs & Screenshots

The Chrome dev tools console has one warning, but no errors:

RichTextInput.svelte:690 [tiptap warn]: Duplicate extension names found: ['codeBlock', 'bulletList', 'listItem', 'listKeymap', 'orderedList']. This can lead to issues.

Additional Information

The pickle error seems informative in that some data is not getting (de) serialized properly. I grepped through the codebase but wasn't sure where this might be.

This MCP server works as expected when registered in Visual Studio Code, and then asked for the weather in Berlin with the same query (as well as the other @mcp.tools).

Originally created by @thrasher on GitHub (Jan 12, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20629 ### 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 have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.7.2 ### Ollama Version (if applicable) v0.13.5 ### Operating System MacOS Tahoe 26.1 ### Browser (if applicable) Chrome 143.0.7499.193 ### 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 After adding a local MCP server, a chat submitted through Open-WebUI should use data from the MCP server to render a response using ollama. ### Actual Behavior An error is generated where the chat response should be: cannot pickle '_asyncio.Future' object <img width="718" height="126" alt="Image" src="https://github.com/user-attachments/assets/3ffec6a5-c504-4459-8cb5-11d5d8009ce3" /> ### Steps to Reproduce Start running a fresh docker image ```bash docker stop open-webui docker rm -f open-webui docker pull ghcr.io/open-webui/open-webui:main docker run -d \ -p 3000:8080 \ --add-host=host.docker.internal:host-gateway \ -e WEBUI_SECRET_KEY=nolimits \ -v open-webui:/app/backend/data \ --name open-webui \ [ghcr.io/open-webui/open-webui:main](http://ghcr.io/open-webui/open-webui:main) ``` Run a local MCP server, using FastMCP v2.14.2 (latest): ```bash # note Python 3.14.2 python -m venv myenv pip install fastmcp ollama # code mcp_server.py, see below source myenv/bin/activate python mcp_server.py ``` Code for mcp_server.py ```python from fastmcp import FastMCP # Create the MCP server instance mcp = FastMCP("hello-world-mcp") # Define Tool 4: Get current time @mcp.tool() def get_time() -> str: """Get the current time""" from datetime import datetime return datetime.now().strftime("%I:%M %p") @mcp.tool() def get_weather(city: str) -> str: """Get weather information for a city""" # In real app, call a weather API # For demo, return fake data weather_data = { "New York": "Sunny, 72°F", "London": "Rainy, 15°C", "Tokyo": "Cloudy, 20°C", "Berlin": "Snow, -10°C" } return weather_data.get(city, f"Weather data not available for {city}") if __name__ == "__main__": # Start the server mcp.run(transport="http", stateless_http=True, host="127.0.0.1", port=8000, path="/mcp") # streaming ``` Configure Open-WebUI to use the MCP Server. Navigate: Admin Panel / Settings / External Tools / "+" Set as follows: <img width="1050" height="1556" alt="Image" src="https://github.com/user-attachments/assets/3719eedb-ca85-4b9e-8180-267e6dc995a9" /> Test the connection: <img width="824" height="254" alt="Image" src="https://github.com/user-attachments/assets/185caf66-2e89-4a10-9a66-745e97d45f62" /> In Open-WebUI, enable the MCP tool: <img width="1534" height="348" alt="Image" src="https://github.com/user-attachments/assets/f5afd929-302d-4416-a89d-25a4794bd8d6" /> Submit a new chat "What is the weather in Berlin?" Observe the error message: <img width="718" height="126" alt="Image" src="https://github.com/user-attachments/assets/a4690fb5-23c7-43a7-8941-43a9a1d6895e" /> Observe the console output for the FastMCP server. 1) on "Verify Connection", three MCP requests are made without error. 2) on "Trigger call from chat", four MCP requests are made without error. <img width="2092" height="1036" alt="Image" src="https://github.com/user-attachments/assets/2212048b-5378-4d97-87d4-8c2a7f40d434" /> ### Logs & Screenshots The Chrome dev tools console has one warning, but no errors: RichTextInput.svelte:690 [tiptap warn]: Duplicate extension names found: ['codeBlock', 'bulletList', 'listItem', 'listKeymap', 'orderedList']. This can lead to issues. ### Additional Information The pickle error seems informative in that some data is not getting (de) serialized properly. I grepped through the codebase but wasn't sure where this might be. This MCP server works as expected when registered in Visual Studio Code, and then asked for the weather in Berlin with the same query (as well as the other @mcp.tools).
GiteaMirror added the bugconfirmed issue labels 2026-05-05 21:54:02 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Jan 12, 2026):

🔍 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:

  1. #19813 issue: Failed to connect to MCP server, while the connection test works fine
    by spi-dlp • Dec 08, 2025 • bug

  2. #19671 issue: Failed to call MCP server (Unknown SSE event: endpoint)
    by DimitriTimoz • Dec 01, 2025 • bug

  3. #20500 issue: Streamable HTTP MCP Server fails with 400 only on Open Webui
    by AxelFooley • Jan 09, 2026 • bug

  4. #19823 Issue: MCP with OAuth 2.1 Authorization/Token retrival is broken in v0.6.41
    by mllab-nl • Dec 08, 2025 • bug

  5. #19148 issue: Verify OAuth mcp server sends incorrect authorization header
    by Oleg52 • Nov 12, 2025 • bug

Show 5 more related issues
  1. #17808 issue: unexpected MCP tool response handling
    by dlamoris • Sep 27, 2025 • bug

  2. #18889 issue: Not able to show mcp server fails to connect error message in the chat and silently fail
    by mmlmt2604 • Nov 03, 2025 • bug

  3. #19018 issue: The "Name" Section of the MCP Tool Request is Not Working Correctly
    by alpgul • Nov 07, 2025 • bug

  4. #19496 issue: 500 internal server error appears in v0.6.40
    by cloudtuotuo • Nov 26, 2025 • bug

  5. #16900 issue: Long running MCP tool calls result in timeout
    by dionny • Aug 25, 2025 • bug


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3740279357 --> @owui-terminator[bot] commented on GitHub (Jan 12, 2026): 🔍 **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: 1. [#19813](https://github.com/open-webui/open-webui/issues/19813) **issue: Failed to connect to MCP server, while the connection test works fine** *by spi-dlp • Dec 08, 2025 • `bug`* 2. [#19671](https://github.com/open-webui/open-webui/issues/19671) **issue: Failed to call MCP server (Unknown SSE event: endpoint)** *by DimitriTimoz • Dec 01, 2025 • `bug`* 3. [#20500](https://github.com/open-webui/open-webui/issues/20500) **issue: Streamable HTTP MCP Server fails with 400 only on Open Webui** *by AxelFooley • Jan 09, 2026 • `bug`* 4. [#19823](https://github.com/open-webui/open-webui/issues/19823) **Issue: MCP with OAuth 2.1 Authorization/Token retrival is broken in v0.6.41** *by mllab-nl • Dec 08, 2025 • `bug`* 5. [#19148](https://github.com/open-webui/open-webui/issues/19148) **issue: Verify OAuth mcp server sends incorrect authorization header** *by Oleg52 • Nov 12, 2025 • `bug`* <details> <summary>Show 5 more related issues</summary> 6. [#17808](https://github.com/open-webui/open-webui/issues/17808) **issue: unexpected MCP tool response handling** *by dlamoris • Sep 27, 2025 • `bug`* 7. [#18889](https://github.com/open-webui/open-webui/issues/18889) **issue: Not able to show mcp server fails to connect error message in the chat and silently fail** *by mmlmt2604 • Nov 03, 2025 • `bug`* 8. [#19018](https://github.com/open-webui/open-webui/issues/19018) **issue: The "Name" Section of the MCP Tool Request is Not Working Correctly** *by alpgul • Nov 07, 2025 • `bug`* 9. [#19496](https://github.com/open-webui/open-webui/issues/19496) **issue: 500 internal server error appears in v0.6.40** *by cloudtuotuo • Nov 26, 2025 • `bug`* 10. [#16900](https://github.com/open-webui/open-webui/issues/16900) **issue: Long running MCP tool calls result in timeout** *by dionny • Aug 25, 2025 • `bug`* </details> --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Author
Owner

@Jannled commented on GitHub (Jan 12, 2026):

I was about to report the same issue. f2a360c (v0.7.1) worked fine, this issue exists only since v0.7.2.

This is the relevant server log entry:

2026-01-12 20:10:00.603 | DEBUG | open_webui.main:process_chat:1746 - Error processing chat payload: cannot pickle '_asyncio.Future' object

To anyone looking into the problem: Since things are passed to pickle that should not end up there, please also make sure that no unvalidated user input is able to escape into pickle, as this could become a security vulnerability.

<!-- gh-comment-id:3740317406 --> @Jannled commented on GitHub (Jan 12, 2026): I was about to report the same issue. f2a360c (v0.7.1) worked fine, this issue exists only since v0.7.2. This is the relevant server log entry: > 2026-01-12 20:10:00.603 | DEBUG | open_webui.main:process_chat:1746 - Error processing chat payload: cannot pickle '_asyncio.Future' object To anyone looking into the problem: Since things are passed to pickle that should not end up there, please also make sure that no unvalidated user input is able to escape into pickle, as this could become a [security vulnerability](https://docs.python.org/3/library/pickle.html).
Author
Owner

@mighty-drive commented on GitHub (Jan 13, 2026):

I was about to report the same issue. f2a360c (v0.7.1) worked fine, this issue exists only since v0.7.2.

Yep, confirming that it worked in previous versions.

<!-- gh-comment-id:3745897538 --> @mighty-drive commented on GitHub (Jan 13, 2026): > I was about to report the same issue. [f2a360c](https://github.com/open-webui/open-webui/commit/f2a360cb87cc395a0195e1b57ff7272400db3bee) (v0.7.1) worked fine, this issue exists only since v0.7.2. Yep, confirming that it worked in previous versions.
Author
Owner

@raufis27 commented on GitHub (Jan 13, 2026):

Getting the same error after upgrading to the latest v0.7.2

<!-- gh-comment-id:3746665235 --> @raufis27 commented on GitHub (Jan 13, 2026): Getting the same error after upgrading to the latest v0.7.2
Author
Owner

@jurschel-gmt commented on GitHub (Jan 13, 2026):

Yes reverted back to v0.7.1 and the problem goes away.

<!-- gh-comment-id:3746968558 --> @jurschel-gmt commented on GitHub (Jan 13, 2026): Yes reverted back to v0.7.1 and the problem goes away.
Author
Owner

@alexbenedek commented on GitHub (Jan 14, 2026):

Damn !!! i was getting insane over this for 3 days .... downgraded to 0.7.1 and it works ...ughhhh

Thanks!

<!-- gh-comment-id:3748945848 --> @alexbenedek commented on GitHub (Jan 14, 2026): Damn !!! i was getting insane over this for 3 days .... downgraded to 0.7.1 and it works ...ughhhh Thanks!
Author
Owner

@see-gee commented on GitHub (Jan 16, 2026):

I am also having this exact same problem... Spent some time on this before I found this post.

<!-- gh-comment-id:3761962531 --> @see-gee commented on GitHub (Jan 16, 2026): I am also having this exact same problem... Spent some time on this before I found this post.
Author
Owner

@dota-devy commented on GitHub (Jan 17, 2026):

I am also seeing this behavior on v0.7.2

<!-- gh-comment-id:3762655090 --> @dota-devy commented on GitHub (Jan 17, 2026): I am also seeing this behavior on v0.7.2
Author
Owner

@meremortals70 commented on GitHub (Jan 17, 2026):

same issue here

<!-- gh-comment-id:3762751780 --> @meremortals70 commented on GitHub (Jan 17, 2026): same issue here
Author
Owner

@a-phasia commented on GitHub (Jan 18, 2026):

same issue, reverting to 0.7.1 fixed the issue for me too.

<!-- gh-comment-id:3765896407 --> @a-phasia commented on GitHub (Jan 18, 2026): same issue, reverting to 0.7.1 fixed the issue for me too.
Author
Owner

@thrasher commented on GitHub (Jan 19, 2026):

I've also verified that 0.7.1 fixes the issue. Thanks to @KoulLife for the patch!

<!-- gh-comment-id:3767723886 --> @thrasher commented on GitHub (Jan 19, 2026): I've also verified that 0.7.1 fixes the issue. Thanks to @KoulLife for the patch!
Author
Owner

@null-create commented on GitHub (Jan 19, 2026):

Confirming that the issue appears to be happening with v0.7.2, and that reverting to 0.7.1 resolves the issue

<!-- gh-comment-id:3770394701 --> @null-create commented on GitHub (Jan 19, 2026): Confirming that the issue appears to be happening with v0.7.2, and that reverting to 0.7.1 resolves the issue
Author
Owner

@tjbck commented on GitHub (Jan 22, 2026):

Could anyone confirm that the issue has been resolved in our dev branch? 0.7.3 should be released shortly

<!-- gh-comment-id:3783805103 --> @tjbck commented on GitHub (Jan 22, 2026): Could anyone confirm that the issue has been resolved in our dev branch? 0.7.3 should be released shortly
Author
Owner

@jurschel-gmt commented on GitHub (Jan 22, 2026):

@tjbck ,

I can confirm to you that the problem is resolved. Even though the code still says it's 0.7.2 the direct_url.json tells me I'm on the dev branch commit. I successfully made a call out to my mcp-sql tool and got a response with no pickle error.

Version: 0.7.2
Direct URL: {"url": "https://github.com/open-webui/open-webui.git", "vcs_info": {"commit_id": "9af40624c5f0f8f7f640a11356e167543b07b2bb", "requested_revision": "dev", "vcs": "git"}}

<!-- gh-comment-id:3785153024 --> @jurschel-gmt commented on GitHub (Jan 22, 2026): @tjbck , I can confirm to you that the problem is resolved. Even though the code still says it's 0.7.2 the direct_url.json tells me I'm on the dev branch commit. I successfully made a call out to my mcp-sql tool and got a response with no pickle error. Version: 0.7.2 Direct URL: {"url": "https://github.com/open-webui/open-webui.git", "vcs_info": {"commit_id": "9af40624c5f0f8f7f640a11356e167543b07b2bb", "requested_revision": "dev", "vcs": "git"}}
Author
Owner

@Slyefox commented on GitHub (Jan 24, 2026):

Confirmed: v0.6.43 works perfectly, v0.7.2 breaks MCP with pickle error

<!-- gh-comment-id:3794590629 --> @Slyefox commented on GitHub (Jan 24, 2026): Confirmed: v0.6.43 works perfectly, v0.7.2 breaks MCP with pickle error
Author
Owner

@taylorwilsdon commented on GitHub (Jan 29, 2026):

@tjbck it is fixed in dev btw looking forward to the release

<!-- gh-comment-id:3819838273 --> @taylorwilsdon commented on GitHub (Jan 29, 2026): @tjbck it is fixed in dev btw looking forward to the release
Author
Owner

@Classic298 commented on GitHub (Jan 29, 2026):

@taylorwilsdon is that a question or a confirmation? (fmi)

<!-- gh-comment-id:3819840496 --> @Classic298 commented on GitHub (Jan 29, 2026): @taylorwilsdon is that a question or a confirmation? (fmi)
Author
Owner

@Classic298 commented on GitHub (Jan 29, 2026):

great!

<!-- gh-comment-id:3819879915 --> @Classic298 commented on GitHub (Jan 29, 2026): great!
Author
Owner

@meremortals70 commented on GitHub (Jan 30, 2026):

look forward to the release

<!-- gh-comment-id:3822016000 --> @meremortals70 commented on GitHub (Jan 30, 2026): look forward to the release
Author
Owner

@hasmcp-dev commented on GitHub (Feb 9, 2026):

+1 on this issue. Looking forward to seeing the fix coming in v0.7.3

<!-- gh-comment-id:3869092177 --> @hasmcp-dev commented on GitHub (Feb 9, 2026): +1 on this issue. Looking forward to seeing the fix coming in v0.7.3
Author
Owner

@mamoit commented on GitHub (Feb 13, 2026):

v0.8.0 just dropped, tested the new docker image and the problem is fixed.

<!-- gh-comment-id:3894062911 --> @mamoit commented on GitHub (Feb 13, 2026): `v0.8.0` just dropped, tested the new docker image and the problem is fixed.
Author
Owner

@neumeierAG commented on GitHub (Feb 26, 2026):

I still geht this error:

2026-02-26 08:01:34.578 | INFO     | httpx._client:_send_single_request:1740 - HTTP Request: DELETE https://service.xxxx.de/mcp "HTTP/1.1 200 OK"
2026-02-26 08:01:34.580 | INFO     | mcp.client.streamable_http:handle_get_stream:298 - GET stream disconnected, reconnecting in 1000ms...
<!-- gh-comment-id:3965500416 --> @neumeierAG commented on GitHub (Feb 26, 2026): I still geht this error: ``` 2026-02-26 08:01:34.578 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: DELETE https://service.xxxx.de/mcp "HTTP/1.1 200 OK" 2026-02-26 08:01:34.580 | INFO | mcp.client.streamable_http:handle_get_stream:298 - GET stream disconnected, reconnecting in 1000ms... ```
Author
Owner

@thrasher commented on GitHub (Mar 3, 2026):

@neumeierAG this bug is closed and confirmed resolved. The error you posted doesn't show how it is related to this bug. I recommend either filing a new bug or searching for a better match to an existing one that is open.

<!-- gh-comment-id:3988813618 --> @thrasher commented on GitHub (Mar 3, 2026): @neumeierAG this bug is closed and confirmed resolved. The error you posted doesn't show how it is related to this bug. I recommend either filing a new bug or searching for a better match to an existing one that is open.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57905