Packages
FastMCP v4.2.6: CodeModeClient, OAuth Proxy Security Fixes (GHSA-78c8) & MCP 2026 Upgrade Guide
Prefect's FastMCP v4.2.6 shipped on November 25, 2026—introducing an experimental CodeModeClient for cross-server tool chaining alongside recent OAuth proxy security patches (GHSA-78c8-3jhx-5mg7) and the MCP 2026-07-28 Skills workflow. Here is the version telemetry, breaking-change diff, and safe upgrade checklist.
8 min read
FastMCP v4.2.6: CodeModeClient, OAuth Proxy Security Fixes (GHSA-78c8) & MCP 2026 Upgrade Guide
Executive Summary
On November 25, 2026, Prefect released fastmcp v4.2.6 ("Turn of Events") on PyPI and GitHub—followed immediately by pre-release 4.2.7a1—continuing a rapid November release cadence across the Python Model Context Protocol (MCP) ecosystem (FastMCP Updates; PyPI fastmcp). Built on the mcp 2.x Python SDK and the 2026-07-28 stateless MCP specification, fastmcp v4.2.6 (verified November 26, 2026, Apache-2.0 license, Python 3.11+) introduces an experimental CodeModeClient for client-side tool discovery and cross-server execution, OpenTelemetry network protocol attributes on server spans, and tighter max_size serialization bounds on response truncation (FastMCP Updates; Fastero).
- Primary AI & Agentic Relevance:
CodeModeClientwraps anyClientorClientGroupso LLM agents receivesearch,schema, andexecutemeta-tools—even when connecting to upstream MCP servers that do not expose server-side CodeMode—allowing a singleexecuteblock to chain tools across multiple servers (FastMCP Updates). - Primary Upgrade & Security Takeaway: Teams running earlier
4.xreleases should upgrade tofastmcp >= 4.2.6(and upgradeopentelemetry-sdkalongside it if installed) to pick up the v4.2.4 OAuth proxy double-redemption race fix (GHSA-78c8-3jhx-5mg7) and v4.2.1 JWTnbf, issuer-pinning, andopentelemetry-apiReDoS protections (FastMCP Updates).
Adoption Telemetry & Version Changelog
Maintained by Prefect, fastmcp has grown from a 2024 wrapper—whose 1.0 codebase was incorporated into the official mcp Python SDK before diverging when mcp 2.0 renamed its server class to MCPServer—into the dominant high-level Python framework for production MCP servers and clients (PyPI fastmcp; Fastero).
| Metric / Attribute | Verified Value (As of Nov 26, 2026) | Source & Caveats |
|---|---|---|
| Latest Stable Release | v4.2.6 (Nov 25, 2026); v4.2.7a1 pre-release (Nov 25, 2026) |
FastMCP Updates; PyPI fastmcp |
| GitHub Stars | 28.8k stars (PrefectHQ/fastmcp) |
FastMCP Homepage (28,218 recorded Oct 27, 2026) |
| PyPI Download Volume | ~1 million downloads / day | PyPI fastmcp (note: every fastmcp install also pulls mcp, so counts overlap per Fastero) |
| Release Velocity | 11 releases in last 30 days (~1.5-day typical gap) | VCT Release Tracker |
| Contributor Breadth | 28 contributors on 4.2.6 (12 first-time); 129 on 4.2.0 |
FastMCP Updates |
| Runtime & License | Python 3.11+ (full Python 3.15 support since 4.1.0), Apache-2.0 |
FastMCP Updates; Fastero |
Key November 2026 Release Milestones (4.2.0 → 4.2.6)
- **
v4.2.0(Nov 13, 2026 — "Mad Skills"):** PromotedSkillto an immutable value object validated at build time, introducedSkillCatalogProvider,SkillsDirectoryProvider, andSkillManifestProvider(lazy bucket/DB loading without re-hashing every file per request), and addedClient.read_skill()with size/digest verification andto_directory()export (FastMCP Updates). v4.2.1(Nov 17, 2026): Hardened OAuth/JWT validation (nbfenforcement,required_scopespreservation, pre-registered client issuer pinning) and bumped theopentelemetry-apidependency floor past atraceparentReDoS vulnerability (FastMCP Updates).v4.2.3&v4.2.4(Nov 20, 2026): Added opt-inparent_task_spansfor unified worker/request traces (fastmcp-tasksnow requirespydocket>=0.29.1) and patchedGHSA-78c8-3jhx-5mg7alongside revoked-token re-validation fixes (FastMCP Updates).v4.2.5(Nov 23, 2026): Addedsubscriptions/listenon2026-07-28connections, opt-inUsageMiddlewareemittingmcp.server.operation.durationOpenTelemetry histograms, and the experimentalSEP-3415Events extension (fastmcp.experimental.events) (FastMCP Updates).v4.2.6(Nov 25, 2026): Shipped experimentalCodeModeClient, OpenTelemetrynetwork.transport/network.protocol.name/network.protocol.versionserver span attributes, namespaced resource links for mounted servers, and serializedmax_sizeenforcement on response truncation (FastMCP Updates).
Security Patches, Breaking Changes & Internals
For production maintainers managing pyproject.toml or requirements.txt, the 4.2.x cycle includes critical OAuth security patches, dependency floor bumps, and upcoming 4.3 removals that require explicit testing before upgrading.
1. Security Advisories & Dependency Floors
GHSA-78c8-3jhx-5mg7(Fixed inv4.2.4): Resolved a race condition in the OAuth proxy where two concurrent token requests could redeem the same authorization code or refresh token twice. In addition, a revoked proxy access token can no longer re-validate after a refresh (FastMCP Updates).- JWT, Consent &
opentelemetry-apiHardening (v4.2.1): JWTs are now strictly rejected before theirnbf(not-before) timestamp,required_scopessurvive custom verifiers, andopentelemetry-apiis floored above atraceparentregular-expression denial-of-service (ReDoS) issue. When usingrequire_authorization_consent="remember", users will be prompted for consent once more per client after upgrading (FastMCP Updates). - Upstream Auth & TLS Floors (
v4.1.3,v4.1.7):v4.1.7bumpedjoserfcandAuthlibminimum versions for security fixes and tightened raw redirect URI normalization, whilev4.1.3updatedcertifi-backed dependencies following the eMudhra CA compromise (FastMCP uses system trust by default, so OS and container trust stores must also be updated) (FastMCP Updates).
2. Breaking Changes & v4.3 Deprecation Warnings
- Skills Provider Migration (
v4.2.0→v4.3): Direct imports of4.1skills providers continue to work in4.2.xbut emit deprecation warnings ahead of removal in4.3. Migrate directory loading tofrom fastmcp.skills.provider import SkillsDirectoryProviderand single-skill catalogs toSkill.from_directory(...)withSkillCatalogProvider. Wire metadata payloads now useMCPSkillrather thanSkill(FastMCP Updates). - Python 3.11+ Floor &
mcp2.x Namespace: Since4.2.0a4, FastMCP strictly requires Python 3.11 or newer (dropping Python 3.10). Meanwhile, if any legacy code still importsfrom mcp.server.fastmcp import FastMCP, note thatmcp2.x renamed that built-in class toMCPServer—whereas the standalonefastmcppackage preservesfrom fastmcp import FastMCP(FastMCP Updates; Fastero). - OpenAPI Strict Validation &
ResponseLimitingMiddleware: Under strict validation, OpenAPI tools now reject undeclared arguments and return validation errors rather than 500 server errors for missing required path parameters (4.2.3), whileResponseLimitingMiddlewarein4.2.6enforcesmax_sizeagainst the serialized payload (FastMCP Updates).
3. CodeModeClient & Modern v4.2.6 Usage
Instead of stuffing dozens of verbose JSON tool schemas into an LLM's context window, CodeModeClient wraps a Client or ClientGroup and exposes just three meta-tools (search, schema, and execute) on the client side—allowing an agent to discover tools dynamically and chain calls across multiple MCP servers in a sandboxed execute block (FastMCP Updates):
from typing import Annotated
from fastmcp import FastMCP, Client
from fastmcp.dependencies import Depends
mcp = FastMCP("OrdersGateway")
def get_db_dsn() -> str:
return "postgresql://readonly@db.internal/orders"
# Annotated dependency injection keeps internal config out of the LLM tool schema
@mcp.tool
def lookup_order(
order_id: str,
dsn: Annotated[str, Depends(get_db_dsn)],
) -> dict[str, str]:
"""Return status metadata for an order ID."""
return {"order_id": order_id, "status": "shipped", "source": dsn.split("@")[-1]}
For clients consuming multiple servers with CodeModeClient (experimental in v4.2.6), wrap your ClientGroup so the agent receives search, schema, and execute meta-tools without requiring server-side CodeMode support (FastMCP Updates).
4. Stateless 2026-07-28 Protocol & SkillManifestProvider Architecture
One reason fastmcp 4.x has seen rapid adoption is its dual-era protocol negotiation: a single FastMCP 4 deployment answers both the stateless 2026-07-28 MCP specification (which removes the startup handshake and session IDs for serverless and edge deployments) and older session-based handshake clients per connection (FastMCP Updates; The AI Career Lab). For stateful tools running over the sessionless protocol, FastMCP 4 provides UserSession and SessionId request-state keys alongside fastmcp-tasks (pydocket>=0.29.1) for background execution.
On the agent-context side, v4.2.0a5 and v4.2.0 introduced SkillManifestProvider and SkillCatalogProvider so servers can answer skills/list using lightweight frontmatter manifests (plus each file's SHA digest and byte size) without loading or re-hashing every skill file on every request. Files are only fetched from object storage or a database when a client explicitly invokes Client.read_skill()—which verifies every file's size and digest before to_directory() writes the skill into an agent's local folder (FastMCP Updates).
Ecosystem Comparison & Upgrade Checklist
Choosing between fastmcp (v4.2.6), fastmcp-slim, and the Official mcp Python SDK (v2.3.0) depends on whether you need batteries-included auth/proxying or a minimal dependency tree (Fastero; FastMCP Updates).
| Feature / Dimension | fastmcp (v4.2.6) |
fastmcp-slim (v3.3.0+) |
Official mcp SDK (v2.3.0) |
|---|---|---|---|
| Maintainer & License | Prefect (Apache-2.0) |
Prefect (Apache-2.0) |
Model Context Protocol (MIT) |
| Minimum Python | Python 3.11+ (3.15 supported) | Python 3.11+ | Python 3.10+ (Fastero) |
| Server Stack | Full (Starlette, Uvicorn, OpenAPI, Proxies, Mounts) |
Client & transport only (no Starlette/Uvicorn) | Core MCPServer + protocol primitives |
| Auth & OAuth Proxy | Built-in OAuth 2.1 proxy, CIMD, issuer pinning, GHSA-78c8 fix |
Client-side auth & transports | Basic protocol auth primitives |
| Middleware & Composition | UsageMiddleware, ResponseLimitingMiddleware, AuthMiddleware, transforms |
N/A (client/CI/agent footprint) | Manual wiring |
Skills & CodeModeClient |
SkillCatalogProvider, SkillsDirectoryProvider, CodeModeClient |
Client-side transport & skill consumption | Not bundled |
Safe Upgrade & Pinning Steps
- Pin
fastmcp>=4.2.6,<4.3.0: Avoid surprise4.3removals of legacy4.1skills providers while locking inGHSA-78c8-3jhx-5mg7and4.2.6serialization fixes. - Co-Upgrade
opentelemetry-sdk: If your environment includesopentelemetry-sdk, upgrade both packages together (pip install -U fastmcp opentelemetry-sdkoruv add "fastmcp>=4.2.6,<4.3.0" opentelemetry-sdk) to satisfy the4.2.1opentelemetry-apifloor (FastMCP Updates). - Update
pydocketfor Background Tasks: If you use@mcp.tool(task=True)viafastmcp-tasks, verifypydocket>=0.29.1is resolved in your lockfile (4.2.3) (FastMCP Updates). - Test Mounted Resource Links &
SkillsDirectoryProvider: Verify that any mounted server tools returning resource links handle the new automatic mount namespacing introduced in4.2.6, and replace any4.1skills provider imports before4.3ships (FastMCP Updates).
Frequently Asked Questions
What is new in fastmcp v4.2.6?
Released on November 25, 2026, fastmcp v4.2.6 introduces an experimental CodeModeClient for client-side tool discovery and cross-server execute chaining, adds network.transport / network.protocol.name / network.protocol.version OpenTelemetry attributes to server spans, namespaces resource links from mounted server tools, and ensures truncated ResponseLimitingMiddleware outputs stay within max_size as serialized (FastMCP Updates).
Should I use fastmcp or the official mcp Python SDK?
Use the official mcp SDK (v2.3.0, MCPServer) if you want a minimal dependency footprint on Python 3.10+ matching the core protocol quickstart. Choose fastmcp (v4.2.6) if you need OAuth proxies, middleware (UsageMiddleware, ResponseLimitingMiddleware), OpenAPI auto-generation, server composition/proxying, ClientGroup, or CodeModeClient (Fastero; FastMCP Updates).
Which FastMCP version fixes GHSA-78c8-3jhx-5mg7?
fastmcp v4.2.4 (released November 20, 2026) and newer (including v4.2.6) fix GHSA-78c8-3jhx-5mg7, a race condition where concurrent token requests could redeem an OAuth proxy authorization code or refresh token twice (FastMCP Updates).
What is fastmcp-slim and when should I install it?
fastmcp-slim (introduced in v3.3.0) ships FastMCP's client and transport layer without Starlette, Uvicorn, or the server stack while keeping the same fastmcp import namespace—ideal for CI runners, agent clients, and library dependencies (FastMCP Updates; PyPI fastmcp-slim).
Does fastmcp v4.2.6 still support Python 3.10?
No. Starting with v4.2.0a4, FastMCP requires Python 3.11 or newer (with full Python 3.15 support added in 4.1.0) (FastMCP Updates).
Sources
- FastMCP Official Updates & Release Notes (
v4.2.6,v4.2.5,v4.2.4,v4.2.1,v4.2.0) (Updated November 25, 2026): https://gofastmcp.com/docs/updates - PyPI —
fastmcp(4.2.6) Package Registry (Released November 25, 2026): https://pypi.org/project/fastmcp/ - GitHub —
PrefectHQ/fastmcpReleases (Updated November 25, 2026): https://github.com/PrefectHQ/fastmcp/releases - Fastero — Python MCP Server: Build One With FastMCP or the Official SDK (Published November 18, 2026; checked Nov 20, 2026): https://fastero.com/blog/python-mcp-server
- VCT — FastMCP Changelog & Release Velocity (
4.2.6) (Updated November 26, 2026): https://vibecodingturkey.com/releases/fastmcp