Skip to content

[Server] Add more Logging and Notifications #70

Description

@chr-hertel

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.

Activity

  1. added
    ServerIssues & PRs related to the Server component
    on Sep 14, 2025
  2. Adebayo120 commented on Sep 28, 2025

    @Adebayo120
    Contributor

    Hi @chr-hertel may I have a go at this

  3. chr-hertel commented on Sep 28, 2025

    @chr-hertel
    MemberAuthor

    Sure, go ahead 👍

  4. Adebayo120 commented on Oct 5, 2025

    @Adebayo120
    Contributor

    Heads-up: I am already done with implementation, needs some cleanup, will do so and open a PR

  5. Nyholm commented on Dec 27, 2025

    @Nyholm
    Contributor

    Both logging and notification has been added in main.

    See Logging and Notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ServerIssues & PRs related to the Server component

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions