fastmcp.client.messages
Classes
MessageHandler
This class is used to handle MCP messages sent to the client: notifications
and transport-level exceptions. Users can override any of the hooks.
Server-initiated requests (ping, sampling, roots) never reach this
handler: the stable MCP SDK v2’s message_handler contract only delivers
ServerNotification | Exception, so a request has no wire path here.
Those are answered through the Client’s dedicated callbacks instead —
sampling_handler=, roots=, and elicitation_handler=.
Methods:

