published fresh until

FastMCP 3 to 4: what breaks in a standalone server?

Summary When migrating a standalone FastMCP server from 3 to 4, register TasksExtension and migrate removed APIs and elicitation, then separately test search, identity, and HTTP sessions; checked 2026-11-05.

Not for official SDK imports, see mcp-python-sdk-1-to-2-migrate-fastmcp-imports-transports-auth; OAuth framework choice, see mcp-python-sdk-or-fastmcp-for-remote-server-oauth-2026

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Register TasksExtension; migrate APIs/elicitation.

Notes, checked 2026-11-05:

  • 4.1.2: authorize post-transform; no denied-resource fallback. Compatible; bind issuers: set issuer on ClientCredentialsOAuthProvider/PrivateKeyJWTOAuthProvider. Reconcile openapi-pydantic >=0.6.0 pins (OpenAPI 3.1.2).
  • 4.1.3: update OS/container/custom/installer trust stores; FastMCP upgrade alone insufficient.
  • 4.1.4: KeyringStore: install py-key-value-aio[keyring]; no Redis 8.1.0; configured proxy headers win case-insensitively.
  • 4.1.5: strict OpenAPI: no undeclared args; JSON const/enum equality (true != 1).

The problem

Your server uses from fastmcp import FastMCP. After upgrading, task tools fail at startup or interactive calls stop. This is the standalone Jeremiah Lowin project, now under PrefectHQ, rather than an official SDK import repair.

Versions and status

ReleaseOfficial findingSignificance
PyPI4.2.5: 2026-11-23; Python >=3.11; Apache-2.0; checked 2026-11-23Target
4.0.0Major, 2026-08-31New engine and task extension
4.1.0Minor, 2026-10-08Input and session changes

Original review checked 2026-10-20. No service prices were checked. PyPI and GitHub date the patch 2026-10-18; the updates page labels it 2026-10-17.

What changed

4.0 notes, checked 2026-10-20, describe modern sessionless requests alongside older-client negotiation. Background work moved into fastmcp-tasks; server-initiated sampling and roots were removed. Interactive tools return input requests across successive calls. Older-client compatibility does not retain every old server API.

4.1 notes, checked 2026-10-20, change MultiAuth ownership scopes: finish pending tasks first. Regex search rejects lookarounds/backreferences; skill files must remain within configured directories; OpenAPI path parameters reject dot segments. HTTP sessions expire after 30 idle minutes. CodeMode needs Monty 1.1 and max_feed_duration_secs replaces max_duration_secs. The 4.1.1 patch, checked 2026-10-20, bounds regex length/time and restores linked skill-folder discovery while confining their files.

Ordered migration

1. Preserve the previous lockfile. Inspect actual usage with these proposed commands, not run here:

   python -m pip show fastmcp fastmcp-slim
   rg -n 'fastmcp.server.proxy|fastmcp.tools.tool|task=True|ctx.elicit|ctx.sample|list_roots|except httpx|httpx_client_factory|McpError' .

2. Read the upgrade guide, checked 2026-10-20. Floors include Pydantic >=2.12 and Starlette >=1.0.1; mounted FastAPI apps need FastAPI >=0.133.0. Resolve conflicting pins before installing in a branch environment. This pins its package to the checked release:

   python -m pip install --upgrade 'fastmcp==4.2.5'
   python -m pip check

3. Replace fastmcp.server.proxy with fastmcp.server.providers.proxy; import component Tool/ToolResult from fastmcp.tools. Audit custom HTTP factories and exception catches for httpx2. Do not globally rewrite unrelated tool HTTP. These are documented in the guide, checked 2026-10-20. 4. Apply the relevant repair below and run existing tests. Import success alone does not prove behavior was preserved.

Error construction

The exact message is TypeError: MCPError.__init__() missing 1 required positional argument: 'message'. Replace positional ErrorData construction with raise McpError(code=-32000, message="Client not supported"). Run python -m pip check and your error-path test. Do not rewrite catches merely because the printed class is uppercase. Official guide, checked 2026-10-20.

Task tools prevent startup

An absent extension registration is the cause. Follow Background Tasks, checked 2026-10-20:

python -m pip install --upgrade 'fastmcp[tasks]==4.2.5'
python -m pip check
from fastmcp_tasks import TasksExtension
mcp.add_extension(TasksExtension())

Register before serving. Use async tools; resources/prompts do not carry task=. Test completion and cancellation through the actual host. Legacy connections do not negotiate tasks. Do not delete task=True merely to make startup green. Full startup text depends on application tool names and is not claimed as a universal literal.

Elicitation fails after negotiation

The exact message is ToolError: elicitation via server-initiated requests is unavailable on 2026-07-28 connections. The guide's temporary client option is Client(server, mode="legacy"); rerun the interactive test with that option to isolate negotiation. Do not use legacy mode for modern task support. Official guide, checked 2026-10-20.

For modern clients, follow the elicitation guard pattern, checked 2026-10-20: return the input request, inspect answers on the next call, then act. Each round re-enters the tool and middleware. Test accept/decline/cancel; avoid repeating side effects before approval. Branch on negotiated protocol if serving both eras.

Recommendation by constraint

SituationPath
Plain toolsUpgrade in a branch; compare discovery/results
Long-running workInstall/register extension; verify real host support
Back-channel elicitationTemporary legacy client, then guard migration
MultiAuth with pending workFinish tasks before ownership changes; test separate users

Community evidence

  • hybridindie's godot-mcp preflight audits dependency floors, HTTP catches and error construction. This is a checklist, not evidence that every item failed in production.
  • AlanOgic's Odoo migration record reports registering the extension and replacing private transport inspection, with checks in both protocol eras. Its phrase “differs from the forecast” reinforces inspecting real code. I did not reproduce that deployment.

What to test and pitfalls

Compare tool/resource/prompt lists, structured results and injected parameter schemas. Exercise task cancellation, multi-round interaction, idle reconnect, rejected regex patterns, skill symlinks, traversal rejection and cross-user task isolation. Force a network failure to check fallback catches. Do not disable protections to restore old input acceptance.

A prompt to give your agent

Read the linked official guide, tasks page and releases before editing; do not guess APIs or error strings. Confirm standalone fastmcp usage. Inventory removed APIs, dependency pins, tasks, elicitation and HTTP catches. Propose an ordered branch diff; run existing tests across supported protocol eras. Report exact failures and resolved versions. Preserve the old lockfile; do not operate production.

Limits

No package installation, server startup or migration test was performed. Evidence is two project records, not broad adoption data; engagement thresholds/independent confirmation were not established. Resolver output, removed-import tracebacks, application-specific task startup text and regex/idle-session error strings were not reproduced; do not guess them.

Started from a post by @zzstoatzz, packaged by the editor. Original post

Subjects

More in agent skills

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# FastMCP 3 to 4: what breaks in a standalone server?
Summary: When migrating a standalone FastMCP server from 3 to 4, register `TasksExtension` and migrate removed APIs and elicitation, then separately test search, identity, and HTTP sessions; checked 2026-11-05.
Copy for agent
get the whatworks thread fastmcp-3-to-4-standalone-server-tasks-elicitation-migration and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread fastmcp-3-to-4-standalone-server-tasks-elicitation-migration
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks