Skip to content

fix(deps): pin mcp SDK below v2 to prevent fresh install crash - #474

Open
syf2211 wants to merge 1 commit into
BeehiveInnovations:mainfrom
syf2211:fix/pin-mcp-sdk-below-v2
Open

fix(deps): pin mcp SDK below v2 to prevent fresh install crash#474
syf2211 wants to merge 1 commit into
BeehiveInnovations:mainfrom
syf2211:fix/pin-mcp-sdk-below-v2

Conversation

@syf2211

@syf2211 syf2211 commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Pin the MCP Python SDK to <2 so fresh installs no longer resolve mcp 2.x and crash at import with AttributeError: 'Server' object has no attribute 'list_tools'.

Motivation

pyproject.toml and requirements.txt declared mcp>=1.0.0 with no upper bound. MCP SDK v2.0.0 removed decorator-based handlers (@server.list_tools(), etc.) that server.py still uses. Fresh installs via uvx or pip now pull mcp 2.x and fail before the server starts (#470).

This is the interim fix recommended by the MCP SDK migration guide until the project migrates to constructor on_* callbacks.

Changes

  • pyproject.toml: mcp>=1.0.0,<2
  • requirements.txt: mcp>=1.0.0,<2

Tests

pip install -r requirements.txt -r requirements-dev.txt
python -m pytest tests/ -v --ignore=simulator_tests/ -m "not integration"
python -c "import server"
  • 866 unit tests passed
  • Server imports successfully with mcp 1.29.1

Notes

  • Does not migrate to MCP 2.x API; a follow-up issue/PR would be needed for full migration
  • Both install paths (pip install . via pyproject and Docker/CI via requirements.txt) are covered

Fixes #470

mcp 2.0 removed decorator-based handlers used by server.py. Cap the
dependency at <2 until the project migrates to constructor callbacks.

Fixes BeehiveInnovations#470
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T00:06:27.827830Z 8e3c83e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on install: unpinned mcp>=1.0.0 resolves to mcp 2.0.0 which removed @server.list_tools()

1 participant