# `ExMCP.SubscriptionRegistry`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.4.0/lib/ex_mcp/subscription_registry.ex#L1)

Tracks streamable-HTTP resource subscriptions by MCP session.

The owning process only provides a supervised lifetime for the ETS indexes.
Subscription writes and broadcast lookups operate directly on ETS so one
registry mailbox does not become the notification hot path.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `remove_session`

```elixir
@spec remove_session(String.t()) :: :ok
```

Removes every subscription owned by a terminated or expired session.

# `sessions`

```elixir
@spec sessions(String.t()) :: [String.t()]
```

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

# `subscribe`

```elixir
@spec subscribe(String.t(), String.t()) :: :ok | {:error, atom()}
```

# `subscriptions`

```elixir
@spec subscriptions(String.t()) :: [String.t()]
```

# `unsubscribe`

```elixir
@spec unsubscribe(String.t(), String.t()) :: :ok
```

---

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