Skip to content

chore(deps): update fastmcp requirement from <4.0.0,>=3.0.0 to >=3.0.0,<5.0.0 - #1119

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/fastmcp-gte-3.0.0-and-lt-5.0.0
Closed

chore(deps): update fastmcp requirement from <4.0.0,>=3.0.0 to >=3.0.0,<5.0.0#1119
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/fastmcp-gte-3.0.0-and-lt-5.0.0

Conversation

@dependabot

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

Copy link
Copy Markdown
Contributor

Updates the requirements on fastmcp to permit the latest version.

Release notes

Sourced from fastmcp's releases.

v4.0.3: Once Is Enough

Multi-server clients with legacy-only backends now avoid unnecessary startup retries, and tools returning unconstrained sequences no longer send images twice. This patch also fixes task timing values rejected by strict clients and cleans up unfinished Monty callbacks when execution ends.

What's Changed

Enhancements ✨

Fixes 🐞

Docs 📚

New Contributors

Full Changelog: PrefectHQ/fastmcp@v4.0.2...v4.0.3

Changelog

Sourced from fastmcp's changelog.


title: "Changelog" icon: "list-check" rss: true tag: NEW

v4.0.3: Once Is Enough

Multi-server clients with legacy-only backends now avoid unnecessary startup retries, and tools returning unconstrained sequences no longer send images twice. This patch also fixes task timing values rejected by strict clients and cleans up unfinished Monty callbacks when execution ends.

Enhancements ✨

Fixes 🐞

Docs 📚

  • docs: point What's New at the changelog for later releases by @​zzstoatzz in #4992
  • docs: attribute the back-channel removal to SEP-2322/2575, not SEP-2577 by @​zzstoatzz in #4988

New Contributors

Full Changelog: v4.0.2...v4.0.3

v4.0.2: Root Access

ClientGroup is now importable from the package root, from fastmcp import ClientGroup, with the same lazy export and install hint as Client, so integrations no longer couple to FastMCP's internal module layout.

Enhancements ✨

Fixes 🐞

Docs 📚

Full Changelog: v4.0.1...v4.0.2

... (truncated)

Commits
  • 7129236 Add v4.0.3 changelog entries (#5007)
  • f79bc82 chore: Update SDK documentation (#4945)
  • 6e0859f fix task timing field serialization (#5003)
  • 855cb7a Clarify release title history lookup (#5006)
  • 6236ac1 Clean up unfinished Monty callbacks (#5005)
  • 6c2fbe7 docs: attribute the back-channel removal to SEP-2322/2575, not SEP-2577 (#4988)
  • e68bacc perf: avoid duplicate startup for mixed-era backends (#4971)
  • 032b9f6 fix: don't infer an output schema for unconstrained sequences (#4999)
  • 75d50ff ci: deploy docs through Mintlify's admin API and wait for a verdict (#4996)
  • a338cfb docs: point What's New at the changelog for later releases (#4992)
  • Additional commits viewable in compare view


Note

Low Risk
Single-line dependency bound change with no code changes; main risk is potential fastmcp 4.x API or behavior differences affecting MCP integrations at install time.

Overview
Relaxes the core fastmcp pin in pyproject.toml from >=3.0.0,<4.0.0 to >=3.0.0,<5.0.0, so installs can resolve fastmcp 4.x (including recent patch releases) while keeping the existing 3.x floor for MCP support.

No application code changes—only the dependency constraint that governs what pip may install with openenv.

Reviewed by Cursor Bugbot for commit 35575d2. Bugbot is set up for automated code reviews on this repo. Configure here.

@dependabot dependabot Bot added Dependencies python:uv Pull requests that update python:uv code labels Sep 8, 2026
@burtenshaw burtenshaw added enhancement New feature or request size: small Small pull request labels Sep 8, 2026 — with Cursor
@bot-ci-comment

bot-ci-comment Bot commented Sep 8, 2026

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alignment Review Report

TL;DR: This one-line bump widens fastmcp to >=3.0.0,<5.0.0, which resolves to fastmcp 4.0.3 — a major release (MCP Python SDK v2, httpxhttpx2, pydantic 2.13, fastapi 0.141). I verified locally that fastmcp 4.x regresses a core OpenEnv feature — MCP session-state persistence — breaking 2 of the 3 tests in TestMCPSessionTransportPersistence that pass on fastmcp 3.4.7. Recommendation: do not merge as-is; either hold the <4.0.0 cap or migrate the MCP layer first (details below).

Automated Checks

  • Lint: PASS for this diff. ruff check src/ tests/ passes. The format hook flags only pre-existing drift under envs/** (and README code-fences it reformats as a side effect) — nothing in src//tests/. This PR touches no Python, so lint is unaffected by the change.
  • Debug code: FOUND but all pre-existing (print(...)/TODO in src/…) and unrelated to this diff (no .py files changed).

Open RFCs Context

  • All RFCs are In Review (010 is Draft). Directly relevant: RFC 003 — MCP Support (@Darktex, @pankit-eng). MCP is the sole agent-facing interface (PRINCIPLES.md “MCP as universal standard”; INVARIANTS.md “Dual API boundary”), so the MCP-engine major version is alignment-sensitive.

Tier 1: Fixes Required

  • pyproject.toml:32 — Widening to <5.0.0 resolves to fastmcp 4.0.3, which breaks core tests (functional regression, not style):

    • tests/core/test_production_mode_routes.py::TestMCPSessionTransportPersistence::test_http_session_mcp_state_persists_across_calls
    • tests/core/test_production_mode_routes.py::TestMCPSessionTransportPersistence::test_websocket_mcp_state_persists_across_calls

    Evidence (same tree, only fastmcp version swapped):

    fastmcp TestMCPSessionTransportPersistence
    3.4.7 3 passed
    4.0.3 2 failed (inc_counter returns 1 on the 2nd call instead of 2 — session state not retained)

    Root cause: FastMCP 4's Client now defaults to mode="auto" (the sessionless modern protocol era). OpenEnv's MCPEnvironment.mcp_session() (src/openenv/core/env_server/mcp_environment.py) depends on a persistent FastMCP Client session for ctx.set_state/ctx.get_state. The official 3→4 upgrade guide states that code relying on session state must pin Client(mode="legacy").

    Also observed: FastMCPDeprecationWarning at src/openenv/core/env_server/mcp_environment.py:111Tool.inputSchema was renamed to .input_schema under SDK v2 (bridged with a warning in 4.x; will hard-break in 5.x).

    Note: there is no mechanical one-line fix inside this diff — resolving it is a design decision (see Tier 2 / Recommendation).

Tier 2: Alignment Discussion

Principle Conflicts

ALIGNMENT FLAG: Allowing fastmcp 4.x silently changes agent↔environment interaction semantics (loss of MCP session state)

  • Principle/RFC at stake: RFC 003 (MCP as universal standard); PRINCIPLES.md “Minimize lifecycle deltas” + “Production-readiness from day one”; INVARIANTS.md “Dual API boundary”.
  • The concern: MCP is the only agent-facing interface. Losing session persistence across MCP calls changes runtime behavior for every stateful MCP env (per-episode counters/context), and it would land silently through a dependency range rather than a reviewed code change — a lifecycle-delta / production-readiness risk.
  • Suggested reviewer: @Darktex (git blame: authored the MCP rows in PRINCIPLES.md/INVARIANTS.md and RFC 003) and @pankit-eng (RFC 003 co-author); also loop in the owner of the MCP session adapter + persistence tests (git blame author swappy).

RFC Conflicts

  • No RFC proposes adopting MCP SDK v2 / fastmcp 4.x. Because RFC 003 is In Review and defines MCP as the universal agent interface, moving to a new MCP-engine major version is exactly the kind of change that should be reconciled with (or noted in) RFC 003 rather than arriving via an unpinned range.

Recommendation

Two viable paths:

  1. Hold the cap at fastmcp>=3.0.0,<4.0.0 until a deliberate migration (close this Dependabot PR or convert it to a tracking issue).
  2. Migrate the MCP layer first, then widen: pin Client(mode="legacy") (or otherwise restore session persistence under SDK v2), switch Tool.inputSchema.input_schema, move the two except httpx.… handlers (envs/calendar_env/server/handlers/tool_handlers.py, envs/opencode_env/sandbox/hf.py) to httpx2, and re-run the MCP suite green.

Heads-up: several env pyproject.tomls already declare fastmcp>=2.0.0/>=3.0.0 with no upper bound, so they can independently resolve 4.x today — a coordinated migration is worthwhile regardless of this PR.

Summary

  • 1 blocking issue — fastmcp 4.x regresses MCP session persistence (2 failing core tests); decision needed: hold cap vs. migrate.
  • 2 alignment points for human review — MCP semantics change via a dependency range; reconcile with RFC 003.
  • 0 unrelated Tier-1 lint/debug issues introduced by this diff.
Open in Web View Automation 

Sent by Cursor Automation: Pre-review

Comment thread pyproject.toml
"websockets>=15.0.1",
# MCP support
"fastmcp>=3.0.0,<4.0.0",
"fastmcp>=3.0.0,<5.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<5.0.0 resolves to fastmcp 4.0.3 (MCP SDK v2 / httpx2). I verified this breaks MCP session-state persistence: TestMCPSessionTransportPersistence is 3 passed on fastmcp 3.4.7 but 2 failed on 4.0.3 (ctx.set_state/ctx.get_state no longer persist across calls).

Root cause: FastMCP 4's Client defaults to sessionless mode="auto"; MCPEnvironment.mcp_session() relies on a persistent session and would need Client(mode="legacy") per the 3→4 upgrade guide.

Suggest keeping <4.0.0 until the MCP layer is migrated (also: Tool.inputSchema.input_schema, and httpxhttpx2).

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking at head fa8d5eb4f7576835b480840586cde1fc82904f0b: allowing FastMCP 4.0.3 breaks MCP session-state persistence in both supported test matrices (test_http_session_mcp_state_persists_across_calls and test_websocket_mcp_state_persists_across_calls). Keep the <4.0.0 cap for this release. A separate migration should explicitly preserve legacy session semantics, update the renamed tool schema API, and validate the MCP transport before widening the major-version range.

Open in Web View Automation 

Sent by Cursor Automation: Release

@dependabot
dependabot Bot force-pushed the dependabot/uv/fastmcp-gte-3.0.0-and-lt-5.0.0 branch from fa8d5eb to 37fb4ed Compare September 9, 2026 08:15

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 37fb4ed. Configure here.

Comment thread pyproject.toml
"websockets>=15.0.1",
# MCP support
"fastmcp>=3.0.0,<4.0.0",
"fastmcp>=3.0.0,<5.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FastMCP 4 breaks MCP integration

High Severity

Widening fastmcp to &lt;5.0.0 lets installs pick FastMCP 4, which uses MCP SDK v2 and a sessionless protocol. Tool listing still reads inputSchema and silently substitutes {} when that attribute is absent, so agents see tools with empty schemas. Client is also created without mode="legacy", so the held-session path no longer preserves FastMCP ctx state across HTTP calls.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 37fb4ed. Configure here.

@dependabot
dependabot Bot force-pushed the dependabot/uv/fastmcp-gte-3.0.0-and-lt-5.0.0 branch from 37fb4ed to b0894c8 Compare September 9, 2026 08:47
Updates the requirements on [fastmcp](https://github.com/PrefectHQ/fastmcp) to permit the latest version.
- [Release notes](https://github.com/PrefectHQ/fastmcp/releases)
- [Changelog](https://github.com/PrefectHQ/fastmcp/blob/main/docs/changelog.mdx)
- [Commits](PrefectHQ/fastmcp@v3.0.0...v4.0.3)

---
updated-dependencies:
- dependency-name: fastmcp
  dependency-version: 4.0.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/uv/fastmcp-gte-3.0.0-and-lt-5.0.0 branch from b0894c8 to 35575d2 Compare September 9, 2026 12:56
@cursor cursor Bot mentioned this pull request Sep 9, 2026
21 tasks

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking at current head 35575d239cf7cce1716c494f9a58fc5da26ca190: the exact-head Python 3.11 and 3.12 test jobs both fail after resolving FastMCP 4.x, confirming the previously reproduced MCP session-persistence regression. Keep the <4.0.0 cap, or land a deliberate migration that preserves session state and passes the MCP transport suite before widening the range.

Open in Web View Automation 

Sent by Cursor Automation: Release

@dependabot @github

dependabot Bot commented on behalf of github Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/uv/fastmcp-gte-3.0.0-and-lt-5.0.0 branch September 10, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dependencies enhancement New feature or request python:uv Pull requests that update python:uv code size: small Small pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant