Basic Usage
Use the context logging methods within any tool function:Log Levels
Structured Logging
All logging methods accept anextra parameter for sending structured data to the client. This is useful for creating rich, queryable logs.
Server-Side Logs
Messages sent to clients viactx.log() and its convenience methods are also logged to the server’s log at DEBUG level. Enable debug logging on the fastmcp.server.context.to_client logger to see these messages:

