Skip to content

issue: mcpo errors while starting (maybe dependency-issues with mcp2?) #303

Description

@lineg-it

Check Existing Issues

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

mcpo Version

0.0.20

Open WebUI Version (if applicable)

Operating System

Debian 13

Browser (if applicable)

No response

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

Mcpo starts, installs dependencies and starts a listener.

Actual Behavior

mcpo doesnt start in the first place.

Steps to Reproduce

  1. start mcpo via:
uvx mcpo --port 18000 --api-key "<redacted>" --config ./config.json --hot-reload

Logs & Screenshots

╭───────────────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────╮
│ /home/loginuser/.cache/uv/archive-v0/ev7leLIhOjDiG_9T/lib/python3.13/site-packages/mcpo/__init__.py:93 in main            │
│                                                                                                                           │
│    90 │   │   │   typer.echo("Error: You must specify the MCP server command after '--'")									│
│    91 │   │   │   return									 																│
│    92 │																													│
│ ❱  93 │   from mcpo.main import run									 													│
│    94 │									 																				│
│    95 │   if config_path:									 																│
│    96 │   │   print("Starting MCP OpenAPI Proxy with config file:", config_path)									 		│
│									 																						│
│ /home/loginuser/.cache/uv/archive-v0/ev7leLIhOjDiG_9T/lib/python3.13/site-packages/mcpo/main.py:20 in <module>			│
│									 																						│
│    17 from mcp import ClientSession, StdioServerParameters																│
│    18 from mcp.client.sse import sse_client																				│
│    19 from mcp.client.stdio import stdio_client																			│
│ ❱  20 from mcp.client.streamable_http import streamablehttp_client									 						│
│    21									 																					│
│    22 from mcpo.utils.auth import APIKeyMiddleware, get_verify_api_key									 				│
│    23 from mcpo.utils.main import (									 													│
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'streamablehttp_client' from 'mcp.client.streamable_http' (/home/loginuser/.cache/uv/archive-v0/ev7leLIhOjDiG_9T/lib/python3.13/site-packages/mcp/client/streamable_http.py)

Additional Information

EDIT: The docker image of mcpo starts perfectly, but refuses to load and start several mcp-servers, which more or less correlates to the fact that mcp v2 changed many things

Workaround for failing mcp-servers within mcpo on Docker:

Add --with mcp<2 to your uvx arguments for any affected mcp-server:

For example to fix (affected) @modelcontextprotocol/fetch, open config.json and add two lines as follows:

"fetch": {
      "command": "uvx",
      "args": [
        "--with",                      #<- 1.
        "mcp<2",                     # <- 2.
        "mcp-server-fetch"
      ]
    },

Source: modelcontextprotocol/servers#4560

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions