Skip to content

Unbounded mcp>=1.0.0 dependency resolves to MCP SDK 2.0, breaking the MCP server on import #55

Description

@bgimbel

Unbounded mcp>=1.0.0 dependency resolves to MCP SDK 2.0, which breaks the MCP server on import

Summary

pyproject.toml pins mcp>=1.0.0 with no upper bound. The MCP Python SDK has released 2.0.0, which removes/reorganizes the 1.x low-level Server decorator API that src/main.py uses. A fresh install today gets mcp 2.0.0 and the MCP server crashes on import, so every MCP host (Claude Code, etc.) shows the server as failed.

Environment

  • open-brain installed via pipx install 'git+https://github.com/benclawbot/open-brain.git' (master as of 2026-07-31)
  • Python 3.12; resolver selected mcp 2.0.0 + mcp_types 2.0.0

Reproduction

$ python -m src.main
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File ".../site-packages/src/main.py", line 53, in <module>
    @app.list_tools()
     ^^^^^^^^^^^^^^
AttributeError: 'Server' object has no attribute 'list_tools'

The process exits before the stdio handshake, so MCP clients report the server as failed with no useful diagnostics.

Root cause

dependencies = [
    "mcp>=1.0.0",
    ...
]

src/main.py uses the 1.x API (from mcp.server import Server, @app.list_tools() / @app.call_tool() decorators, mcp.server.stdio.stdio_server). In SDK 2.0 the low-level server surface changed (mcp.server now exports Server from lowlevel with a different interface, plus a new MCPServer), so the 1.x decorator calls fail at import time.

Suggested fix

Short term, cap the dependency:

"mcp>=1.0.0,<2",

Longer term, migrate src/main.py to the 2.x server API and bump the floor accordingly.

Workaround

$ pipx runpip openbrain install 'mcp>=1.0.0,<2'

(installs mcp 1.29.0; verified the server then completes the MCP initialize handshake and works from Claude Code.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions