Skip to content

Concurrent ClientGroup tool refreshes can roll back the latest catalog #5542

Description

@mikamikasuki

What happened?

When explicit ClientGroup.list_tools() refreshes overlap, an older tools/list response can finish after a newer refresh and replace the group's current routes with its stale snapshot.

A local reproduction delayed the first response after it captured the original-only catalog, added a tool to the server, and let a second refresh install both tools. Releasing the older response last caused the new namespaced route to disappear. The server still advertised the tool, but resolving the route raised KeyError until another refresh.

Expected behavior: an older in-flight refresh must not overwrite a newer catalog that has already been committed, or overlapping refreshes should be serialized so the final routes reflect the current listing.

Example Code

Version Information

- FastMCP main: `5baeacfe20eca735cb949564b4915f93a622b916`
- Python: 3.12.15
- OS: macOS 15.0.1 arm64

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.clientRelated to the FastMCP client SDK or client-side functionality.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions