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:
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.)
Unbounded
mcp>=1.0.0dependency resolves to MCP SDK 2.0, which breaks the MCP server on importSummary
pyproject.tomlpinsmcp>=1.0.0with no upper bound. The MCP Python SDK has released 2.0.0, which removes/reorganizes the 1.x low-levelServerdecorator API thatsrc/main.pyuses. A fresh install today getsmcp 2.0.0and the MCP server crashes on import, so every MCP host (Claude Code, etc.) shows the server as failed.Environment
pipx install 'git+https://github.com/benclawbot/open-brain.git'(master as of 2026-07-31)mcp 2.0.0+mcp_types 2.0.0Reproduction
The process exits before the stdio handshake, so MCP clients report the server as failed with no useful diagnostics.
Root cause
src/main.pyuses 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.servernow exportsServerfromlowlevelwith a different interface, plus a newMCPServer), 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.pyto 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.)