Skip to content

chore(deps): update mcp requirement from <2,>=1.28.1 to >=2.2.0,<3 - #2334

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/mcp-gte-2.2.0-and-lt-3
Open

chore(deps): update mcp requirement from <2,>=1.28.1 to >=2.2.0,<3#2334
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/mcp-gte-2.2.0-and-lt-3

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 10, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on mcp to permit the latest version.

Release notes

Sourced from mcp's releases.

v2.2.0

pip install -U mcp. Docs: https://py.sdk.modelcontextprotocol.io/

A few defaults changed in this release. If you run a server or client on 2.x, skim these first:

Behaviour changes

HTTP client redirects are only followed within the endpoint's origin (#3397)

  • Client("https://..."), streamable_http_client and sse_client follow a redirect only if it stays on the same scheme, host and port (or upgrades http to https on the same host).
  • A redirect anywhere else is not followed: the call fails with MCPError and the session stays usable (an SSE connect fails with httpx2.HTTPStatusError). If that other URL is the server you meant, use it as the endpoint URL.
  • The follow_redirects setting on an httpx2.AsyncClient you pass in is no longer used for MCP requests, so you don't need it for the trailing-slash redirect any more.
  • The OAuth providers apply the same rule to their own requests.

Idle Streamable HTTP sessions now expire (legacy <=2025-11-25 spec( (#3395)

  • A stateful session with nothing in flight for 30 minutes is closed. The client's next request gets a 404 and it has to initialize again.
  • Clients that keep the GET stream open (the SDK's Client does) are not affected. Neither are stateless servers or 2026-07-28 connections.
  • A server also holds at most 10 000 sessions at once; beyond that, new sessions get a 503.
  • To turn either off: mcp.run(transport="streamable-http", session_idle_timeout=None, max_sessions=None) (also on streamable_http_app() and run_streamable_http_async()).

The OAuth client checks the authorization server's issuer on the legacy path too (#3398)

  • For servers without protected resource metadata, authorization server metadata whose issuer isn't the server's own origin is now rejected with OAuthFlowError: Authorization server metadata issuer mismatch. The protected-resource-metadata path has done this since 2.0.
  • A 403 that isn't an insufficient_scope challenge is returned to the caller instead of retried.
  • If protected resource metadata can't be fetched because of a 5xx/429, the flow now stops instead of falling back to the legacy endpoints.

Two new MCPDeprecationWarnings (#3435, #3447)

  • ClientCredentialsOAuthProvider / PrivateKeyJWTOAuthProvider without issuer=. Pass your authorization server's issuer URL; 3.0 will require it.
  • AuthSettings with resource_server_url set but validate_token_resource unset. Set it to True or False; 3.0 defaults it to True.
  • Both keep working as before in 2.x; this mostly matters if your tests turn warnings into errors.

New

  • AuthSettings.validate_token_resource: only accept tokens your TokenVerifier reports as issued for this server (#3447).
  • issuer= on ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider (#3398).
  • session_idle_timeout= and max_sessions= on the Streamable HTTP server entry points (#3395).

Fixes

  • A client DELETE frees its session immediately, and a refused opening request no longer leaves a session behind (#2455, #3228, #3300).
  • $refs in a tool's outputSchema resolve within that schema only; an unresolvable one surfaces as RuntimeError: Invalid schema for tool ... (#3394).

Known gaps

The tasks extension (SEP-2663), DPoP (SEP-1932) and the jwt-bearer grant are not implemented yet; https://github.com/modelcontextprotocol/python-sdk/blob/main/ROADMAP.md tracks them.

What's Changed

... (truncated)

Commits
  • 9972c21 Replace RootModel wrappers with type aliases and TypeAdapter validation (#3470)
  • fd66270 docs: refresh translations, and translate pages in parallel (#3458)
  • 08a3bc8 docs: ask for AI disclosure on comments too (#3459)
  • 7bb486a docs: stop presenting the in-memory client as the way to connect (#3443)
  • 0c91368 Add AuthSettings.validate_token_resource to check a bearer token's resource (...
  • 9771e6b Keep following a relative redirect when the endpoint URL carries userinfo (#3...
  • a925e55 Bump the locked versions of eight dev and test dependencies (#3449)
  • e8b9486 Bump pymdown-extensions from 11.0 to 11.0.1 (#3285)
  • c6762e8 Follow redirects only within the MCP endpoint's origin (#3397)
  • 5fd3abc Skip automatic docs previews for fork PRs and drop the setup-uv retry steps (...
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [mcp](https://github.com/modelcontextprotocol/python-sdk) to permit the latest version.
- [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases)
- [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md)
- [Commits](modelcontextprotocol/python-sdk@v1.28.1...v2.2.0)

---
updated-dependencies:
- dependency-name: mcp
  dependency-version: 2.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Sep 10, 2026
@claude

claude Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review

This is an automated Dependabot bump of mcp from >=1.28.1,<2 to >=2.2.0,<3. This should not be merged as-is — it directly contradicts a pre-existing pin comment in the same file (requirements/base.txt:84-90, unchanged by this PR):

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...

Findings

  1. Breaking API usage confirmed in-repo. opencontractserver/mcp/server.py uses exactly the decorator-based registration pattern the comment warns is removed in mcp 2.0:

    • @mcp_server.list_resources() / @mcp_server.list_tools() (lines ~758, 798, 1397, 1413)
    • mcp_server.call_tool()(call_tool_handler) (line 1025)
    • @scoped_server.call_tool() (line 1418)

    Both the module-level server (mcp_server = Server("opencontracts")) and the per-corpus scoped server (scoped_server = Server(f"opencontracts-corpus-{corpus_slug}")) rely on this API. If mcp 2.0's Server.list_tools()/call_tool() decorators are indeed gone, this file will fail at import/registration time, taking down both the stdio MCP entrypoint and the scoped-per-corpus HTTP/SSE servers.

  2. Likely unresolvable as a standalone bump anyway. requirements/base.txt:59 pins pydantic-ai-slim[openai,anthropic,google,mcp]>=1.107.5,<2, which pulls in fastmcp-slim. Per the existing comment, fastmcp-slim caps mcp<2.0 across its whole published range, so this PR's mcp>=2.2.0 may not even resolve without a corresponding fastmcp-slim/pydantic-ai-slim update — worth confirming pip-compile/pip install actually succeeds with this change before merging.

  3. No corresponding code migration in this PR. The diff touches only requirements/base.txt (1 line). Per the comment's own instructions ("bump this pin only alongside a migration of that file"), a version bump this large needs a companion migration of opencontractserver/mcp/server.py to the new on_*= constructor-kwarg API, plus test coverage for both the module-level and scoped MCP servers.

Recommendation

Close or hold this PR until opencontractserver/mcp/server.py is migrated to the mcp 2.x API (and fastmcp-slim/pydantic-ai-slim are confirmed compatible). Merging as-is risks breaking the MCP server entrypoints in production. Consider adding this dependency to Dependabot's ignore list for major-version bumps (ignore: dependency-name: mcp, versions: [">=2"]) until the migration lands, to avoid repeated auto-generated PRs against a documented blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants