Fix startup break on mcp 2.0.0, bound deps, add fresh-resolution CI - #22
Merged
Conversation
Migrate to mcp SDK 2.x and bound dependencies mcp 2.0.0 removed mcp.server.fastmcp, so every fresh install since 2026-07-28 died at import. FastMCP is now MCPServer; the 47 tool decorators and stdio setup are unchanged. Adds upper bounds to the deps that can repeat this. pydantic floor moves to 2.12.0 to match what mcp 2.x already requires. Fixes #21 @
Add fresh-resolution smoke test Installs a built wheel into a clean venv and runs an MCP stdio handshake against the real entry point. Resolves from pyproject constraints rather than uv.lock, which is the only way to see what users actually get. Checked against the published 1.0.3 wheel: fails with the original traceback. @
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.
@
Fixes #21.
What broke
mcp-ynabdeclaredmcp[cli]>=1.26.0with no upper bound. The MCP Python SDKreleased 2.0.0 on 2026-07-28 and removed
mcp.server.fastmcp. Since resolutionhappens at install time, the unchanged 1.0.3 wheel started failing at import for
everyone installing fresh, before any of our code ran.
Same wheel, only the resolver date differing:
--exclude-newer 2026-07-27ModuleNotFoundError: No module named mcp.server.fastmcpLocal dev and CI both missed it because
uv.lockpinned mcp 1.26.0, anduv sync/uv runinstall from the lock. 1.29.0 and 2.0.0 shipped the sameday and 1.29.0 emits no deprecation warning, so nothing signalled it either.
The fix
FastMCPisMCPServerin 2.x. For this codebase it is a rename: the 47 toolregistrations,
@handle_errors, andmcp.run(transport="stdio")are unchanged,and there is only one import site.
Dependencies now carry upper bounds.
httpxwas the next one positioned to dothis to us: it is 0.x, so a 0.29 can break by convention, 1.0 prereleases are on
PyPI, and upstream development moved to Pydantic under the
httpx2name.aiosqliteis deliberately left unbounded since it is never imported directly.The pydantic floor moves to 2.12.0 to match what mcp 2.x already requires.
Preventing a repeat
scripts/smoke_test.pyinstalls a built wheel into a clean venv with nolockfile and drives the real entry point through an MCP stdio handshake. It
resolves from the declared constraints, which is the only way to see what a user
actually gets.
ci.yml(new): push and PR. The repo previously had no CI except on release.canary.yml(new): weekly fresh resolve against live PyPI, plus alowest-directleg proving the declared floors are installable. Opens anissue on failure. This is the job that should have caught 2.0.0 on 07-28
rather than a user catching it on 07-31.
publish.yml: now gated on the smoke test, not just the locked test run.Verification
uv run pytestuvx --from dist/*.whl mcp-ynabget_user/list_plansagainst real APIget_planwith bad id{"error": ...}string, not a protocol errorThe third row is the one that matters: the new test was checked against the
actually-broken wheel to confirm it fails, not only that it passes on the fix.
@