build: cap mcp dependency to <2 (fixes #235) - #236
Open
DUC750 wants to merge 1 commit into
Open
Conversation
This was referenced Jul 30, 2026
RenanMsV
approved these changes
Aug 9, 2026
RenanMsV
left a comment
There was a problem hiding this comment.
This provides a simple and straightforward way to address the issue until MCP 2.0.0 support is available.
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.
Problem
mcp-proxydeclares an unboundedmcp>=1.27.1.mcp2.0.0 removedrequest_ctxfrommcp.server.lowlevel.server, whichsrc/mcp_proxy/proxy_server.pyimports at module load. As a result, any fresh resolution (uvx mcp-proxy, a cleanpip install, or a Docker rebuild) pullsmcp==2.0.0and crashes on startup:This matches the report in #235.
Fix
Cap the dependency at
mcp>=1.27.1,<2so resolution stays on the 1.x line that still providesrequest_ctx. This is the minimal change that restores a working install; it does not add support formcp2.x (that would require migratingproxy_server.pyoff the removedrequest_ctxAPI and can be a follow-up). The cap can be lifted/raised once the code targets the 2.x request-context API.Verified locally (alpine 3.24, Python 3.14, mcp-proxy 0.12.0):
mcp==2.0.0→import mcp_proxy.proxy_serverraises the ImportError abovemcp==1.29.0→ import succeedsCloses #235.