-
Notifications
You must be signed in to change notification settings - Fork 64
Description
I saw that some work is going on at https://github.com/modelcontextprotocol/php-sdk/pull/42/files but it's still missing logging.
https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/logging
Ideally, there would be an internal logger that tracks sessions and respects client-requested log levels, and makes this available inside tools/resources (perhaps via the container).
It could also be useful if this were interchangeable with an external logger passed via ->withLogger($this->logger) to the server.
In practice, you often don’t want logs stored on each server, but instead centralized on the client side. For example, when developing a client with 10–15 MCP servers, debugging across all of their logs can be very difficult.