Pin langchain-mcp-adapters and mcp versions - #25
Merged
aviweit merged 2 commits intoJul 30, 2026
Merged
Conversation
mcp 2.0.0 removed RequestContext from mcp.shared.context which langchain-mcp-adapters 0.3.1 still imports, causing an ImportError that surfaces as HTTP 500 from the skillberry proxy agent. Capping at 0.3.0 keeps the dependency on the mcp 1.x-compatible adapter release.
mcp 2.0.0 removed RequestContext from mcp.shared.context. langchain-mcp-adapters <=0.3.0 still imports it at module load time, causing an ImportError on every request. Explicitly cap mcp to <2.0.0.
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.
Fix: Pin langchain-mcp-adapters and mcp versions
Why This PR Was Needed
Breaking Change in mcp 2.0.0: MCP 2.0.0 removed
RequestContextfrommcp.shared.context, which is still imported bylangchain-mcp-adaptersversions ≤0.3.0 at module load time. This causes anImportErroron every request.The Issue:
langchain-mcp-adapters0.3.1+ still imports the removedRequestContextThe Solution:
>= 1.9.2, < 2.0.0— Keeps the dependency on the mcp 1.x series which still exportsRequestContext>= 0.2.1, <= 0.3.0— Ensures we use adapter versions compatible with mcp 1.xThis maintains stability until
langchain-mcp-adaptersreleases a version compatible with mcp 2.0.0+.Description
This PR pins version constraints for
langchain-mcp-adaptersandmcpdependencies to prevent compatibility issues.mcpdependency with upper bound constraint< 2.0.0<= 0.3.0tolangchain-mcp-adaptersto prevent breaking changes in future releases