issue: random "not all arguments converted during string formatting" error #75

Closed
opened 2026-02-15 20:17:50 -05:00 by yindo · 16 comments
Owner

Originally created by @elct9620 on GitHub (May 30, 2025).

Check Existing Issues

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

mcpo Version

Docker Image git-27af7a6

Open WebUI Version (if applicable)

v0.6.13

Operating System

macOS Sequoia

Browser (if applicable)

Chrome 136.0.7103.114

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

When using the tool to call MCP via MCPO, it can return the MCP response correctly.

Actual Behavior

Randomly failed when using SSE/Streamable HTTP MCP Server.

The response will show the "not all arguments converted during string formatting"

In the MCPO, it will display 500 error mcpo-1 | INFO: 172.18.0.3:56294 - "POST /finlab/get_price HTTP/1.1" 500 Internal Server Error

Steps to Reproduce

  1. Create a new customized model
  2. Set function call to native
  3. Talk with the model, trigger tool use
  4. Random failed

Logs & Screenshots

MCPO

mcpo-1  | 2025-05-30 17:53:54,287 - INFO - HTTP Request: POST http://172.31.3.61:8090/messages/?session_id=d66906df6b9c426cbd73ca34813054c7 "HTTP/1.1 202 Accepted"
mcpo-1  | Calling endpoint: get_price, with args: {'symbol': '2454', 'date': '2025-05-30'}
mcpo-1  | Unexpected error calling get_price: 500: {'message': "Error executing tool get_price: '2025-05-30'"}
mcpo-1  | INFO:     172.18.0.3:56280 - "POST /finlab/get_price HTTP/1.1" 500 Internal Server Error
mcpo-1  | 2025-05-30 17:53:54,314 - INFO - HTTP Request: POST http://172.31.3.61:8090/messages/?session_id=d66906df6b9c426cbd73ca34813054c7 "HTTP/1.1 202 Accepted"
mcpo-1  | Calling endpoint: get_price, with args: {'symbol': '2317', 'date': '2025-05-30'}
mcpo-1  | Unexpected error calling get_price: 500: {'message': "Error executing tool get_price: '2025-05-30'"}
mcpo-1  | INFO:     172.18.0.3:56294 - "POST /finlab/get_price HTTP/1.1" 500 Internal Server Error

MCP Server

Use the official FastMCP to build this MCP Server

2025-05-30T17:53:46.898855300Z INFO:     172.31.3.33:35492 - "POST /messages/?session_id=d66906df6b9c426cbd73ca34813054c7 HTTP/1.1" 202 Accepted
2025-05-30T17:53:46.901648442Z [05/30/25 17:53:46] INFO     Processing request of type            server.py:551
2025-05-30T17:53:46.901669260Z                              CallToolRequest                                    
2025-05-30T17:53:54.258066192Z INFO:     172.31.3.33:37468 - "POST /messages/?session_id=d66906df6b9c426cbd73ca34813054c7 HTTP/1.1" 202 Accepted
2025-05-30T17:53:54.260792981Z [05/30/25 17:53:54] INFO     Processing request of type            server.py:551
2025-05-30T17:53:54.260814222Z                              CallToolRequest                                    
2025-05-30T17:53:54.285602507Z INFO:     172.31.3.33:37468 - "POST /messages/?session_id=d66906df6b9c426cbd73ca34813054c7 HTTP/1.1" 202 Accepted
2025-05-30T17:53:54.288336110Z                     INFO     Processing request of type            server.py:551
2025-05-30T17:53:54.288382911Z                              CallToolRequest                                    
2025-05-30T17:53:54.312199595Z INFO:     172.31.3.33:37468 - "POST /messages/?session_id=d66906df6b9c426cbd73ca34813054c7 HTTP/1.1" 202 Accepted
2025-05-30T17:53:54.314904669Z                     INFO     Processing request of type            server.py:551
2025-05-30T17:53:54.314933849Z                              CallToolRequest 

Additional Information

Using n8n to connect the MCP server via SSE works correctly.

Originally created by @elct9620 on GitHub (May 30, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of mcpo. ### mcpo Version Docker Image `git-27af7a6` ### Open WebUI Version (if applicable) v0.6.13 ### Operating System macOS Sequoia ### Browser (if applicable) Chrome 136.0.7103.114 ### 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 When using the tool to call MCP via MCPO, it can return the MCP response correctly. ### Actual Behavior Randomly failed when using SSE/Streamable HTTP MCP Server. The response will show the `"not all arguments converted during string formatting"` > In the MCPO, it will display 500 error `mcpo-1 | INFO: 172.18.0.3:56294 - "POST /finlab/get_price HTTP/1.1" 500 Internal Server Error` ### Steps to Reproduce 1. Create a new customized model 2. Set function call to `native` 3. Talk with the model, trigger tool use 4. Random failed ### Logs & Screenshots ## MCPO ``` mcpo-1 | 2025-05-30 17:53:54,287 - INFO - HTTP Request: POST http://172.31.3.61:8090/messages/?session_id=d66906df6b9c426cbd73ca34813054c7 "HTTP/1.1 202 Accepted" mcpo-1 | Calling endpoint: get_price, with args: {'symbol': '2454', 'date': '2025-05-30'} mcpo-1 | Unexpected error calling get_price: 500: {'message': "Error executing tool get_price: '2025-05-30'"} mcpo-1 | INFO: 172.18.0.3:56280 - "POST /finlab/get_price HTTP/1.1" 500 Internal Server Error mcpo-1 | 2025-05-30 17:53:54,314 - INFO - HTTP Request: POST http://172.31.3.61:8090/messages/?session_id=d66906df6b9c426cbd73ca34813054c7 "HTTP/1.1 202 Accepted" mcpo-1 | Calling endpoint: get_price, with args: {'symbol': '2317', 'date': '2025-05-30'} mcpo-1 | Unexpected error calling get_price: 500: {'message': "Error executing tool get_price: '2025-05-30'"} mcpo-1 | INFO: 172.18.0.3:56294 - "POST /finlab/get_price HTTP/1.1" 500 Internal Server Error ``` ## MCP Server Use the official `FastMCP` to build this MCP Server ``` 2025-05-30T17:53:46.898855300Z INFO: 172.31.3.33:35492 - "POST /messages/?session_id=d66906df6b9c426cbd73ca34813054c7 HTTP/1.1" 202 Accepted 2025-05-30T17:53:46.901648442Z [05/30/25 17:53:46] INFO Processing request of type server.py:551 2025-05-30T17:53:46.901669260Z CallToolRequest 2025-05-30T17:53:54.258066192Z INFO: 172.31.3.33:37468 - "POST /messages/?session_id=d66906df6b9c426cbd73ca34813054c7 HTTP/1.1" 202 Accepted 2025-05-30T17:53:54.260792981Z [05/30/25 17:53:54] INFO Processing request of type server.py:551 2025-05-30T17:53:54.260814222Z CallToolRequest 2025-05-30T17:53:54.285602507Z INFO: 172.31.3.33:37468 - "POST /messages/?session_id=d66906df6b9c426cbd73ca34813054c7 HTTP/1.1" 202 Accepted 2025-05-30T17:53:54.288336110Z INFO Processing request of type server.py:551 2025-05-30T17:53:54.288382911Z CallToolRequest 2025-05-30T17:53:54.312199595Z INFO: 172.31.3.33:37468 - "POST /messages/?session_id=d66906df6b9c426cbd73ca34813054c7 HTTP/1.1" 202 Accepted 2025-05-30T17:53:54.314904669Z INFO Processing request of type server.py:551 2025-05-30T17:53:54.314933849Z CallToolRequest ``` ### Additional Information Using `n8n` to connect the MCP server via SSE works correctly.
yindo added the bug label 2026-02-15 20:17:50 -05:00
yindo closed this issue 2026-02-15 20:17:50 -05:00
Author
Owner

@taylorwilsdon commented on GitHub (May 31, 2025):

Do you have the type declaration for SSE in place? Hard to say without seeing the MCP code and the config.json you're using to start mcpo (or the command string if doing a one liner)

@taylorwilsdon commented on GitHub (May 31, 2025): Do you have the type declaration for SSE in place? Hard to say without seeing the MCP code and the config.json you're using to start mcpo (or the command string if doing a one liner)
Author
Owner

@elct9620 commented on GitHub (May 31, 2025):

@taylorwilsdon

The config.json is here

{
  "mcpServers": {
    "finlab": {
      "type": "sse",
      "url": "http://172.31.3.61:8090/sse"
    },
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time", "--local-timezone=Asia/Taipei"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    },
    "cf-docs": {
      "type": "sse",
      "url": "https://docs.mcp.cloudflare.com/sse"
    },
    "perplexity-ask": {
      "type": "streamable_http",
      "url": "http://172.31.3.61:9001/mcp"
    }
  }
}

The perplexity-ask server is implemented here https://github.com/elct9620/perplexity-ask-openrouter

Finlab isn't an open-source project, but it is simple for now.

# some imports
# ...

mcp = FastMCP("Finlab MCP", host="0.0.0.0")


@mcp.tool()
def get_price(symbol: str, date: str):
    """
    Get the price data for a given symbol and date. (TWSE only)
    """
    # Use SDK to get data
    # ...

    return {
        "open": open.loc[date, symbol],
        "close": close.loc[date, symbol],
        "high": high.loc[date, symbol],
        "low": low.loc[date, symbol],
        "volume": volume.loc[date, symbol],
    }


@mcp.tool()
def get_news(symbol: str, n: int = 5):
    """
    Get the latest news related to a given symbol.
    """
    news = data.get("tw_news_cnyes")
    news = news[news["stock_ids"].apply(lambda x: symbol in x)]
    news = news.sort_values(by="date", ascending=False)
    news = news.head(n)

    return news[["date", "title", "url"]].to_dict(orient="records")


def main():
    try:
        mcp.run(transport="sse")
    except KeyboardInterrupt:
        print("MCP server stopped by user.")


if __name__ == "__main__":
    main()
@elct9620 commented on GitHub (May 31, 2025): @taylorwilsdon The `config.json` is here ```json { "mcpServers": { "finlab": { "type": "sse", "url": "http://172.31.3.61:8090/sse" }, "time": { "command": "uvx", "args": ["mcp-server-time", "--local-timezone=Asia/Taipei"] }, "fetch": { "command": "uvx", "args": ["mcp-server-fetch"] }, "cf-docs": { "type": "sse", "url": "https://docs.mcp.cloudflare.com/sse" }, "perplexity-ask": { "type": "streamable_http", "url": "http://172.31.3.61:9001/mcp" } } } ``` The `perplexity-ask` server is implemented here https://github.com/elct9620/perplexity-ask-openrouter Finlab isn't an open-source project, but it is simple for now. ```py # some imports # ... mcp = FastMCP("Finlab MCP", host="0.0.0.0") @mcp.tool() def get_price(symbol: str, date: str): """ Get the price data for a given symbol and date. (TWSE only) """ # Use SDK to get data # ... return { "open": open.loc[date, symbol], "close": close.loc[date, symbol], "high": high.loc[date, symbol], "low": low.loc[date, symbol], "volume": volume.loc[date, symbol], } @mcp.tool() def get_news(symbol: str, n: int = 5): """ Get the latest news related to a given symbol. """ news = data.get("tw_news_cnyes") news = news[news["stock_ids"].apply(lambda x: symbol in x)] news = news.sort_values(by="date", ascending=False) news = news.head(n) return news[["date", "title", "url"]].to_dict(orient="records") def main(): try: mcp.run(transport="sse") except KeyboardInterrupt: print("MCP server stopped by user.") if __name__ == "__main__": main() ```
Author
Owner

@taylorwilsdon commented on GitHub (May 31, 2025):

Hm that all looks fine to me, do the other SSE endpoints you've got in MCPO work or are they all failing the same way?

@taylorwilsdon commented on GitHub (May 31, 2025): Hm that all looks fine to me, do the other SSE endpoints you've got in MCPO work or are they all failing the same way?
Author
Owner

@elct9620 commented on GitHub (May 31, 2025):

I make some tests for the listed tools:

  • finlab -> can trigger this error
  • time -> work correctly
  • fetch -> work correctly
  • cf-docs -> can trigger this error
  • perplexity-ask -> can trigger this error

It looks like the stdio mode is more stable.

@elct9620 commented on GitHub (May 31, 2025): I make some tests for the listed tools: * `finlab` -> can trigger this error * `time` -> work correctly * `fetch` -> work correctly * `cf-docs` -> can trigger this error * `perplexity-ask` -> can trigger this error It looks like the `stdio` mode is more stable.
Author
Owner

@taylorwilsdon commented on GitHub (May 31, 2025):

Interesting, so its all the remote ones? This may be a configuration issue on your host then, because I just tried the public one (cloudflare) with an exact copy paste from your config and it works perfectly

Image Image Image
2025-05-31 12:21:31,902 - INFO - Attempting to connect/start server with config: {'type': 'sse', 'url': 'https://docs.mcp.cloudflare.com/sse'}
2025-05-31 12:21:31,902 - INFO - Connecting to direct URL: https://docs.mcp.cloudflare.com/sse
2025-05-31 12:21:31,902 - INFO - Connecting to SSE endpoint: https://docs.mcp.cloudflare.com/sse
2025-05-31 12:21:32,518 - INFO - HTTP Request: GET https://docs.mcp.cloudflare.com/sse "HTTP/1.1 200 OK"
2025-05-31 12:21:32,519 - INFO - Received endpoint URL: https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8
2025-05-31 12:21:32,519 - INFO - Starting post writer with endpoint URL: https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8
2025-05-31 12:21:32,656 - INFO - HTTP Request: POST https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 "HTTP/1.1 202 Accepted"
2025-05-31 12:21:32,683 - INFO - HTTP Request: POST https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 "HTTP/1.1 202 Accepted"
2025-05-31 12:21:32,709 - INFO - HTTP Request: POST https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 "HTTP/1.1 202 Accepted"
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)
INFO:     127.0.0.1:53991 - "OPTIONS /cf-docs/openapi.json HTTP/1.1" 200 OK
INFO:     127.0.0.1:53991 - "GET /cf-docs/openapi.json HTTP/1.1" 200 OK
INFO:     127.0.0.1:53993 - "GET /cf-docs/openapi.json HTTP/1.1" 200 OK
INFO:     127.0.0.1:54203 - "OPTIONS /cf-docs/search_cloudflare_documentation HTTP/1.1" 200 OK
Calling endpoint: search_cloudflare_documentation, with args: {'query': 'Cloudflare Workers'}
2025-05-31 12:22:40,321 - INFO - HTTP Request: POST https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 "HTTP/1.1 202 Accepted"
INFO:     127.0.0.1:54203 - "POST /cf-docs/search_cloudflare_documentation HTTP/1.1" 200 OK
@taylorwilsdon commented on GitHub (May 31, 2025): Interesting, so its all the remote ones? This may be a configuration issue on your host then, because I just tried the public one (cloudflare) with an exact copy paste from your config and it works perfectly <img width="1798" alt="Image" src="https://github.com/user-attachments/assets/263dbe60-dec7-4c99-91af-c54fa3ae8a5a" /> <img width="629" alt="Image" src="https://github.com/user-attachments/assets/41a5a1dc-f8f8-40f2-b903-4d9eee721d22" /> <img width="1112" alt="Image" src="https://github.com/user-attachments/assets/5b62ba78-7d5f-4989-a808-597df1f2480d" /> ``` 2025-05-31 12:21:31,902 - INFO - Attempting to connect/start server with config: {'type': 'sse', 'url': 'https://docs.mcp.cloudflare.com/sse'} 2025-05-31 12:21:31,902 - INFO - Connecting to direct URL: https://docs.mcp.cloudflare.com/sse 2025-05-31 12:21:31,902 - INFO - Connecting to SSE endpoint: https://docs.mcp.cloudflare.com/sse 2025-05-31 12:21:32,518 - INFO - HTTP Request: GET https://docs.mcp.cloudflare.com/sse "HTTP/1.1 200 OK" 2025-05-31 12:21:32,519 - INFO - Received endpoint URL: https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 2025-05-31 12:21:32,519 - INFO - Starting post writer with endpoint URL: https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 2025-05-31 12:21:32,656 - INFO - HTTP Request: POST https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 "HTTP/1.1 202 Accepted" 2025-05-31 12:21:32,683 - INFO - HTTP Request: POST https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 "HTTP/1.1 202 Accepted" 2025-05-31 12:21:32,709 - INFO - HTTP Request: POST https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 "HTTP/1.1 202 Accepted" INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit) INFO: 127.0.0.1:53991 - "OPTIONS /cf-docs/openapi.json HTTP/1.1" 200 OK INFO: 127.0.0.1:53991 - "GET /cf-docs/openapi.json HTTP/1.1" 200 OK INFO: 127.0.0.1:53993 - "GET /cf-docs/openapi.json HTTP/1.1" 200 OK INFO: 127.0.0.1:54203 - "OPTIONS /cf-docs/search_cloudflare_documentation HTTP/1.1" 200 OK Calling endpoint: search_cloudflare_documentation, with args: {'query': 'Cloudflare Workers'} 2025-05-31 12:22:40,321 - INFO - HTTP Request: POST https://docs.mcp.cloudflare.com/sse/message?sessionId=07ae7179d2e703f5120b8a07fb03191b4f128bbdbe48639db4301187782a88a8 "HTTP/1.1 202 Accepted" INFO: 127.0.0.1:54203 - "POST /cf-docs/search_cloudflare_documentation HTTP/1.1" 200 OK ```
Author
Owner

@elct9620 commented on GitHub (May 31, 2025):

I just put it inside docker-compose.yml with Open WebUI inside a virtual machine. Other VMs running n8n can work correctly.

---
services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    volumes:
      - open-webui:/app/backend/data
    environment:
      - OPENAI_API_KEY
      - WEBUI_AUTH_TRUSTED_EMAIL_HEADER=Cf-Access-Authenticated-User-Email
      - ENABLE_OLLAMA_API=False
      - WEBUI_URL
    restart: unless-stopped
    ports:
      - 8080:8080
  mcpo:
    image: ghcr.io/open-webui/mcpo:main
    volumes:
      - ./mcpo.json:/mcpo.json
    command: --config /mcpo.json
    restart: unless-stopped
@elct9620 commented on GitHub (May 31, 2025): I just put it inside `docker-compose.yml` with Open WebUI inside a virtual machine. Other VMs running n8n can work correctly. ```yaml --- services: open-webui: image: ghcr.io/open-webui/open-webui:main volumes: - open-webui:/app/backend/data environment: - OPENAI_API_KEY - WEBUI_AUTH_TRUSTED_EMAIL_HEADER=Cf-Access-Authenticated-User-Email - ENABLE_OLLAMA_API=False - WEBUI_URL restart: unless-stopped ports: - 8080:8080 mcpo: image: ghcr.io/open-webui/mcpo:main volumes: - ./mcpo.json:/mcpo.json command: --config /mcpo.json restart: unless-stopped ```
Author
Owner

@elct9620 commented on GitHub (May 31, 2025):

I make another test after restarting the MCPO server.

The cf-docs can work correctly for now. But the finlab still got the error. I'm still not sure why it randomly receives the error.


Update:

The remote server can work correctly after the restart.
I guess it may related to my server have some network problem, but MCPO didn't reconnect to MCP and still keep connection not work any more 🤔

We can ignore finlab error because it is not related to MCPO.

@elct9620 commented on GitHub (May 31, 2025): I make another test after restarting the MCPO server. The `cf-docs` can work correctly for now. But the `finlab` still got the error. I'm still not sure why it randomly receives the error. --- Update: The remote server can work correctly after the restart. I guess it may related to my server have some network problem, but MCPO didn't reconnect to MCP and still keep connection not work any more 🤔 > We can ignore `finlab` error because it is not related to MCPO.
Author
Owner

@ghostrider0470 commented on GitHub (Jun 2, 2025):

I have the same exact issue remote servers stop working even when on streamable http. I believe it's likely due to timeout and not reconnecting.

@ghostrider0470 commented on GitHub (Jun 2, 2025): I have the same exact issue remote servers stop working even when on streamable http. I believe it's likely due to timeout and not reconnecting.
Author
Owner

@ghostrider0470 commented on GitHub (Jun 2, 2025):

Remote servers work fine until this happens, so only method to resolve this is to manually restart the container of mcpo

@ghostrider0470 commented on GitHub (Jun 2, 2025): Remote servers work fine until this happens, so only method to resolve this is to manually restart the container of mcpo
Author
Owner

@elct9620 commented on GitHub (Jun 2, 2025):

If my problem can be reproduced, I also want to discuss making each request have a separate session ID.

The newer MCP design (Streamable HTTP) supports identity users by session ID, provided that all users on the Open Web UI use the same session ID. It may cause some problems in the future.

@elct9620 commented on GitHub (Jun 2, 2025): If my problem can be reproduced, I also want to discuss making each request have a separate session ID. The newer MCP design (Streamable HTTP) supports identity users by session ID, provided that all users on the Open Web UI use the same session ID. It may cause some problems in the future.
Author
Owner

@martijnn commented on GitHub (Jun 11, 2025):

I just experienced this error message too. In the logging of my mcpo container I see that the tool call is done with empty values.

Perhaps this is a shortcoming of open-webui as mcp client, because when I ask the same question via Claude Desktop or Cursor, I can have a sensible conversation via my remote mcp server.

It might help to see what the calls look like 'underwater'. In any case, I am not convinced to have mcpo as an intermediate step for accessing (remote) MCP servers.

@martijnn commented on GitHub (Jun 11, 2025): I just experienced this error message too. In the logging of my mcpo container I see that the tool call is done with empty values. Perhaps this is a shortcoming of open-webui as mcp client, because when I ask the same question via Claude Desktop or Cursor, I can have a sensible conversation via my remote mcp server. It might help to see what the calls look like '[underwater](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#example-api-response-with-a-tool-use-content-block)'. In any case, I am not convinced to have mcpo as an intermediate step for accessing (remote) MCP servers.
Author
Owner

@martijnn commented on GitHub (Jun 12, 2025):

Related https://github.com/open-webui/open-webui/pull/14893

@martijnn commented on GitHub (Jun 12, 2025): Related https://github.com/open-webui/open-webui/pull/14893
Author
Owner

@ocelotpa commented on GitHub (Jun 13, 2025):

This issue has also troubled me for a long time. The situation is that as long as MCPO becomes idle for half an hour, this error message keeps popping up persistently,the only way to fix it seems like restarting the container.

@ocelotpa commented on GitHub (Jun 13, 2025): This issue has also troubled me for a long time. The situation is that as long as MCPO becomes idle for half an hour, this error message keeps popping up persistently,the only way to fix it seems like restarting the container.
Author
Owner

@Baronco commented on GitHub (Jun 13, 2025):

I am experiencing the same issue, with tools returning the error: "not all arguments converted during string formatting" after running for a few hours. The request payload looks like this:

{
"site_url": "xxxxxxxxxxxxxxxxx",
"folder_path": "xxxxxxxxxxxxxxxxx",
"user_email": "xxxxxxxxxxxxxxxxx",
}
"not all arguments converted during string formatting"

My MCP servers are remote SSE types, deployed as Azure Functions. When I check their logs, I see no incoming calls from MCPO. Additionally, when validating the connection and response via the MCP Inspector, the MCP servers deployed in Azure Functions seem to be working correctly!

We deploy MCPO using its official Docker image on an Azure Web App. When the tool responses return the error "not all arguments converted during string formatting", the MCPO logs show the following:

2025-06-13T12:55:10.6960506Z Calling endpoint: Search Documents, with args: {'site_url': 'gr.sharepoint.com:/sites/G', 'folder_path': 'Documentations', 'user_email': 'user.email@email.com'}
2025-06-13T12:55:10.696094Z Unexpected error calling Search Documents: Traceback (most recent call last):
2025-06-13T12:55:10.6960981Z   File "/app/.venv/lib/python3.11/site-packages/mcpo/utils/main.py", line 266, in tool
2025-06-13T12:55:10.6961008Z     result = await session.call_tool(endpoint_name, arguments=args)
2025-06-13T12:55:10.6961035Z              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-13T12:55:10.6961073Z   File "/app/.venv/lib/python3.11/site-packages/mcp/client/session.py", line 287, in call_tool
2025-06-13T12:55:10.6961096Z     return await self.send_request(
2025-06-13T12:55:10.696112Z            ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-13T12:55:10.6961219Z   File "/app/.venv/lib/python3.11/site-packages/mcp/shared/session.py", line 268, in send_request
2025-06-13T12:55:10.6961244Z     await self._write_stream.send(
2025-06-13T12:55:10.6961272Z   File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 242, in send
2025-06-13T12:55:10.6961311Z     self.send_nowait(item)
2025-06-13T12:55:10.6961342Z   File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 211, in send_nowait
2025-06-13T12:55:10.6961366Z     raise ClosedResourceError
2025-06-13T12:55:10.6961391Z anyio.ClosedResourceError
2025-06-13T12:55:10.6961416Z
2025-06-13T12:55:10.6961449Z INFO:     169.254.136.1:19989 - "POST /sharepoint/Search%20Documents HTTP/1.1" 500 Internal Server Error

Additional info: From the Open Web UI Tools panel, connection validation returns:

2025-06-13T13:02:03.7954103Z INFO: 169.254.136.1:41573 - "GET /sharepoint/openapi.json HTTP/1.1" 200 OK

Also, the MCPO logs include:

2025-06-13T13:00:01.9839539Z INFO: 169.254.136.1:15989 - "GET / HTTP/1.1" 404 Not Found

Open WebUI Version: v0.6.13

Does anyone know if this issue is specific to MCPO or if it is related to Open Web UI? I am confident it is not my functions since they provide correct responses both from the MCP Inspector and also within VSCode!

@Baronco commented on GitHub (Jun 13, 2025): I am experiencing the same issue, with tools returning the error: "not all arguments converted during string formatting" after running for a few hours. The request payload looks like this: ``` { "site_url": "xxxxxxxxxxxxxxxxx", "folder_path": "xxxxxxxxxxxxxxxxx", "user_email": "xxxxxxxxxxxxxxxxx", } "not all arguments converted during string formatting" ``` My MCP servers are remote SSE types, deployed as Azure Functions. When I check their logs, I see no incoming calls from MCPO. Additionally, when validating the connection and response via the MCP Inspector, the MCP servers deployed in Azure Functions seem to be working correctly! We deploy MCPO using its official Docker image on an Azure Web App. When the tool responses return the error "not all arguments converted during string formatting", the MCPO logs show the following: ``` 2025-06-13T12:55:10.6960506Z Calling endpoint: Search Documents, with args: {'site_url': 'gr.sharepoint.com:/sites/G', 'folder_path': 'Documentations', 'user_email': 'user.email@email.com'} 2025-06-13T12:55:10.696094Z Unexpected error calling Search Documents: Traceback (most recent call last): 2025-06-13T12:55:10.6960981Z File "/app/.venv/lib/python3.11/site-packages/mcpo/utils/main.py", line 266, in tool 2025-06-13T12:55:10.6961008Z result = await session.call_tool(endpoint_name, arguments=args) 2025-06-13T12:55:10.6961035Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-06-13T12:55:10.6961073Z File "/app/.venv/lib/python3.11/site-packages/mcp/client/session.py", line 287, in call_tool 2025-06-13T12:55:10.6961096Z return await self.send_request( 2025-06-13T12:55:10.696112Z ^^^^^^^^^^^^^^^^^^^^^^^^ 2025-06-13T12:55:10.6961219Z File "/app/.venv/lib/python3.11/site-packages/mcp/shared/session.py", line 268, in send_request 2025-06-13T12:55:10.6961244Z await self._write_stream.send( 2025-06-13T12:55:10.6961272Z File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 242, in send 2025-06-13T12:55:10.6961311Z self.send_nowait(item) 2025-06-13T12:55:10.6961342Z File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 211, in send_nowait 2025-06-13T12:55:10.6961366Z raise ClosedResourceError 2025-06-13T12:55:10.6961391Z anyio.ClosedResourceError 2025-06-13T12:55:10.6961416Z 2025-06-13T12:55:10.6961449Z INFO: 169.254.136.1:19989 - "POST /sharepoint/Search%20Documents HTTP/1.1" 500 Internal Server Error ``` Additional info: From the Open Web UI Tools panel, connection validation returns: `2025-06-13T13:02:03.7954103Z INFO: 169.254.136.1:41573 - "GET /sharepoint/openapi.json HTTP/1.1" 200 OK` Also, the MCPO logs include: `2025-06-13T13:00:01.9839539Z INFO: 169.254.136.1:15989 - "GET / HTTP/1.1" 404 Not Found` Open WebUI Version: v0.6.13 Does anyone know if this issue is specific to MCPO or if it is related to Open Web UI? I am confident it is not my functions since they provide correct responses both from the MCP Inspector and also within VSCode!
Author
Owner

@sir3mat commented on GitHub (Aug 8, 2025):

follow

@sir3mat commented on GitHub (Aug 8, 2025): follow
Author
Owner

@taylorwilsdon commented on GitHub (Aug 8, 2025):

follow

This was resolved in a previous version and merged here https://github.com/open-webui/open-webui/pull/14893 if you're seeing a similar issue please open a new issue with a description of the problem @sir3mat !

@taylorwilsdon commented on GitHub (Aug 8, 2025): > follow This was resolved in a previous version and merged here https://github.com/open-webui/open-webui/pull/14893 if you're seeing a similar issue please open a new issue with a description of the problem @sir3mat !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/mcpo#75