# `ExMCP.Client.Subscription`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.0.0/lib/ex_mcp/client/subscription.ex#L1)

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.

# `t`

```elixir
@type t() :: ExMCP.Client.Subscription.Ref.t()
```

# `cancel`

```elixir
@spec cancel(ExMCP.Client.Subscription.Ref.t(), String.t() | nil) :: :ok
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `current`

```elixir
@spec current(ExMCP.Client.Subscription.Ref.t()) ::
  {:ok, ExMCP.Client.Subscription.Ref.t()} | {:error, atom()}
```

# `open`

```elixir
@spec open(GenServer.server(), map(), keyword()) ::
  {:ok, ExMCP.Client.Subscription.Ref.t()} | {:error, term()}
```

# `status`

```elixir
@spec status(ExMCP.Client.Subscription.Ref.t()) :: map()
```

---

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