Cap the delegate extra below mcp 2.0 - #88
Merged
Merged
Conversation
mcp 2.0.0 (2026-07-28) renamed FastMCP to MCPServer and removed the `mcp.server.fastmcp` import path that tanglebrain/mcp_server.py uses. The extra's open-ended `mcp >= 1.0` therefore resolved to an SDK this code cannot import: `pip install "tanglebrain[delegate]"` shipped a broken delegate server in v0.20.0, and CI went red on every branch regardless of its diff. Constrain to `mcp >= 1.0, < 2` and add tests/test_packaging.py to hold the upper bound. A dependency constraint is exercised by no runtime code path, so nothing catches a bad one until an install resolves differently — verified the new test fails against the uncapped constraint and passes with it. Migrating to the 2.x API is deliberately not done here: it moves the floor to `mcp >= 2` and drops 1.x users. Fixes #87
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This was referenced Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #87.
What
pyproject.toml:delegate = ["mcp >= 1.0"]→["mcp >= 1.0, < 2"], with a comment explaining what lifting the cap would require.tests/test_packaging.pyasserting themcprequirement carries an upper bound.### Fixed(patch tier).Why
mcp2.0.0 landed 2026-07-28, renamingFastMCPtoMCPServerand removing themcp.server.fastmcppathtanglebrain/mcp_server.pyimports. With no upper bound, any fresh resolve pulled 2.0.0 and failed at import — 13 errors on every Python version, on every branch, regardless of its diff.mainlooked green only because its last CI run predated the release.This is shipped, not just CI: PyPI's v0.20.0 carries
mcp >= 1.0, sopip install "tanglebrain[delegate]"currently produces a delegate server that cannot import. The cap needs a patch release to reach users.The test exists because a dependency constraint is exercised by no runtime code path. Nothing catches a bad one until an install resolves differently, which here was months after the constraint was written.
Test plan
mcp >= 1.0, confirmedFAILED (failures=1), restored.mcp1.27.2) importsmcp.server.fastmcpfine — the code is correct, only the constraint was wrong.Not in scope
Migrating to the 2.x API. The migration itself looks small (swap the import, rename the class; decorators unchanged), but moving the floor to
mcp >= 2drops 1.x users — a compatibility decision that deserves its own issue and test pass, not a ride-along on a hotfix.