> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hashgrid.net/llms.txt
> Use this file to discover all available pages before exploring further.

# WiFi and SSID management tools reference

> Reference for UniFi MCP tools that list, create, update, and delete wireless SSIDs, and retrieve per-WLAN client and bandwidth statistics.

The WiFi tools give you full control over wireless networks (SSIDs) in a UniFi site. You can read existing SSIDs and their live statistics without any confirmation, and use the write tools to create new networks, modify security settings, or remove SSIDs you no longer need. The create tool supports the full range of UniFi WLAN options — guest mode, WPA3, VLAN isolation, band steering, AP group targeting, and IoT optimizations — so you can express the exact wireless policy you need.

## Tools

### `list_wlans`

Returns all wireless networks configured in the site. This is a read-only operation.

**site\_id** `string` *required*

The site identifier to query.

**limit** `integer`

Maximum number of WLANs to return.

**offset** `integer`

Number of WLANs to skip, for pagination.

```python theme={null}
wlans = await mcp.call_tool("list_wlans", {
    "site_id": "default",
})
```

***

### `create_wlan`

Creates a new wireless network (SSID). You must supply a name and a security type. For `wpapsk` security a password is required. All other parameters are optional.

> [!WARNING]
>
> Requires `confirm=True`. Passwords are automatically masked in audit logs, but you should treat them as sensitive values and avoid hardcoding them in scripts.

**site\_id** `string` *required*

The site identifier where the WLAN will be created.

**name** `string` *required*

The SSID broadcast name (e.g. `"Guest WiFi"`).

**security** `string` *required*

Security mode. Accepted values: `open`, `wpapsk`, `wpaeap`.

**password** `string`

WiFi passphrase. Required when `security` is `wpapsk`.

**enabled** `boolean`

Whether the SSID is active immediately after creation. Defaults to `true`.

**is\_guest** `boolean`

Marks this network as a guest network, enabling guest portal and isolation features. Defaults to `false`.

**wpa\_mode** `string`

WPA protocol version. Accepted values: `wpa`, `wpa2`, `wpa3`. Defaults to `wpa2`.

**wpa\_enc** `string`

WPA encryption cipher. Accepted values: `tkip`, `ccmp`, `ccmp-tkip`. Defaults to `ccmp`.

**vlan\_id** `integer`

VLAN tag (1–4094) to associate with this SSID for network isolation. When set, wireless clients are placed into that VLAN.

**networkconf\_id** `string`

The internal ID of an existing network configuration to bind this SSID to.

**ap\_group\_ids** `array`

List of AP group IDs that should broadcast this SSID. Requires `ap_group_mode` to be set.

**ap\_group\_mode** `string`

How AP groups are applied. Accepted values: `groups` (selected groups only), `all` (all APs).

**wlan\_bands** `array`

WiFi frequency bands to broadcast on. Accepted values: `"2g"`, `"5g"`. Supply one or both (e.g. `["2g", "5g"]`).

**optimize\_iot\_wifi\_connectivity** `boolean`

Enables UniFi's IoT optimizations for this SSID, including 802.11b support and disabling OUI-based 2.4 GHz suppression.

**minrate\_ng\_enabled** `boolean`

Enables a minimum data rate requirement on 2.4 GHz to encourage devices to use 5 GHz when available.

**minrate\_ng\_data\_rate\_kbps** `integer`

Minimum 2.4 GHz data rate in kbps (e.g. `1000` for 1 Mbps). Only used when `minrate_ng_enabled` is `true`.

**hide\_ssid** `boolean`

When `true`, the SSID is not broadcast. Clients must connect manually. Defaults to `false`.

**confirm** `boolean` *required*

Must be `true` to create the WLAN.

**dry\_run** `boolean`

When `true`, validates all parameters and returns the WLAN payload that would be submitted, without creating anything. Passwords are excluded from the dry-run response.

**Example: creating a guest WiFi with VLAN isolation**

```python dry run theme={null}
result = await mcp.call_tool("create_wlan", {
    "site_id": "default",
    "name": "Guest WiFi",
    "security": "wpapsk",
    "password": "welcome2024!",
    "is_guest": True,
    "wpa_mode": "wpa2",
    "vlan_id": 100,
    "dry_run": True,
    "confirm": True,
})
# {"dry_run": true, "would_create": {...}}  # password not included in dry-run output
```

```python execute theme={null}
result = await mcp.call_tool("create_wlan", {
    "site_id": "default",
    "name": "Guest WiFi",
    "security": "wpapsk",
    "password": "welcome2024!",
    "is_guest": True,
    "wpa_mode": "wpa2",
    "vlan_id": 100,
    "confirm": True,
})
```

> [!TIP]
>
> For an IoT-dedicated SSID, set `optimize_iot_wifi_connectivity=True` and `wlan_bands=["2g"]` to accommodate older devices, and pair it with a dedicated VLAN to isolate IoT traffic from the rest of your network.

***

### `update_wlan`

Modifies an existing wireless network. The tool fetches the current WLAN configuration and merges only the fields you supply; all other settings are preserved.

**site\_id** `string` *required*

The site identifier.

**wlan\_id** `string` *required*

The internal ID of the WLAN to update. Use `list_wlans` to find this value.

**name** `string`

New SSID name.

**security** `string`

New security type: `open`, `wpapsk`, or `wpaeap`.

**password** `string`

New WiFi passphrase.

**enabled** `boolean`

Enable or disable the SSID without deleting it.

**is\_guest** `boolean`

Mark or unmark the network as a guest network.

**wpa\_mode** `string`

New WPA version: `wpa`, `wpa2`, or `wpa3`.

**wpa\_enc** `string`

New encryption cipher: `tkip`, `ccmp`, or `ccmp-tkip`.

**vlan\_id** `integer`

New VLAN tag (1–4094).

**hide\_ssid** `boolean`

Show or hide the SSID broadcast.

**confirm** `boolean` *required*

Must be `true` to apply changes.

**dry\_run** `boolean`

When `true`, returns a preview without writing changes.

```python theme={null}
result = await mcp.call_tool("update_wlan", {
    "site_id": "default",
    "wlan_id": "507f1f77bcf86cd799439011",
    "wpa_mode": "wpa3",
    "confirm": True,
})
```

***

### `delete_wlan`

Permanently removes a wireless network from the site. The tool verifies the WLAN exists before deleting and raises `ResourceNotFoundError` if it cannot be found.

> [!WARNING]
>
> Deleting a WLAN immediately disconnects all clients on that SSID. Use `update_wlan` with `enabled=false` if you want to disable the network temporarily instead.

**site\_id** `string` *required*

The site identifier.

**wlan\_id** `string` *required*

The internal ID of the WLAN to delete.

**confirm** `boolean` *required*

Must be `true` to delete the WLAN.

**dry\_run** `boolean`

When `true`, confirms the WLAN exists and returns a preview without deleting.

```python theme={null}
result = await mcp.call_tool("delete_wlan", {
    "site_id": "default",
    "wlan_id": "507f1f77bcf86cd799439011",
    "confirm": True,
})
# {"success": true, "deleted_wlan_id": "507f1f77bcf86cd799439011"}
```

***

### `get_wlan_statistics`

Returns usage statistics for one or all WLANs in a site — including connected client counts and cumulative transmit/receive byte totals. This is a read-only operation.

**site\_id** `string` *required*

The site identifier to query.

**wlan\_id** `string`

When provided, returns statistics for that specific WLAN only. When omitted, returns an aggregate for all WLANs in the site.

```python all WLANs theme={null}
result = await mcp.call_tool("get_wlan_statistics", {
    "site_id": "default",
})
# {
#   "site_id": "default",
#   "wlans": [
#     {
#       "wlan_id": "507f1f77bcf86cd799439011",
#       "name": "HomeWiFi",
#       "enabled": true,
#       "security": "wpapsk",
#       "is_guest": false,
#       "client_count": 12,
#       "total_tx_bytes": 10240000000,
#       "total_rx_bytes": 20480000000,
#       "total_bytes": 30720000000
#     }
#   ]
# }
```

```python single WLAN theme={null}
result = await mcp.call_tool("get_wlan_statistics", {
    "site_id": "default",
    "wlan_id": "507f1f77bcf86cd799439011",
})
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.