Repository navigation
fix: pin mcp[cli] below 2.0 in pyproject.toml too - #35
Conversation
requirements.txt already caps mcp[cli] at <2.0 (mcp 2.0 removed the APIs jmcp.py uses), but pyproject.toml still asked for >=1.12.2, so installing the package itself (pip install git+..., uvx --from git+... junos-mcp-server) resolves mcp 2.3.0 and the server fails at @app.call_tool(). Match the cap; uv.lock only changes its requires-dist line.
|
Thanks for the fix. The two changed lines are correct: I verified A few things before merge, and some optional follow-ups. Please address in this PR
Optional, but worth considering here or in a follow-up
|
…lock mcp Matches requirements.txt. uv lock --upgrade-package mcp (plus pydantic, pydantic-core, starlette) moves the lock from mcp 1.12.2 to 1.30.0 so uv run, pip install . and uvx resolve the same mcp, and the lock no longer depends on pydantic 2.11.x for mcp to import.
|
Thanks @nileshsimaria, very thorough review. Pushed 69dface:
|
|
Hi @nileshsimaria, when you have a moment, could you take another look? Everything from your "please address in this PR" list is in 69dface (paramiko cap, comment placement, refreshed lock). The branch is still mergeable. |
|
Thanks for the fix. The pyproject.toml change itself looks right and I'm happy to take it. A few things before merge:
Separately, and not blocking this PR: the underlying problem is that pyproject.toml and requirements.txt are hand-synced, and CI only exercises requirements.txt. I'd welcome a follow-up that either adds a |
Per review: the lock goes back to the 37a33f2 state (mcp 1.12.2 and the other pins unchanged, original lock revision), so the only lock change is the mcp requires-dist line. The paramiko <4 cap is dropped from pyproject.toml.
|
Thanks for the careful review. All three are done in 1eee572:
The PR is now just the |
|
Thanks for your contribution. The patch looks great. |
|
Thanks for the careful review and the merge, @nileshsimaria. The lockfile and paramiko points were fair catches. If you'd like the follow-up you mentioned (a |
Problem
The commit "fix: pin mcp[cli] below 2.0 to unbreak CI" capped
mcp[cli]inrequirements.txt(>=1.12.2,<2.0, with the comment that mcp 2.0 removedServerSessionT/streamablehttp_client).pyproject.tomlstill asks formcp[cli]>=1.12.2.The README and the Dockerfile install from
requirements.txt, anduv runusesuv.lock(1.12.2), so those paths are fine. Butpyproject.tomldefines thejunos-mcp-serverconsole script, and installing the package itself resolves fresh:mcpto (uv pip compile, Python 3.12)pyproject.tomlon main2.3.0, so the server fails at@app.call_tool()(jmcp.py:1792), because the low-levelServerdecorators are gone in 2.x1.30.0That covers
pip install git+https://github.com/Juniper/junos-mcp-serveranduvx --from git+https://github.com/Juniper/junos-mcp-server junos-mcp-server.Change
mcp[cli]>=1.12.2,<2.0inpyproject.toml, the same boundrequirements.txtalready has.uv.lockchanges only its matchingrequires-distline: no locked versions change, anduv lock --checkpasses.Checked
uv lock --checkpasses.