# `ExMCP.Server.Subscriptions`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.4.0/lib/ex_mcp/server/subscriptions.ex#L1)

Registry and publication coordinator for MCP 2026-07-28 subscriptions.

Registrations contain no credential material. Each listener is isolated in a
monitored process with an acknowledgment-first, bounded queue. The default
adapter is node-local; clustered deployments can configure another adapter.

# `registry`

```elixir
@type registry() :: GenServer.server()
```

# `cancel`

```elixir
@spec cancel(pid(), ExMCP.Types.request_id(), keyword()) :: :ok
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `close`

```elixir
@spec close(pid(), ExMCP.Types.request_id(), atom(), keyword()) ::
  :ok | {:error, :not_found}
```

# `delivered`

```elixir
@spec delivered(pid()) :: :ok
```

# `entries`

```elixir
@spec entries(keyword()) :: [ExMCP.Server.Subscriptions.Entry.t()]
```

# `listen`

```elixir
@spec listen(ExMCP.Types.request_id(), map(), pid(), keyword()) ::
  {:ok, ExMCP.Server.Subscriptions.Entry.t()} | {:error, term()}
```

# `publish`

```elixir
@spec publish(String.t(), map(), keyword()) :: %{
  subscribers: non_neg_integer(),
  enqueued: non_neg_integer(),
  coalesced: non_neg_integer(),
  closed: non_neg_integer()
}
```

# `remove_transport`

```elixir
@spec remove_transport(
  pid(),
  keyword()
) :: :ok
```

# `start_link`

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

---

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