Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions changelog.d/2207-pin-mcp-below-v2.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- `requirements/base.txt:85` — pinned `mcp` to `>=1.28.1,<2` (was unbounded).
Dependabot's `mcp>=2.0.0` bump (#2207) hit `pip`'s resolver as
`resolution-too-deep`: `pydantic-ai-slim[mcp]`'s `fastmcp-slim` dependency
caps `mcp<2.0` across its entire published range, so the unbounded pin was
resolving to 1.x only by transitive accident. `mcp` 2.0 is also a breaking
rewrite — `mcp.server.lowlevel.Server` drops decorator-based handler
registration (`@mcp_server.list_resources()` etc.) in favor of `on_*=`
constructor kwargs with a new `(ctx, params)` handler signature — which
`opencontractserver/mcp/server.py` does not yet speak (10 registration
sites across `create_mcp_server()` and `create_scoped_mcp_server()`), so
forcing the bump would fail at ASGI import time, not just in CI. PR #2207
is left open/unmerged; revisit the `mcp` 2.x migration as its own scoped
task once `fastmcp-slim` ships v2 support.
9 changes: 8 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ posthog==7.33.0 # https://github.com/posthog/posthog-python

# Model Context Protocol
# ------------------------------------------------------------------------------
mcp>=1.28.1 # https://github.com/anthropics/python-sdk
mcp>=1.28.1,<2 # https://github.com/modelcontextprotocol/python-sdk
# ^ pydantic-ai-slim[mcp] -> fastmcp-slim caps mcp<2.0 across its whole
# published range as of 2026-08; mcp 2.0 is a breaking rewrite (decorator-based
# handler registration on mcp.server.lowlevel.Server removed in favor of
# on_*= constructor kwargs) that opencontractserver/mcp/server.py does not yet
# speak. Bump this pin only alongside a migration of that file, once
# fastmcp-slim ships v2 support (or fastmcp-slim/mcp is dropped in favor of
# calling the v2 API directly).

# Not directly required, pinned by Snyk to avoid a vulnerability
# ------------------------------------------------------------------------------
Expand Down