fix: cap mcp dependency below 2.0 and use instructions kwarg (adopted from #326) - #331
Open
K4bain wants to merge 1 commit into
Open
fix: cap mcp dependency below 2.0 and use instructions kwarg (adopted from #326)#331K4bain wants to merge 1 commit into
K4bain wants to merge 1 commit into
Conversation
Adopted from tadata-org#326 (original patch by @Daniyal0100101), rebased and verified against mcp 1.29.1.
This was referenced Aug 27, 2026
|
I’ve closed #326 now that this PR supersedes it. The CI run here is also blocked on the same fork approval gate, and I only have read access to the repo. @itay-tadata, could you approve the workflow when you get a chance? |
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.
Adopted from #326 (original patch by @Daniyal0100101) — rebased onto current
mainand verified.Why this is needed
pyproject.tomldeclaresmcp>=1.12.0with no upper bound.mcp2.x is now out, and under 2.x this package fails at import/collection time (the lowlevelServerAPI was redesigned — thelist_tools/call_tooldecorator registration no longer exists). Every freshpip install fastapi-mcpcurrently resolves to mcp 2.x and is broken out of the box.This PR:
mcp>=1.12.0,<2.0.0so installs resolve to a known-good mcp 1.x.instructions=kwarg instead of the removed positionaldescriptionargument (forward-compatible with mcp 1.x).Verification
ImportErrorfrommcp.shared.memory).Proper mcp 2.x support (adapting
setup_server()to the new handler-registration API) is follow-up work; this PR stops the bleeding for new installs.