FastMCP 4.2.5 turns on change notifications for the new MCP protocol; check your OAuth settings
An MCP server built with the FastMCP library now notifies clients that support listening by default when its tools, prompts or resources change on protocol version 2026-07-28 connections. Some OAuth changes require administrators to check their settings.
PrefectHQ released version 4.2.5 of FastMCP on GitHub on 23 November. FastMCP is a Python library for building MCP servers. Version 4 is built for MCP’s new protocol version 2026-07-28.
In the new version, a client can keep a listen request (subscriptions/listen) open to the server. The server uses it to report when its tools, prompts or resources change. A call such as FastMCP.notify_tools_changed() sends the notification. The change applies only to protocol version 2026-07-28 connections. Older handshake-based connections work as before.
Listening is on by default. A client that supports listening keeps one request open for the whole connection. Each server process accepts up to 1,024 open listen requests. The release notes say the change is worth checking if the server runs on a serverless platform that limits request duration, has a small fixed number of worker processes or connections, or is billed for open connections.
Notifications also travel only within one process. If the service runs on several worker processes or replicas, a notify_* call reaches only clients connected to the same process. To turn listening off, set the environment variable FASTMCP_ENABLE_SUBSCRIPTIONS_LISTEN=false before the program imports the fastmcp module. The server then behaves as in version 4.2.4.
Some OAuth changes require administrators to check their settings. If a server sets neither valid_scopes nor required_scopes, CIMD clients can no longer request any scope. In that case, list the accepted scopes in valid_scopes. If a redirect URI is registered as exactly the site root, such as https://app.example/, the server now accepts only the root path. To accept any path, add /* to the end of the address.
If a client uses an already rotated refresh token more than 60 seconds after rotation, the server suspects theft and revokes the whole grant. A client that copies the same stored refresh token to several processes must also share the rotated token with them. With the multi-tenant tenant_id values organizations, consumers and common, AzureProvider no longer checks the token issuer and accepts users from any tenant. The token_issuer setting can restrict acceptance to one issuer.
In cookie parameters for OpenAPI tools, FastMCP now percent-encodes characters that cookies do not allow. A backend that reads a cookie containing semicolons, spaces or non-ASCII characters must decode it.
The release also adds an optional UsageMiddleware, which records usage as an OpenTelemetry metric per user and per tool. Also new is an experimental Events extension, whose API may change in any release without a transition period. Detailed instructions are in the release notes in FastMCP’s GitHub repository.
Read more: How an agent works · Agent map