I recommend using jlowin/fastmcp (FastMCP2) on the server side instead of the FastMCP class from the modelcontextprotocol/python-sdk, as the latter just crashes when the client behaves unexpectedly.
(Current as of 2025)