# `NervesMCP.Server`
[🔗](https://github.com/nerves-project/nerves_mcp/blob/v0.1.0/lib/nerves_mcp/server.ex#L5)

MCP Server for interacting with Nerves devices.

The exposed tool list is dynamic: `server/0` is evaluated on every request by
the transport, so it reflects the current device state as detected by
`NervesMCP.DeviceProbe`.

  * `:nerves` - full Elixir + Nerves tooling
  * `:elixir` - Elixir eval only (Elixir runs, but not confirmed Nerves)
  * `:shell`  - degraded raw shell tooling (device responds but no Elixir)
  * `:down` / `:unknown` - just the wait/status tools

`is_device_up`, `is_device_updated_to` and `device_status` are always offered
so you can wait for a device to come up regardless of its current state.

On a state change `DeviceProbe` broadcasts `notifications/tools/list_changed`
(the `listChanged` capability is advertised at initialize) so connected clients
refetch the list.

# `server`

```elixir
@spec server() :: struct()
```

---

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