You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP extra floor mcp>=1.17.0 admits versions that cannot import with current pydantic #95
pyproject.toml declares mcp>=1.17.0,<2 for the MCP extra, but the lower end of that range cannot be imported with the pydantic that resolves today, so the extra resolves to something broken for anyone who pins a version inside it (or whose resolver lands there for another reason).
Reproduction, Python 3.11.2, pydantic==2.14.1, in a clean venv:
pip install 'mcp==1.17.0'
python -c "import mcp.server.lowlevel"
ImportError: cannot import name 'eval_type_backport' from 'pydantic._internal._typing_extra'
at mcp/server/fastmcp/utilities/func_metadata.py:17
Same for mcp==1.20.0. 1.22.0 imports and runs the adapter suite (64 passed), and so do 1.26.0 and 1.30.0.
mcp
import with pydantic 2.14.1
1.17.0
ImportError
1.20.0
ImportError
1.22.0
ok
1.26.0
ok
1.30.0
ok
It is upstream (mcp's fastmcp module imports a pydantic internal that was removed), so the options are:
Raise the floor to mcp>=1.22.0,<2 — one line, makes the declaration honest, and matches what the test-mcp-v1 CI job can actually verify.
Keep >=1.17.0 and add a pydantic<2.12 pin for that range — more coupling than the compatibility is worth.
Context: found while reviewing #85, whose _compat.py comment claims the v1 interception is "stable across the v1 range we support". The mechanism itself is fine — request_handlers[CallToolRequest] interception passes on 1.22.0, 1.26.0 and 1.30.0 — but the range statement in pyproject.toml is wider than the range that installs. Nothing in CI notices because mcp>=1.17,<2 always resolves to the newest 1.x.
No action needed for #85; this is the packaging side of the same question.
Activity
docs: MCP extra floor is 1.22.0 (#95)
docs: MCP extra 下限为 1.22.0(#95)
fix: raise the MCP extra floor to 1.22.0 (#95)