A client-owned MCP 2026-07-28 subscription stream.
Use open/3 with an immutable notification filter. The call returns only
after the server's notifications/subscriptions/acknowledged message. Events
are delivered to the subscribing process as:
{:ex_mcp_subscription, subscription, method, params}If a transport reconnects, the process re-opens the desired filter with a fresh JSON-RPC request ID and emits a resynchronization notification.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type t() :: ExMCP.Client.Subscription.Ref.t()
Functions
@spec cancel(ExMCP.Client.Subscription.Ref.t(), String.t() | nil) :: :ok
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec current(ExMCP.Client.Subscription.Ref.t()) :: {:ok, ExMCP.Client.Subscription.Ref.t()} | {:error, atom()}
@spec open(GenServer.server(), map(), keyword()) :: {:ok, ExMCP.Client.Subscription.Ref.t()} | {:error, term()}
@spec status(ExMCP.Client.Subscription.Ref.t()) :: map()