unifi-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@unifi-mcp give me an overview of my UniFi network and flag anything wrong"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
unifi-mcp
An MCP server for a UniFi network. It lets an LLM client diagnose the network (devices, clients, WAN, VPN, events), read metrics and traffic reports, summarise threats, audit the security posture, and make guarded changes to clients, devices, networks, WiFi, hotspot vouchers and the zone-based firewall (policies, zones, ACL rules, DNS policies, traffic matching lists and an IP blocklist).
Important: the write tools change the live network. A bad network or WiFi change can cut clients off, and a restart can take the gateway down. Changes that could lock unifi-mcp itself out are previewed first and only run with confirm=true (see Protected networks). Give the server a key from a dedicated local admin (see Create the API key), and set UNIFI_MCP_READ_ONLY=true if you only want to look.
Tools
The guard column says what a change needs before it runs:
none: runs straight away (reads, and changes that cannot lock anything out).
confirm if protected: previews unless
confirm=truewhen the target is on, or feeds, a protected network or is the gateway, or when a firewall policy, zone, ACL rule or blocked address can reach a protected network.always confirm: always previews first; runs only with
confirm=true.
site is optional on every tool; with one site the tool uses it.
Tool | Guard | What it does |
| read | The "is anything wrong?" entry point: console, health per subsystem, devices and clients, recent HIGH events. |
| read | Devices with state, firmware, uptime, CPU and memory, and a summary: uplink (parent and port, |
| read | One device in detail. |
| read | Clients, newest activity first; filter by network, offline, blocked. |
| read | One client in detail. |
| read | WAN state, ISP, latency and drops. |
| read | VPN servers and site-to-site tunnels. |
| read | The event log, newest first, paged to a ceiling that is reported when hit. |
| read | SECURITY log entries grouped and checked against port forwards; firewall blocks are grouped by rule and LAN address, inbound or outbound. |
| read | Security posture findings, HIGH first; rules that could not run are listed under |
| read | Zones, zone policies, ACL rules, DNS policies and traffic matching lists as one-line rules; a rule repeated across zone pairs is one row. A collection that cannot be read is named under |
| read | Port forwards, enabled state and exposure. |
| read | WiFi networks with security, network and guest flags. |
| read | Networks with VLAN, subnet, DHCP and isolation. |
| read | Who changed what and when; filter by |
| read | Traffic and client counts over time for the site, an AP, a client or the gateway. |
| read | Top applications and categories by traffic. |
| read | ISP latency, loss and uptime from Site Manager (needs |
| read | Consoles on the Site Manager account (needs |
| confirm if protected | Block a client. |
| none | Unblock a client. |
| confirm if protected | Disconnect a client so it reconnects. |
| confirm if protected | Authorize a guest client. |
| confirm if protected | Revoke a guest's authorization. |
| confirm if protected | Restart a device; the gateway and anything carrying a protected network need |
| confirm if protected | Power-cycle PoE on a switch port. |
| none | Turn a device's locate LED on or off. |
| none | Adopt a device waiting for adoption. |
| always confirm | Remove a device (an online one is factory-reset). |
| none | Create a network. |
| always confirm | Change a network; the preview shows before and after. |
| always confirm | Delete a network. |
| none | Create a WiFi broadcast. |
| always confirm | Change a WiFi broadcast; a passphrase change is never shown back. |
| always confirm | Turn a WiFi broadcast on or off. |
| always confirm | Delete a WiFi broadcast. |
| none | Generate hotspot vouchers. |
| none | Delete one voucher. |
| always confirm | Delete every voucher a filter matches. |
| confirm if protected | Create a zone policy; zones by name. |
| always confirm | Change a user-defined zone policy; the preview shows before and after. |
| confirm if protected | Turn a user-defined zone policy on or off. |
| always confirm | Delete a user-defined zone policy. |
| always confirm | Set the order of a zone pair's user-defined policies. |
| confirm if protected | Create a custom zone, for example to give IoT a zone of its own. |
| always confirm | Rename a custom zone or set its networks. |
| always confirm | Delete a custom zone. |
| confirm if protected | Create a switch ACL rule. |
| always confirm | Change a user-defined ACL rule. |
| always confirm | Delete a user-defined ACL rule. |
| confirm if it names the console | Create a local DNS record or forward domain. When |
| always confirm | Change a DNS policy. |
| always confirm | Delete a DNS policy. |
| none | Create a traffic matching list (IPv4, IPv6 or ports). |
| always confirm | Rename a traffic matching list or replace its items; the preview names the policies that use it. |
| always confirm | Delete a traffic matching list. |
| confirm if protected | Block an IPv4 address or CIDR both ways through the |
| confirm if protected | Take an address off the blocklist; removing the last one deletes the blocklist and needs |
With a Site Manager key there are 58 tools (56 without). In read-only mode only the 19 read tools (17 without the key) are registered.
The zone policy and zone tools and the blocklist need Zone-Based Firewall (UniFi UI, Settings → Policy Engine); while it is off they say so and change nothing, and unifi_list_firewall shows the old-style rules instead. System-defined policies and zones are UniFi's and are refused, as are the IPS auto-blocks, which the console lists without an id.
If the console's official client list doesn't answer, the client tools (unifi_list_clients, unifi_get_client, the client scope of unifi_traffic_report and unifi_top_apps) fall back to the legacy client records and say so in a note, and unifi_overview counts the connected clients from the legacy station list (clientsNote). Block, unblock and reconnect still work; guest authorize and unauthorize refuse until the official list answers. If only the WAN list fails, unifi_posture_audit still runs its zone rules, shows WANs by id and says so in a note.
Related MCP server: UniFi MCP Server
Protected networks
UNIFI_MCP_PROTECTED_NETWORKS (default value pi-cluster; for example servers,management to set your own) names the networks unifi-mcp must not cut itself, or what runs on them, off from. A comma-separated list of names or ids; names ignore case. The guard works out the clients on those networks, the subnets, the devices and ports that carry them (including through daisy-chained switches and APs) and the gateway. A change that touches any of them previews first and runs only with confirm=true. A client or device the guard cannot place leans to confirm.
The names are looked up when the first change runs and again every five minutes, so a newly adopted device or a changed subnet is picked up without a restart. An unknown name is an error that lists the networks that exist, so a typo never leaves a network unprotected. An empty value is a startup error too; to protect only the gateway, say so with none. The protected list is logged at startup, as a warning when it is none. Renaming a protected network makes the guard refuse changes until UNIFI_MCP_PROTECTED_NETWORKS is updated to the new name (or use the network's id).
On a console with more than one site, every change names its site (site), and the guard works out the protected scope of that site: the names are looked up among that site's networks, and each site's scope is cached on its own. A site that has none of the protected networks protects only its gateway. A name that is on no site of the console is the unknown-name error above.
The machine running unifi-mcp is protected only if it sits on a protected network. A stdio run on a desktop on another network can block or disconnect that desktop without a confirm. Run read-only there, or add the desktop's network to UNIFI_MCP_PROTECTED_NETWORKS.
A firewall policy's side that is a zone alone reaches every network in that zone. The default Internal zone holds every LAN, pi-cluster included, so a policy touching the Internal zone is confirm-level unless its filters provably exclude pi-cluster: a NETWORK filter naming only other networks, or IPv4 addresses, ranges or subnets (directly or through an IPv4 traffic matching list) outside pi-cluster's subnet. 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.
Write tools act only on an exact client or device: an id, MAC, IP or full name. A partial name comes back as candidates to ask again with, and nothing changes.
Accepted posture findings
Some exposure is intended: a port forward you run on purpose, an SSID kept on WPA2 for old devices. UNIFI_MCP_ACCEPTED_FINDINGS lists those findings so unifi_posture_audit stops raising them on every run:
UNIFI_MCP_ACCEPTED_FINDINGS=port-forward-open:PLEX,port-forward-open:reverse,wifi-weak:TP-Link_D3C0,policy-any-any:Allow Internal to IoTEach entry is rule:object, comma-separated: the rule name a finding carries and its object, exactly as the audit prints it (case counts, no prefixes; the object is everything after the first colon, so it may hold a colon but not a comma). An accepted finding is not dropped: it moves to accepted with its severity and leaves counts. One entry accepts every finding of that rule on that object, so wifi-weak:<ssid> also covers a later guest-isolation finding on the same SSID.
An entry that matches no finding (the forward was removed or renamed) is listed under staleAccepted, so the list can't rot unseen. An entry whose rule was skipped this run (zone rules while Zone-Based Firewall is off) is not stale. An unknown rule name or an entry without an object is a startup error; the accepted list is logged at startup.
Configuration
Variable | Required | Purpose |
| yes | Console URL, e.g. |
| yes | The console's API key (see below). |
| yes, unless | SHA-256 fingerprint of the console's certificate; the connection is pinned to it. |
| no |
|
| no | Site Manager (unifi.ui.com) key; adds |
| no |
|
| no | Comma-separated network names or ids. The default value is |
| no | Comma-separated |
| no |
|
| no | HTTP port, default |
| for | Bearer token MCP clients must send. |
The HTTP transport serves MCP at /mcp (bearer auth) and an unauthenticated /healthz for probes. Requests to the console time out after 15 seconds.
Get the fingerprint
echo | openssl s_client -connect 192.168.1.1:443 2>/dev/null | openssl x509 -noout -fingerprint -sha256Pass the value after sha256 Fingerprint= as UNIFI_TLS_FINGERPRINT. UniFi OS regenerates its certificate on some upgrades; unifi-mcp then reports "console certificate changed: expected …, got …" and you update the fingerprint.
Create the API key
Create a dedicated local admin named unifi-mcp with the full administrator role (the Network API keys inherit their user's rights), sign in as it once, and create the key there. The menu depends on your Network version: Settings → Control Plane → Integrations, or Settings → Integrations. A dedicated admin means the audit log can tell unifi-mcp's changes from yours: unifi_audit_log takes actor: 'unifi-mcp'.
Run
docker run --rm -p 3000:3000 \
-e UNIFI_URL=https://192.168.1.1 \
-e UNIFI_API_KEY=your-api-key \
-e UNIFI_TLS_FINGERPRINT=AA:BB:...:FF \
-e UNIFI_MCP_TOKEN=a-long-random-secret \
ghcr.io/jfms7s/unifi-mcp:v0.4.0Pin a vX.Y.Z tag, not latest, so an upgrade is a decision you make.
Claude Code (~/.claude.json, mcpServers), over HTTP:
"unifi": {
"type": "http",
"url": "https://unifi-mcp.example.com/mcp",
"headers": { "Authorization": "Bearer a-long-random-secret" }
}From source
git clone https://github.com/jfms7s/unifi-mcp.git
cd unifi-mcp
npm ci
npm run buildThen point Claude Code at the build, over stdio:
"unifi": {
"type": "stdio",
"command": "node",
"args": ["/path/to/unifi-mcp/dist/index.js"],
"env": {
"UNIFI_URL": "https://192.168.1.1",
"UNIFI_API_KEY": "your-api-key",
"UNIFI_TLS_FINGERPRINT": "AA:BB:...:FF",
"UNIFI_MCP_READ_ONLY": "true"
}
}Development
npm ci
npm run typecheck
npm run lint
npm run format:check # npm run format to fix
npm test # npm run test:coverage for an lcov report
npm run buildTests mock all HTTP with msw; no console is needed. npm run smoke calls every read tool once against a live console (set the variables above first) and prints each tool's name, OK or ERR and the size of its output, never the output. It is never run in CI.
Available Tools
56 toolsunifi_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.
Inputs: mac (required), site.
unifi_audit_logARead-onlyIdempotent
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.
Inputs: site, actor, limit, since, +1 more.
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.
Inputs: client (required), site, rxKbps, txKbps, +3 more.
unifi_block_clientADestructiveIdempotent
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.
Inputs: client (required), site, confirm.
unifi_block_ipADestructiveIdempotent
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.
Inputs: ip (required), site, reason, confirm.
unifi_create_acl_ruleADestructive
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.
Inputs: name (required), action (required), site, type, +8 more.
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.
Inputs: type (required), domain (required), port, site, +14 more.
unifi_create_firewall_policyADestructive
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.
Inputs: name (required), action (required), source (required), destination (required), +11 more.
unifi_create_firewall_zoneADestructive
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.
Inputs: name (required), site, confirm, networks.
unifi_create_networkA
Create a network (official POST /networks). Takes the official Create or update Network request: GATEWAY networks also need cellularBackupEnabled, internetAccessEnabled, isolationEnabled and ipv4Configuration.
Inputs: name (required), vlanId (required), management (required), site, +10 more.
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.
Inputs: name (required), type (required), items (required), site.
unifi_create_vouchersB
Generate hotspot (guest portal) vouchers (official POST /hotspot/vouchers) and return their codes.
Inputs: name (required), timeLimitMinutes (required), site, count, +4 more.
unifi_create_wifiC
Create a WiFi broadcast (SSID) (official POST /wifi/broadcasts), from the official Wifi broadcast create or update request. Security: {type OPEN|WPA2_PERSONAL|WPA3_PERSONAL|WPA2_WPA3_PERSONAL|WPA2_ENTERPRISE|..., passphrase (8-63), pmfMode, presharedKeys, ...}. The passphrase is never shown back.
Inputs: name (required), type (required), enabled (required), hideName (required), +24 more.
unifi_delete_acl_ruleADestructiveIdempotent
Delete a user-defined ACL rule (official DELETE). Always needs confirm: true; without it the tool previews. Rules UniFi made are refused.
Inputs: aclRule (required), site, confirm.
unifi_delete_dns_policyADestructiveIdempotent
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.
Inputs: dnsPolicy (required), site, confirm.
unifi_delete_firewall_policyADestructiveIdempotent
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.
Inputs: policy (required), site, confirm.
unifi_delete_firewall_zoneADestructiveIdempotent
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.
Inputs: zone (required), site, confirm.
unifi_delete_networkADestructiveIdempotent
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.
Inputs: network (required), site, confirm.
unifi_delete_traffic_listADestructiveIdempotent
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.
Inputs: trafficList (required), site, confirm.
unifi_delete_voucherBDestructiveIdempotent
Delete one hotspot voucher by its id (official DELETE).
Inputs: voucherId (required), site.
unifi_delete_vouchersADestructiveIdempotent
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.
Inputs: ids, name, site, confirm, +1 more.
unifi_delete_wifiADestructiveIdempotent
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.
Inputs: wifi (required), site, confirm.
unifi_eventsARead-onlyIdempotent
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.
Inputs: site, text, limit, since, +5 more.
unifi_get_clientARead-onlyIdempotent
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.
Inputs: client (required), site.
unifi_get_deviceARead-onlyIdempotent
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.
Inputs: device (required), site.
unifi_list_clientsARead-onlyIdempotent
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.
Inputs: ap, site, limit, wired, +4 more.
unifi_list_devicesARead-onlyIdempotent
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.
Inputs: site.
unifi_list_firewallARead-onlyIdempotent
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.
Inputs: site.
unifi_list_networksBRead-onlyIdempotent
Networks (LAN and WAN): name, official id and legacy id, purpose, VLAN, subnet, DHCP, isolation, internet access, and the WAN address.
Inputs: site.
unifi_list_port_forwardsBRead-onlyIdempotent
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).
Inputs: site.
unifi_list_wifiBRead-onlyIdempotent
WiFi networks (SSIDs): security (open, WPA2, WPA2/WPA3, WPA3), the network they bridge to, guest and client isolation, hidden, bands and PMF.
Inputs: site.
unifi_locate_deviceAIdempotent
Turn the locate LED (blinking) of a device on or off (legacy cmd/devmgr set-locate / unset-locate).
Inputs: on (required), device (required), site.
unifi_overviewARead-onlyIdempotent
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.
Inputs: site.
unifi_posture_auditARead-onlyIdempotent
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.
Inputs: site, threatDays, newClientDays.
unifi_power_cycle_portADestructive
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.
Inputs: port (required), device (required), site, confirm.
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.
Inputs: client (required), site, confirm.
unifi_reorder_firewall_policiesADestructiveIdempotent
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.
Inputs: sourceZone (required), destinationZone (required), beforeSystemDefined (required), site, +2 more.
unifi_restart_deviceADestructive
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.
Inputs: device (required), site, confirm.
unifi_set_firewall_policy_enabledADestructiveIdempotent
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.
Inputs: policy (required), enabled (required), site, confirm.
unifi_set_wifi_enabledADestructiveIdempotent
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.
Inputs: wifi (required), enabled (required), site, confirm.
unifi_threat_summaryARead-onlyIdempotent
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.
Inputs: site, since, until, maxGroups.
unifi_top_appsARead-onlyIdempotent
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.
Inputs: site, client.
unifi_traffic_reportARead-onlyIdempotent
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.
Inputs: scope (required), site, since, until, +3 more.
unifi_unadopt_deviceADestructiveIdempotent
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.
Inputs: device (required), site, confirm.
unifi_unauthorize_guestAIdempotent
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.
Inputs: client (required), site, confirm.
unifi_unblock_clientAIdempotent
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.
Inputs: client (required), site, confirm.
unifi_unblock_ipADestructiveIdempotent
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.
Inputs: ip (required), site, confirm.
unifi_update_acl_ruleADestructiveIdempotent
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.
Inputs: aclRule (required), name, site, type, +9 more.
unifi_update_dns_policyADestructiveIdempotent
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.
Inputs: dnsPolicy (required), port, site, text, +14 more.
unifi_update_firewall_policyADestructiveIdempotent
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.
Inputs: policy (required), name, site, action, +12 more.
unifi_update_firewall_zoneADestructiveIdempotent
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.
Inputs: zone (required), name, site, confirm, +1 more.
unifi_update_networkADestructiveIdempotent
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.
Inputs: network (required), name, site, vlanId, +12 more.
unifi_update_traffic_listADestructiveIdempotent
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.
Inputs: trafficList (required), name, site, items, +1 more.
unifi_update_wifiADestructiveIdempotent
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.
Inputs: wifi (required), name, site, type, +26 more.
unifi_vpn_statusBRead-onlyIdempotent
VPN servers and site-to-site tunnels with their state, plus the console's VPN health.
Inputs: site.
unifi_wan_statusARead-onlyIdempotent
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).
Inputs: site, since, until.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Related MCP Connectors
IP intelligence, network diagnostics, and AI service availability tools for AI agents.
Discover, inspect and run 63,000+ agent tools from one balance. Pay per call, no subscriptions.
40 WHOIS, DNS, IP, threat intelligence, email, and bulk tools for AI agents via WhoisXML API.
49 free agent tools: WHOIS, PDF to text, email checks, FX rates, X12 EDI, JSON repair. No API key.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to interact with Ubiquiti UniFi network infrastructure for monitoring devices, managing clients, and performing configuration tasks like blocking/unblocking devices and viewing network health.101GPL 3.0
- AlicenseDqualityNot gradedmaintenanceEnables comprehensive management of UniFi network infrastructure through the UniFi Cloud API, including device control, client management, camera settings, and access door control through natural language.39MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to manage and monitor UniFi Network Controllers through natural language. Provides 25 read-only tools for discovering devices and clients, viewing security configurations, analyzing network statistics, and exporting configuration data.41MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to manage UniFi network infrastructure through 50+ tools covering devices, clients, networks, WiFi, firewall rules, and guest access using the official UniFi Network API.525MIT