# `Hermolaos.Client.PubSubNotificationHandler`
[🔗](https://github.com/nyo16/hermolaos/blob/v0.5.0/lib/hermolaos/client/notification_handler.ex#L178)

Notification handler that broadcasts events via Phoenix.PubSub or Registry.

This handler allows multiple processes to subscribe to MCP notifications.

## Usage with Phoenix.PubSub

    {:ok, conn} = Hermolaos.Client.Connection.start_link(
      transport: :stdio,
      command: "my-server",
      notification_handler: {
        Hermolaos.Client.PubSubNotificationHandler,
        %{pubsub: MyApp.PubSub, topic: "mcp:events"}
      }
    )

    # Subscribe in another process
    Phoenix.PubSub.subscribe(MyApp.PubSub, "mcp:events")

    receive do
      {:mcp_notification, method, params} -> ...
    end

## Usage with Registry

    {:ok, conn} = Hermolaos.Client.Connection.start_link(
      transport: :stdio,
      command: "my-server",
      notification_handler: {
        Hermolaos.Client.PubSubNotificationHandler,
        %{registry: MyApp.MCPRegistry, key: "mcp_events"}
      }
    )

---

*Consult [api-reference.md](api-reference.md) for complete listing*
