unifi-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| UNIFI_URL | Yes | Console URL, e.g. https://192.168.1.1. | |
| UNIFI_API_KEY | Yes | The console's API key, from a dedicated local admin. | |
| UNIFI_MCP_PORT | No | HTTP port, default 3000. | 3000 |
| UNIFI_MCP_TOKEN | No | Bearer token MCP clients must send. Required for the http/both transports. | |
| UNIFI_TLS_INSECURE | No | true turns certificate checks off. Local experiments only. | false |
| UNIFI_MCP_READ_ONLY | No | true registers the read tools only. | false |
| UNIFI_MCP_TRANSPORT | No | stdio (default), http or both. The image sets http. | stdio |
| UNIFI_TLS_FINGERPRINT | No | SHA-256 fingerprint of the console's certificate; the connection is pinned to it. Required unless UNIFI_TLS_INSECURE=true. | |
| UNIFI_SITE_MANAGER_API_KEY | No | Site Manager (unifi.ui.com) key; adds unifi_list_hosts and unifi_isp_metrics. | |
| UNIFI_MCP_PROTECTED_NETWORKS | No | Comma-separated network names or ids. The default value is pi-cluster; set your own, e.g. servers,management, or none to protect only the gateway. Empty is an error. | pi-cluster |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
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_overviewA | The "is anything wrong?" entry point: console model and Network version, health per subsystem (WAN, LAN, WLAN, VPN), devices online/offline/upgradable, client counts (from stat/sta with clientsNote when the official client list fails), and how many HIGH or VERY_HIGH events the last 24 hours logged. |
| unifi_list_devicesA | List the console's UniFi devices: name, model, IP, state, firmware (and whether an update exists), uptime, CPU and memory, plus what each hangs off (parent and port, or WAN), ports up and PoE ports in use, and each AP radio's band, channel and clients. |
| unifi_get_deviceA | Show one device by name, MAC, IP or id: model, state, firmware, uptime, CPU/memory, uplink rate, features and interfaces, and the legacy adoption state. An ambiguous name returns the candidates. |
| unifi_list_clientsA | List clients (connected ones unless includeOffline or blocked is set), newest activity first: name, IP, network, wired or wireless, uplink, signal, first and last seen. No MACs; use unifi_get_client for those. Filter by network, AP/switch, wired, blocked or first seen since. |
| unifi_get_clientA | Show one client by name, MAC, IP or id: network, AP or switch port, signal, rates, uptime, traffic and first/last seen. An ambiguous name returns the candidates, not a guess. |
| unifi_wan_statusA | WAN state: the configured WANs, the gateway's WAN IP, ISP and link status, internet latency and drops now, and (with a Site Manager key) ISP latency, loss and uptime over a range (default 24 h). |
| unifi_vpn_statusB | VPN servers and site-to-site tunnels with their state, plus the console's VPN health. |
| unifi_eventsA | Search the console event log, newest first, messages rendered as the UI shows them. Filter by category (e.g. SECURITY), minSeverity, since/until (default last 24 h), device, client (name, IP or MAC, matched against the entry parameters) and text. Reads up to 20000 entries; if the range is longer it says how far back it got. |
| unifi_threat_summaryA | What security issues need attention: SECURITY log entries (default last 7 days) grouped by direction and LAN side (inbound to a client, outbound from a client, firewall blocks, other keys), ranked by worst severity then count. Each group has counts by severity, first/last seen, distinct remote IPs with the top 5, and the port forwards that expose an inbound target. Groups past maxGroups are summarised as a tail, never dropped; topRemotesOverall shows one remote hitting several clients. Reads up to 20000 log entries and says how far back it got if the range was longer. |
| unifi_posture_auditA | Audit the security posture and list findings (severity, object, why), HIGH first: port forwards open to any source with the inbound threats against their target; WiFi with no encryption, WPA2-only where an AP supports WPA3, or a guest SSID not isolated; zone policies that let a less trusted zone or network into a more trusted one; ALLOW policies matching any → any; networks of different trust sharing one zone (IoT in Internal); user-defined policies repeated as copies; IDS/IPS off or detect-only; clients first seen in the last newClientDays; devices with firmware updates. Rules that cannot run (e.g. zone rules while Zone-Based Firewall is off or a firewall endpoint changed) are listed under skipped with the reason. Findings the owner accepted as intended (UNIFI_MCP_ACCEPTED_FINDINGS) are listed under accepted, severity kept, and left out of counts; an acceptance that matches no finding is listed under staleAccepted. WPS is not checked: the console config does not expose it. |
| unifi_list_firewallA | The firewall as readable one-line rules ("Internal → External: BLOCK from 192.168.1.10 to 203.0.113.1 "name""): zones with their networks, zone policies (UniFi's own tagged (system); the same rule in several zone pairs is one row listing the pairs, and duplicates says how many user-defined policies are copies), ACL rules, DNS policies and traffic matching lists. While Zone-Based Firewall is off, says so and lists the old-style rules instead, read-only. A collection whose endpoint changed (new firmware) is named under unavailable with the error; the rest are still listed. |
| unifi_list_port_forwardsB | Port forwards as one line each ("NAS: WAN 8443 → 192.168.1.10:443 tcp from any"), whether enabled, and the client behind the LAN address (matched by IP). |
| unifi_list_wifiB | WiFi networks (SSIDs): security (open, WPA2, WPA2/WPA3, WPA3), the network they bridge to, guest and client isolation, hidden, bands and PMF. |
| unifi_list_networksB | Networks (LAN and WAN): name, official id and legacy id, purpose, VLAN, subnet, DHCP, isolation, internet access, and the WAN address. |
| unifi_audit_logA | Who changed what and when: the console's AUDIT log (default last 7 days), newest first. actor filters to one admin by name or id; pass actor: 'unifi-mcp' to see only this MCP's own changes once its dedicated admin exists. |
| unifi_traffic_reportA | Traffic and client counts over time from the console's own reports, for the whole site, one AP (device), one client, or the gateway (with WAN latency, CPU, memory). Interval 5minutes, hourly or daily (default by range). At most 200 points: longer series are averaged per bucket, first and last kept. Bytes are per bucket of the chosen interval. |
| unifi_top_appsA | Top 10 applications and categories by traffic (deep packet inspection), for the whole site or one client. Ids are named from the official DPI catalogue; an id it lacks shows as "app ". Empty when the console has no DPI data. |
| unifi_block_clientA | Block a client from the network (legacy cmd/stamgr block-sta) until it is unblocked. A client on a protected network (pi-cluster by default) needs confirm: true; without it the tool previews. An ambiguous name returns the candidates and changes nothing. |
| unifi_unblock_clientA | Unblock a blocked client (legacy cmd/stamgr unblock-sta). It gives access back, so it is never guarded. An ambiguous name returns the candidates and changes nothing. |
| unifi_reconnect_clientA | Disconnect a client so it reconnects (legacy cmd/stamgr kick-sta). A client on a protected network (pi-cluster by default) needs confirm: true; without it the tool previews. An ambiguous name returns the candidates and changes nothing. |
| unifi_authorize_guestA | Authorize a guest client (official AUTHORIZE_GUEST_ACCESS). Replaces any active authorization and resets its counters. Limits are optional; without minutes the site's default applies. A client on a protected network (pi-cluster by default) needs confirm: true; without it the tool previews. An ambiguous name returns the candidates and changes nothing. |
| unifi_unauthorize_guestA | Revoke a guest client's authorization and disconnect it (official UNAUTHORIZE_GUEST_ACCESS). A client on a protected network (pi-cluster by default) needs confirm: true; without it the tool previews. An ambiguous name returns the candidates and changes nothing. |
| unifi_restart_deviceA | Restart an adopted device (official RESTART). Needs confirm: true when the device is the gateway, or carries a protected network (pi-cluster by default) directly or further down its uplink chain: that restart cuts unifi-mcp off. Without confirm it previews. An ambiguous name returns the candidates. |
| unifi_power_cycle_portA | Power-cycle PoE on one switch port (official POWER_CYCLE). Needs confirm: true when the port is on the gateway, or feeds a protected-network client (pi-cluster by default) directly or through another switch or AP; without it the tool previews. |
| unifi_locate_deviceA | Turn the locate LED (blinking) of a device on or off (legacy cmd/devmgr set-locate / unset-locate). |
| unifi_adopt_deviceA | Adopt a device waiting for adoption, by its MAC (official adopt). Adoption finishes on the console; unifi_list_devices shows it once done. |
| unifi_unadopt_deviceA | Remove (unadopt) a device from the site (official DELETE). An online device is reset to factory defaults. Always needs confirm: true; without it the tool previews, with a lock-out warning when the device is the gateway or carries a protected network. |
| unifi_create_networkA | Create a network (official POST /networks). Takes the official |
| unifi_update_networkA | Change fields of a network. Give only what changes: nested objects merge into the current ones (a nested object whose mode or type changes is replaced). The tool reads the network, merges and PUTs the whole object (the official PUT replaces it). Always needs confirm: true, since a typo can cut clients off; without it the tool previews the changed fields, before → after. Changing or disabling a protected network (pi-cluster by default) can cut unifi-mcp off; its preview says so. |
| unifi_delete_networkA | Delete a network (official DELETE). Always needs confirm: true; without it the tool previews. The console refuses a network still in use. Changing or disabling a protected network (pi-cluster by default) can cut unifi-mcp off; its preview says so. |
| unifi_create_wifiC | Create a WiFi broadcast (SSID) (official POST /wifi/broadcasts), from the official |
| unifi_update_wifiA | Change fields of a WiFi broadcast. Give only what changes: nested objects merge into the current ones (one whose type changes is replaced). The tool reads the broadcast, merges and PUTs the whole object (the official PUT replaces it). Always needs confirm: true, since a typo can cut clients off; without it the tool previews the changed fields, before → after; a passphrase change shows only as "changed". A broadcast that serves a protected network (pi-cluster by default), directly or through a pre-shared key, before or after the change, carries a lock-out warning. |
| unifi_set_wifi_enabledA | Turn a WiFi broadcast on or off (reads it, sets enabled, PUTs the whole object). Always needs confirm: true; without it the tool previews. A broadcast that serves a protected network (pi-cluster by default), directly or through a pre-shared key, before or after the change, carries a lock-out warning. |
| unifi_delete_wifiA | Delete a WiFi broadcast (official DELETE): its clients drop off. Always needs confirm: true; without it the tool previews. A broadcast that serves a protected network (pi-cluster by default), directly or through a pre-shared key, before or after the change, carries a lock-out warning. |
| unifi_create_vouchersB | Generate hotspot (guest portal) vouchers (official POST /hotspot/vouchers) and return their codes. |
| unifi_delete_voucherB | Delete one hotspot voucher by its id (official DELETE). |
| unifi_delete_vouchersA | Delete every hotspot voucher a filter matches (official bulk DELETE): by ids, exact name and/or expired; several criteria must all match. Always needs confirm: true; without it the tool lists what would go. |
| unifi_create_firewall_policyA | Create a zone-based firewall policy (official POST /firewall/policies), zones by name. Easy unless it can reach a protected network; then it needs confirm: true and previews first. A side that is a zone alone reaches every network in it, and UniFi's Internal zone holds every LAN. So a policy on a zone holding a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) is confirm-level unless its filters provably exclude it: a NETWORK filter naming only other networks the console has, or IPv4 addresses, ranges or subnets (directly or through an IPv4 traffic matching list) outside the protected subnets. Addresses that overlap a protected subnet are confirm-level in any zone. Anything the guard cannot place leans to confirm: an unknown zone, list or network id, an IPv6 address, an opposite match, or a MAC, port or other filter, which counts as the whole zone. |
| unifi_update_firewall_policyA | Change fields of a user-defined firewall policy. Give only what changes; source/destination merge (a null trafficFilter removes it). The tool reads the policy, merges and PUTs the whole object. Always needs confirm: true; without it the tool previews the changed fields. System-defined policies and the IPS auto-blocks are refused: UniFi manages them. A side that is a zone alone reaches every network in it, and UniFi's Internal zone holds every LAN. So a policy on a zone holding a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) is confirm-level unless its filters provably exclude it: a NETWORK filter naming only other networks the console has, or IPv4 addresses, ranges or subnets (directly or through an IPv4 traffic matching list) outside the protected subnets. Addresses that overlap a protected subnet are confirm-level in any zone. Anything the guard cannot place leans to confirm: an unknown zone, list or network id, an IPv6 address, an opposite match, or a MAC, port or other filter, which counts as the whole zone. |
| unifi_set_firewall_policy_enabledA | Enable or disable a user-defined firewall policy. Easy unless the policy can reach a protected network; then it needs confirm: true and previews first. System-defined policies and the IPS auto-blocks are refused. A side that is a zone alone reaches every network in it, and UniFi's Internal zone holds every LAN. So a policy on a zone holding a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) is confirm-level unless its filters provably exclude it: a NETWORK filter naming only other networks the console has, or IPv4 addresses, ranges or subnets (directly or through an IPv4 traffic matching list) outside the protected subnets. Addresses that overlap a protected subnet are confirm-level in any zone. Anything the guard cannot place leans to confirm: an unknown zone, list or network id, an IPv6 address, an opposite match, or a MAC, port or other filter, which counts as the whole zone. |
| unifi_delete_firewall_policyA | Delete a user-defined firewall policy (official DELETE). Always needs confirm: true; without it the tool previews. System-defined policies and the IPS auto-blocks are refused. |
| unifi_reorder_firewall_policiesA | Set the order of a zone pair's user-defined policies (official PUT /firewall/policies/ordering). Name every user-defined policy of the pair exactly once, by id or name, in beforeSystemDefined or afterSystemDefined. Always needs confirm: true; without it the tool previews the order before → after. System-defined policies can't be moved, and a pair holding IPS auto-blocks (no id in the API) can't be reordered here. |
| unifi_create_firewall_zoneA | Create a custom firewall zone (official POST /firewall/zones), e.g. to move IoT out of Internal. Easy, unless it takes a protected network. Moving a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) into or out of a zone changes which policies reach it, so it needs confirm: true. |
| unifi_update_firewall_zoneA | Rename a custom firewall zone or set its networks (the whole list). Always needs confirm: true; without it the tool previews. System-defined zones are refused: UniFi manages them. Moving a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) into or out of a zone changes which policies reach it, so it needs confirm: true. |
| unifi_delete_firewall_zoneA | Delete a custom firewall zone (official DELETE). Always needs confirm: true; without it the tool previews. System-defined zones are refused. Moving a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) into or out of a zone changes which policies reach it, so it needs confirm: true. |
| unifi_create_acl_ruleA | Create a switch ACL rule (official POST /acl-rules). Easy, unless it can match a protected network. A rule that can match a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) needs confirm: true: one naming it or an address in its subnet, a network the console does not have, or an endpoint that is open (no filter, ports only, MACs) and so matches any address. |
| unifi_update_acl_ruleA | Change fields of a user-defined ACL rule; the tool reads it, merges and PUTs the whole rule. Always needs confirm: true; without it the tool previews the changed fields. Rules UniFi made are refused. A rule that can match a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) needs confirm: true: one naming it or an address in its subnet, a network the console does not have, or an endpoint that is open (no filter, ports only, MACs) and so matches any address. |
| unifi_delete_acl_ruleA | Delete a user-defined ACL rule (official DELETE). Always needs confirm: true; without it the tool previews. Rules UniFi made are refused. |
| unifi_create_dns_policyA | Create a DNS policy (official POST /dns/policies): a local A, AAAA, CNAME, MX, SRV or TXT record, or a forward domain. Easy: DNS records do not filter traffic. When UNIFI_URL names the console by hostname, a record for that hostname, or a forward of it or a parent domain, can send unifi-mcp elsewhere, so it needs confirm: true and previews first. |
| unifi_update_dns_policyA | Change fields of a DNS policy (found by id or domain); the tool reads it, merges and PUTs the whole record. Its type can't change: delete and recreate. Always needs confirm: true; without it the tool previews the changed fields. |
| unifi_delete_dns_policyA | Delete a DNS policy (found by id or domain; several records for one domain come back as candidates). Always needs confirm: true; without it the tool previews. |
| unifi_create_traffic_listA | Create a traffic matching list (official POST /traffic-matching-lists) of IPv4 addresses, IPv6 addresses or ports, for firewall policies to match on. Easy: a new list is used by nothing yet. |
| unifi_update_traffic_listA | Rename a traffic matching list or replace its items (the whole list). Every policy using it changes with it. Always needs confirm: true; without it the tool previews the change and the policies that use the list. A change that adds or removes an address in a protected network's subnet (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default), or a ports/IPv6 list used by a policy that reaches one, warns in its preview. |
| unifi_delete_traffic_listA | Delete a traffic matching list (official DELETE); the console refuses one still in use. Always needs confirm: true; without it the tool previews, with the policies that use it. A change that adds or removes an address in a protected network's subnet (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default), or a ports/IPv6 list used by a policy that reaches one, warns in its preview. |
| unifi_block_ipA | Block an IPv4 address or CIDR in both directions: adds it to the IPv4 traffic matching list "unifi-mcp blocklist", which "unifi-mcp blocklist inbound" (External → Internal) and "unifi-mcp blocklist outbound" (Internal → External) BLOCK. The first call creates whichever of the three is missing and needs confirm: true once (it previews the creates). After that a block is easy, unless it overlaps a protected network's subnet (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) or is a wide range (a prefix shorter than /16); those need confirm. An address already listed (x and x/32 are one address) is a no-op. |
| unifi_unblock_ipA | Remove an IPv4 address or CIDR from the "unifi-mcp blocklist" (one update of the list). Easy, unless it overlaps a protected network's subnet (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) or is a wide range (a prefix shorter than /16); those need confirm. The console can't hold an empty list, so removing the last address deletes the blocklist (both policies, then the list) and needs confirm: true; the next unifi_block_ip recreates it. An address not listed is a no-op. |
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 56 tools
Tools are differentiated by UniFi resource and action: device/client reads, WiFi/network CRUD, firewall policies/zones, ACL/DNS/traffic-list operations, and monitoring reports all have distinct purposes. Singular vs bulk voucher deletion and convenience enabled-setters overlap slightly with update tools, but the descriptions make the boundaries clear.
All tool names use the unifi_ prefix and snake_case, and most follow a predictable verb_noun pattern such as list_devices, create_wifi, or delete_firewall_policy. A handful of reporting/status tools are noun-like rather than verb-led (overview, events, wan_status, threat_summary), so the pattern is not perfectly uniform.
At 56 tools, the surface is far beyond the typical 3-15 range and exceeds even the 25+ 'too many' band. Although many tools are individually well scoped, the overall set is too large for an agent to navigate efficiently as one MCP server.
Core UniFi objects such as devices, clients, WiFi, networks, firewall policies/zones, ACL rules, DNS policies, and traffic lists have good lifecycle coverage. However, port forwards are read-only, vouchers have create/delete but no list/get operation, and VPN is status-only, leaving notable dead ends for full administration.