unifi-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| UNIFI_API_KEY | Yes | API key from Settings → Control Plane → Integrations | |
| UNIFI_API_PATH | No | Path prefix override (rarely needed) | /proxy/network/integration |
| UNIFI_BASE_URL | Yes | Console origin, e.g. https://192.168.1.1 | |
| UNIFI_TLS_VERIFY | No | TLS cert validation (secure by default). Set false only for self-signed console certs on a trusted LAN — it allows on-path interception of the API key. | true |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Tools for managing a Ubiquiti UniFi network via the official Integration API. Start with unifi_list_sites to discover the site ID other tools accept (it is auto-detected when the console has one site). List tools support UniFi filter expressions like "state.eq('OFFLINE')" and 'responseFormat: json' for raw data. Tools annotated destructive (restart, unadopt, power-cycle, revoke access, delete) change live infrastructure — confirm with the user first.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| unifi_get_application_infoA | Get the UniFi Network application version running on the console. Useful as a connectivity check — if this fails, the base URL or API key is misconfigured. |
| unifi_get_system_infoA | Get console system info: UniFi Network application version, whether a Network application update is available or already downloaded, the previous Network version, and the console model and UniFi OS version. Use this to answer 'are there app updates?' (for device firmware updates use unifi_get_device). Reads the console's legacy, undocumented Network API, so it may break on future Network versions. It cannot report UniFi OS or other app (Protect, Access...) update availability — that endpoint needs an admin login session, not an API key. |
| unifi_list_sitesA | List the sites managed by this UniFi console. Returns each site's name and ID. Most consoles have exactly one site; its ID is what other tools accept as 'siteId' (they auto-detect it when there is only one site). |
| unifi_list_devicesA | List UniFi devices (gateways, switches, access points) adopted on a site, with name, model, MAC, IP, and state (ONLINE, OFFLINE, UPDATING, CONNECTION_INTERRUPTED, ISOLATED, ...). Use unifi_get_device for full details of one device. Filter example: "state.eq('OFFLINE')" to find offline devices. |
| unifi_get_deviceA | Get full details for one adopted UniFi device by ID: firmware version and update availability, adoption time, port table (with PoE state), and radio table. Get device IDs from unifi_list_devices. |
| unifi_get_device_statisticsA | Get the latest live statistics for one adopted device: uptime, CPU %, memory %, load average, and uplink throughput (bits/sec). Good for health checks and 'is this AP overloaded?' questions. |
| unifi_list_pending_devicesA | List UniFi devices that are visible on the network but not yet adopted into the controller. Console-wide (not site-scoped). |
| unifi_adopt_deviceA | Adopt a pending UniFi device (from unifi_list_pending_devices) into a site, identified by its MAC address. The device will provision and join the network under this controller. |
| unifi_unadopt_deviceA | Remove (un-adopt) an adopted UniFi device from this site, returning it to the pending-adoption pool. The device keeps running with its current configuration but leaves this controller's management until re-adopted — it is NOT factory-reset. It reappears in unifi_list_pending_devices and can be re-added with unifi_adopt_device. CAUTION: this drops the device from management; confirm with the user before removing infrastructure. |
| unifi_restart_deviceA | Restart (reboot) one adopted UniFi device. CAUTION: the device drops all traffic while rebooting — restarting a gateway or the switch/AP serving this machine will cause an outage of a minute or more. Confirm with the user before restarting shared infrastructure. |
| unifi_power_cycle_portA | Power-cycle a single PoE port on a UniFi switch — briefly cuts and restores power to whatever is plugged into that port (camera, AP, phone). Useful to remotely reboot a hung PoE device. CAUTION: the connected device loses power; confirm with the user first. |
| unifi_list_clientsA | List clients currently connected to the network (laptops, phones, IoT, etc.) with name, IP, MAC, connection type (WIRED/WIRELESS/VPN/TELEPORT), and connect time. Note: this shows CURRENTLY CONNECTED clients only. Filter examples: "type.eq('WIRELESS')", "access.type.eq('GUEST')", "ipAddress.eq('192.168.1.50')". |
| unifi_get_clientA | Get full details for one currently connected client by ID (IDs come from unifi_list_clients): connection type, IP/MAC, access type (default/guest), uplink device, and connection time. |
| unifi_authorize_guest_accessA | Authorize a client for guest network access (hotspot/captive-portal networks), optionally with time, data, or bandwidth limits. Only meaningful for clients on a guest network. NOTE: re-authorizing an already-authorized guest cancels the existing authorization, restarts the expiry clock, and resets traffic counters — do not retry this call casually. |
| unifi_unauthorize_guest_accessA | Revoke (unauthorize) a guest client's network access. The client is kicked back to the captive portal. Only meaningful for clients on a guest network. Confirm with the user before revoking someone's access. |
| unifi_list_networksA | List the configured LAN networks/VLANs on a site with name, VLAN ID, management type, and enabled state. Use unifi_get_network for one network's full configuration including subnet and DHCP. Filter example: "vlanId.eq(20)". |
| unifi_get_networkA | Get the full configuration of one LAN network/VLAN by ID: subnet, gateway, DHCP range and state, VLAN ID. IDs come from unifi_list_networks. |
| unifi_get_network_referencesA | List what depends on a LAN network/VLAN — clients, devices, WiFi SSIDs, static/OSPF routes, NAT rules, SD-WAN. Check this BEFORE deleting or heavily reconfiguring a network to see what would break. IDs come from unifi_list_networks. |
| unifi_list_wansB | List the WAN (internet uplink) interfaces configured on a site (ID and name). |
| unifi_list_vpnA | List VPN configuration on a site: 'servers' lists VPN servers (e.g. WireGuard/L2TP for remote access), 'site_to_site' lists site-to-site VPN tunnels. |
| unifi_create_networkA | Create a new LAN network / VLAN on a site. 'config' is the full network object; required for all: name (string), vlanId (integer), management (string), enabled (boolean). For GATEWAY/SWITCH-managed networks (management != "UNMANAGED"), ipv4Configuration (subnet + DHCP) is ALSO required — plus, for GATEWAY, isolationEnabled, internetAccessEnabled, and cellularBackupEnabled. Easiest: model it on an existing network fetched via unifi_get_network with responseFormat='json', changing name/vlanId/subnet. Returns the created network. |
| unifi_update_networkA | Replace the configuration of an existing LAN network / VLAN (full PUT). Fetch the current object with unifi_get_network (responseFormat='json'), change what you need, and pass the whole object as 'config'. CAUTION: changing subnet/VLAN/DHCP can disconnect every client on this network — confirm with the user first. IDs come from unifi_list_networks. |
| unifi_delete_networkA | Delete a LAN network / VLAN. CAUTION: irreversible — clients on it lose their network and dependent WiFi/firewall/routes may break. Check unifi_get_network_references first and confirm with the user. Set force=true to delete even while other resources still reference it. IDs come from unifi_list_networks. |
| unifi_list_wifiA | List the WiFi networks (broadcast SSIDs) configured on a site, with enabled state and security type. Passwords are never included. Use unifi_get_wifi for one SSID's full settings. |
| unifi_get_wifiA | Get the full configuration of one WiFi network (SSID) by ID: security settings, associated LAN network, band/AP settings. IDs come from unifi_list_wifi. Passphrases are redacted. |
| unifi_create_wifiA | Create a new WiFi network (SSID / broadcast). 'config' is the full broadcast object. Because the required fields vary by type (a STANDARD SSID additionally needs advertiseDeviceName, arpProxyEnabled, broadcastingFrequenciesGHz, and bssTransitionEnabled on top of the base name, enabled, type, securityConfiguration, network, hideName, clientIsolationEnabled, uapsdEnabled, channel2gLockedTo6, dtimPeriod2gLockedTo3, multicastToUnicastConversionEnabled), the reliable path is to fetch an existing SSID with unifi_get_wifi (responseFormat='json'), copy its shape, and change name/network. Reads show the passphrase as '[redacted]' and a config still containing that placeholder is refused, so set a real passphrase in securityConfiguration (ask the user). Returns the created SSID. |
| unifi_update_wifiA | Replace the configuration of an existing WiFi SSID (full PUT). Fetch the current object with unifi_get_wifi (responseFormat='json'), modify it, and pass the whole object as 'config'. NOTE: reads show the passphrase as '[redacted]', and a config still containing that placeholder is refused before anything is sent (it would otherwise become the literal new passphrase) — put the real passphrase back in securityConfiguration (ask the user for it). CAUTION: reconfiguring an SSID disconnects its connected clients — confirm with the user. IDs come from unifi_list_wifi. |
| unifi_delete_wifiA | Delete a WiFi SSID. CAUTION: irreversible — connected clients lose this network. Confirm with the user. Set force=true to delete even if other resources reference it. IDs come from unifi_list_wifi. |
| unifi_list_firewall_policiesA | List zone-based firewall policies on a site: name, action (ALLOW/BLOCK/REJECT), enabled state, and whether system-defined. Use unifi_get_firewall_policy for full match criteria. Filter examples: "name.like('Block')", "metadata.origin.eq('USER_DEFINED')". |
| unifi_get_firewall_policyA | Get the full definition of one firewall policy by ID: source/destination zones and matchers, protocol, action, schedule, logging. IDs come from unifi_list_firewall_policies. |
| unifi_set_firewall_policy_enabledA | Enable or disable an existing user-defined firewall policy (system/predefined policies cannot be modified). This changes live traffic filtering — confirm with the user before toggling a policy, and double-check WHICH policy with unifi_get_firewall_policy first. |
| unifi_list_firewall_zonesA | List the firewall zones on a site (e.g. Internal, External, Gateway, VPN, Hotspot, plus custom zones) and which networks belong to each. Zone IDs appear in firewall policies' source/destination. |
| unifi_list_acl_rulesA | List layer-2/switch ACL rules on a site with name, action, and enabled state. These are switching-level ACLs, separate from zone firewall policies. Filter example: "action.eq('BLOCK')". |
| unifi_get_acl_ruleA | Get the full definition of one layer-2/switch ACL rule by ID: source/destination filters (IP- or MAC-based), enforcing-device filter, action, and index. IDs come from unifi_list_acl_rules. |
| unifi_list_dns_policiesA | List custom local DNS records and forward-domain policies on a site — A/AAAA/CNAME/MX/SRV/TXT records and FORWARD_DOMAIN rules the gateway resolves locally. NOTE: this is local DNS record management, NOT DNS content filtering or domain blocking. Each entry has a domain, a record type, and enabled state. Filter example: "domain.like('*.home.arpa')". |
| unifi_get_dns_policyA | Get one local DNS record / forward-domain policy by ID: domain, record type (A/AAAA/CNAME/MX/SRV/TXT/FORWARD_DOMAIN), and enabled state. This is local DNS record management, not content filtering. IDs come from unifi_list_dns_policies. |
| unifi_list_traffic_matching_listsA | List reusable traffic-matching lists on a site — named IP-address or port lists (type IPV4_ADDRESSES / IPV6_ADDRESSES / PORTS) that firewall policies reference instead of inlining addresses. Use unifi_get_traffic_matching_list for one list's entries. |
| unifi_get_traffic_matching_listA | Get one traffic-matching list by ID, including its entries. IDs come from unifi_list_traffic_matching_lists. |
| unifi_create_firewall_policyA | Create a zone-based firewall policy. 'config' is the full policy object; required: name, enabled, action (ALLOW/BLOCK/REJECT), source, destination, ipProtocolScope, loggingEnabled. Model it on an existing policy fetched via unifi_get_firewall_policy. CAUTION: a new ALLOW/BLOCK policy changes live traffic filtering — confirm with the user. |
| unifi_update_firewall_policyA | Replace a user-defined firewall policy (full PUT). Fetch the current object with unifi_get_firewall_policy, modify it, and pass it as 'config' (system-defined policies cannot be edited). CAUTION: this changes live traffic filtering — confirm with the user and double-check WHICH policy. For a simple enable/disable use unifi_set_firewall_policy_enabled instead. IDs come from unifi_list_firewall_policies. |
| unifi_delete_firewall_policyA | Delete a user-defined firewall policy. CAUTION: irreversible and changes live traffic filtering — confirm with the user and verify the policy with unifi_get_firewall_policy first. System-defined policies cannot be deleted. IDs come from unifi_list_firewall_policies. |
| unifi_get_firewall_policy_orderingA | Get the current evaluation order of user-defined firewall policies for one source→destination zone pair — the policy IDs split into those evaluated before and after the system-defined policies. Use this before unifi_reorder_firewall_policies. Zone IDs come from unifi_list_firewall_zones. |
| unifi_reorder_firewall_policiesA | Set the evaluation order of user-defined firewall policies for one source→destination zone pair. The API splits user policies into those evaluated BEFORE the zone's system-defined policies and those AFTER, so pass two ordered lists. Use unifi_get_firewall_policy_ordering (or model on the current order) to see the existing split. CAUTION: order determines which rule wins — reordering changes what traffic is allowed/blocked; confirm with the user. Zone IDs come from unifi_list_firewall_zones; policy IDs from unifi_list_firewall_policies. |
| unifi_create_firewall_zoneA | Create a custom firewall zone grouping one or more networks. 'config' requires name (string) and networkIds (array of network UUIDs from unifi_list_networks). Returns the created zone. |
| unifi_update_firewall_zoneA | Replace a firewall zone (full PUT) — e.g. change which networks belong to it. Fetch the current zone via unifi_list_firewall_zones, modify, and pass as 'config'. CAUTION: moving networks between zones changes which firewall policies apply to them; confirm with the user. IDs come from unifi_list_firewall_zones. |
| unifi_delete_firewall_zoneA | Delete a custom firewall zone. Only custom (user-defined) zones can be deleted — system zones cannot. CAUTION: irreversible; policies referencing this zone may be affected. Confirm with the user. IDs come from unifi_list_firewall_zones. |
| unifi_create_acl_ruleA | Create a layer-2/switch ACL rule. 'config' requires action (ALLOW/BLOCK), enabled, name, type; plus sourceFilter/destinationFilter/enforcingDeviceFilter as needed. Model it on an existing rule fetched via unifi_get_acl_rule. CAUTION: changes switching-level access; confirm with the user. |
| unifi_update_acl_ruleA | Replace an ACL rule (full PUT). Fetch the current rule via unifi_get_acl_rule, modify, and pass as 'config'. CAUTION: changes switching-level access; confirm with the user. IDs come from unifi_list_acl_rules. |
| unifi_delete_acl_ruleA | Delete an ACL rule. CAUTION: irreversible and changes switching-level access; confirm with the user. IDs come from unifi_list_acl_rules. |
| unifi_get_acl_rule_orderingA | Get the current evaluation order of user-defined ACL rules (an ordered list of rule IDs). Use this before unifi_reorder_acl_rules. |
| unifi_reorder_acl_rulesA | Set the evaluation order of user-defined ACL rules. Pass every user-defined ACL rule ID in the desired order (see unifi_get_acl_rule_ordering for the current order). CAUTION: order determines which rule wins; confirm with the user. IDs come from unifi_list_acl_rules. |
| unifi_create_dns_policyA | Create a local DNS record or forward-domain policy. 'config' requires type (A_RECORD/AAAA_RECORD/CNAME_RECORD/MX_RECORD/SRV_RECORD/TXT_RECORD/FORWARD_DOMAIN) and enabled, plus the type-specific fields (e.g. domain + ipv4Address + ttlSeconds for A_RECORD; domain + ipAddress for FORWARD_DOMAIN). This is local DNS record management, NOT domain blocking. Easiest: model it on an existing entry fetched via unifi_get_dns_policy (responseFormat='json'). |
| unifi_update_dns_policyA | Replace a local DNS record / forward-domain policy (full PUT). Fetch the current object via unifi_get_dns_policy, modify, and pass as 'config'. IDs come from unifi_list_dns_policies. |
| unifi_delete_dns_policyA | Delete a local DNS record / forward-domain policy. CAUTION: irreversible; confirm with the user. IDs come from unifi_list_dns_policies. |
| unifi_create_traffic_matching_listA | Create a reusable traffic-matching list (named IP-address or port list referenced by firewall policies). 'config' requires name and type (IPV4_ADDRESSES / IPV6_ADDRESSES / PORTS), plus the list entries. Model it on an existing list via unifi_get_traffic_matching_list. |
| unifi_update_traffic_matching_listA | Replace a traffic-matching list (full PUT). Fetch the current list via unifi_get_traffic_matching_list, modify, and pass as 'config'. CAUTION: firewall policies referencing this list will use the new entries; confirm with the user. IDs come from unifi_list_traffic_matching_lists. |
| unifi_delete_traffic_matching_listA | Delete a traffic-matching list. CAUTION: irreversible; firewall policies referencing it may break. Confirm with the user. IDs come from unifi_list_traffic_matching_lists. |
| unifi_list_vouchersA | List guest hotspot vouchers on a site, including the voucher codes, usage counts, and expiry status. Vouchers are access codes guests redeem on the captive portal. |
| unifi_get_voucherA | Get one hotspot voucher by ID: its code, label, usage counts, time limit, and expiry status. IDs come from unifi_list_vouchers. |
| unifi_generate_vouchersA | Generate new guest hotspot voucher codes with optional time/data/bandwidth limits. Returns the generated codes — share them with guests to grant WiFi access. |
| unifi_delete_voucherA | Delete one hotspot voucher by ID, revoking the code. IDs come from unifi_list_vouchers. This cannot be undone — confirm with the user first. |
| unifi_delete_vouchersA | Delete every hotspot voucher matching a filter, in one call. A filter is REQUIRED so this can't wipe all vouchers by accident — e.g. "expired.eq(true)" to clear expired ones, or "name.eq('Weekend guests')" for a batch. CAUTION: irreversible; confirm with the user. To delete a single voucher by ID, use unifi_delete_voucher instead. |
| unifi_list_lagsA | List Link Aggregation Groups (LAGs) on a site — bundles of switch ports acting as one logical link (LACP trunks). Use unifi_get_lag for one LAG's full membership. |
| unifi_get_lagA | Get one Link Aggregation Group by ID: its type and member devices/ports. IDs come from unifi_list_lags. |
| unifi_list_mclag_domainsA | List Multi-Chassis LAG (MC-LAG) domains on a site — pairs of switches presenting shared LAGs for redundancy. Use unifi_get_mclag_domain for one domain's details. |
| unifi_get_mclag_domainA | Get one MC-LAG domain by ID: peer switches (and their roles/link ports) and the LAGs shared across them. IDs come from unifi_list_mclag_domains. |
| unifi_list_switch_stacksA | List switch stacks on a site — multiple physical switches managed as one logical unit. Use unifi_get_switch_stack for one stack's members. |
| unifi_get_switch_stackA | Get one switch stack by ID: its member devices and any LAGs on the stack. IDs come from unifi_list_switch_stacks. |
| unifi_list_countriesA | List ISO country codes and names known to the console (console-wide, not site-scoped). These codes appear in radio/regulatory settings — useful for resolving a country code to its name. |
| unifi_list_dpi_applicationsA | List the Deep Packet Inspection (DPI) application catalog (console-wide, not site-scoped). Each entry's numeric ID is what traffic-identification and QoS rules reference. Use a filter like "name.like('Netflix')" to find one. |
| unifi_list_dpi_categoriesA | List Deep Packet Inspection (DPI) application categories — the groupings that DPI applications belong to (console-wide, not site-scoped). |
| unifi_list_device_tagsA | List user-defined device tags (labels/groups) on a site and which devices carry each tag. Device IDs correspond to unifi_list_devices. |
| unifi_list_radius_profilesA | List RADIUS server profiles on a site — used by enterprise/802.1X WiFi authentication (referenced from WiFi broadcast security settings). List only; the API has no single-item GET for RADIUS profiles. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 73 tools
Tools are organized by resource with clear action verbs, so list/get/create/update/delete for networks, WiFi, firewall policies, ACLs, DNS policies, and traffic lists are easily told apart. A few boundaries blur: unifi_get_application_info overlaps heavily with unifi_get_system_info (both report the Network app version), unifi_delete_voucher vs unifi_delete_vouchers (and unifi_list_vouchers) differ only by plurality, and zone handling is asymmetric (list_firewall_zones but get only via list). Otherwise descriptions explicitly cross-reference the right neighbor tool.
Every tool follows the same unifi_verb_noun snake_case pattern (unifi_list_devices, unifi_update_wifi, unifi_set_firewall_policy_enabled). No camelCase or mixed verb styles anywhere, and singular/plural distinctions track real single-vs-bulk semantics.
73 tools is far past the practical ceiling for reliable tool selection, even though the UniFi Network domain is genuinely broad. Many clusters (LAGs, MC-LAG domains, switch stacks, DPI, countries) are read-only single-purpose tools that inflate the surface without adding much capability.
Core configurable resources (networks, WiFi, firewall policies, ACL rules, DNS policies, traffic matching lists, vouchers) have full CRUD plus ordering/reference helpers, which is strong lifecycle coverage. Gaps remain: VPN, LAG, MC-LAG, switch stacks, device tags, and RADIUS profiles are list/get-only with no creation, and there is no client-level action (block/kick) or device firmware update.