Skip to main content

fastmcp.client.messages

Classes

MessageHandler

This class is used to handle MCP messages sent to the client. It is used to handle all messages, requests, notifications, and exceptions. Users can override any of the hooks Methods:

dispatch

on_message

on_request

on_ping

on_list_roots

on_create_message

on_notification

on_exception

on_progress

on_logging_message

on_tool_list_changed

on_resource_list_changed

on_prompt_list_changed

on_resource_updated

on_cancelled