Skip to main content
Glama

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=true when 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

unifi_overview

read

The "is anything wrong?" entry point: console, health per subsystem, devices and clients, recent HIGH events.

unifi_list_devices

read

Devices with state, firmware, uptime, CPU and memory, and a summary: uplink (parent and port, WAN for the gateway, the last one for an offline device), ports up and PoE in use, and AP radios with channel and clients.

unifi_get_device

read

One device in detail.

unifi_list_clients

read

Clients, newest activity first; filter by network, offline, blocked.

unifi_get_client

read

One client in detail.

unifi_wan_status

read

WAN state, ISP, latency and drops.

unifi_vpn_status

read

VPN servers and site-to-site tunnels.

unifi_events

read

The event log, newest first, paged to a ceiling that is reported when hit.

unifi_threat_summary

read

SECURITY log entries grouped and checked against port forwards; firewall blocks are grouped by rule and LAN address, inbound or outbound.

unifi_posture_audit

read

Security posture findings, HIGH first; rules that could not run are listed under skipped, findings accepted with UNIFI_MCP_ACCEPTED_FINDINGS under accepted.

unifi_list_firewall

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 unavailable; without the zones, policy sides read zone <id prefix>.

unifi_list_port_forwards

read

Port forwards, enabled state and exposure.

unifi_list_wifi

read

WiFi networks with security, network and guest flags.

unifi_list_networks

read

Networks with VLAN, subnet, DHCP and isolation.

unifi_audit_log

read

Who changed what and when; filter by actor.

unifi_traffic_report

read

Traffic and client counts over time for the site, an AP, a client or the gateway. device must be an AP (scope ap) or a gateway (scope gateway); client is only for scope client.

unifi_top_apps

read

Top applications and categories by traffic.

unifi_isp_metrics

read

ISP latency, loss and uptime from Site Manager (needs UNIFI_SITE_MANAGER_API_KEY).

unifi_list_hosts

read

Consoles on the Site Manager account (needs UNIFI_SITE_MANAGER_API_KEY).

unifi_block_client

confirm if protected

Block a client.

unifi_unblock_client

none

Unblock a client.

unifi_reconnect_client

confirm if protected

Disconnect a client so it reconnects.

unifi_authorize_guest

confirm if protected

Authorize a guest client.

unifi_unauthorize_guest

confirm if protected

Revoke a guest's authorization.

unifi_restart_device

confirm if protected

Restart a device; the gateway and anything carrying a protected network need confirm=true.

unifi_power_cycle_port

confirm if protected

Power-cycle PoE on a switch port.

unifi_locate_device

none

Turn a device's locate LED on or off.

unifi_adopt_device

none

Adopt a device waiting for adoption.

unifi_unadopt_device

always confirm

Remove a device (an online one is factory-reset).

unifi_create_network

none

Create a network.

unifi_update_network

always confirm

Change a network; the preview shows before and after.

unifi_delete_network

always confirm

Delete a network.

unifi_create_wifi

none

Create a WiFi broadcast.

unifi_update_wifi

always confirm

Change a WiFi broadcast; a passphrase change is never shown back.

unifi_set_wifi_enabled

always confirm

Turn a WiFi broadcast on or off.

unifi_delete_wifi

always confirm

Delete a WiFi broadcast.

unifi_create_vouchers

none

Generate hotspot vouchers.

unifi_delete_voucher

none

Delete one voucher.

unifi_delete_vouchers

always confirm

Delete every voucher a filter matches.

unifi_create_firewall_policy

confirm if protected

Create a zone policy; zones by name.

unifi_update_firewall_policy

always confirm

Change a user-defined zone policy; the preview shows before and after.

unifi_set_firewall_policy_enabled

confirm if protected

Turn a user-defined zone policy on or off.

unifi_delete_firewall_policy

always confirm

Delete a user-defined zone policy.

unifi_reorder_firewall_policies

always confirm

Set the order of a zone pair's user-defined policies.

unifi_create_firewall_zone

confirm if protected

Create a custom zone, for example to give IoT a zone of its own.

unifi_update_firewall_zone

always confirm

Rename a custom zone or set its networks.

unifi_delete_firewall_zone

always confirm

Delete a custom zone.

unifi_create_acl_rule

confirm if protected

Create a switch ACL rule.

unifi_update_acl_rule

always confirm

Change a user-defined ACL rule.

unifi_delete_acl_rule

always confirm

Delete a user-defined ACL rule.

unifi_create_dns_policy

confirm if it names the console

Create a local DNS record or forward domain. When UNIFI_URL is a hostname, a record for it, or a forward of it or a parent domain, needs confirm=true (case and a trailing dot don't matter).

unifi_update_dns_policy

always confirm

Change a DNS policy.

unifi_delete_dns_policy

always confirm

Delete a DNS policy.

unifi_create_traffic_list

none

Create a traffic matching list (IPv4, IPv6 or ports).

unifi_update_traffic_list

always confirm

Rename a traffic matching list or replace its items; the preview names the policies that use it.

unifi_delete_traffic_list

always confirm

Delete a traffic matching list.

unifi_block_ip

confirm if protected

Block an IPv4 address or CIDR both ways through the unifi-mcp blocklist; the first call creates the list and its two policies and needs confirm=true once. A range wider than /16 (prefix shorter than 16) needs confirm=true too.

unifi_unblock_ip

confirm if protected

Take an address off the blocklist; removing the last one deletes the blocklist and needs confirm=true, as does a range wider than /16.

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 IoT

Each 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

UNIFI_URL

yes

Console URL, e.g. https://192.168.1.1.

UNIFI_API_KEY

yes

The console's API key (see below).

UNIFI_TLS_FINGERPRINT

yes, unless UNIFI_TLS_INSECURE=true

SHA-256 fingerprint of the console's certificate; the connection is pinned to it.

UNIFI_TLS_INSECURE

no

true turns certificate checks off. Local experiments only.

UNIFI_SITE_MANAGER_API_KEY

no

Site Manager (unifi.ui.com) key; adds unifi_list_hosts and unifi_isp_metrics.

UNIFI_MCP_READ_ONLY

no

true registers the read tools only.

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.

UNIFI_MCP_ACCEPTED_FINDINGS

no

Comma-separated rule:object posture findings accepted as intended; see Accepted posture findings. Unset or empty accepts none.

UNIFI_MCP_TRANSPORT

no

stdio (default), http or both. The image sets http.

UNIFI_MCP_PORT

no

HTTP port, default 3000.

UNIFI_MCP_TOKEN

for http/both

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 -sha256

Pass 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.0

Pin 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 build

Then 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 build

Tests 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 tools
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.

Inputs: mac (required), site.

unifi_audit_logA
Read-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_clientA
DestructiveIdempotent

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_ipA
DestructiveIdempotent

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_ruleA
Destructive

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_policyA
Destructive

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_zoneA
Destructive

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_ruleA
DestructiveIdempotent

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_policyA
DestructiveIdempotent

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_policyA
DestructiveIdempotent

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_zoneA
DestructiveIdempotent

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_networkA
DestructiveIdempotent

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_listA
DestructiveIdempotent

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_voucherB
DestructiveIdempotent

Delete one hotspot voucher by its id (official DELETE).

Inputs: voucherId (required), site.

unifi_delete_vouchersA
DestructiveIdempotent

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_wifiA
DestructiveIdempotent

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_eventsA
Read-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_clientA
Read-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_deviceA
Read-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_clientsA
Read-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_devicesA
Read-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_firewallA
Read-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_networksB
Read-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_forwardsB
Read-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_wifiB
Read-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_deviceA
Idempotent

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_overviewA
Read-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_auditA
Read-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_portA
Destructive

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_policiesA
DestructiveIdempotent

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_deviceA
Destructive

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_enabledA
DestructiveIdempotent

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_enabledA
DestructiveIdempotent

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_summaryA
Read-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_appsA
Read-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_reportA
Read-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_deviceA
DestructiveIdempotent

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_guestA
Idempotent

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_clientA
Idempotent

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_ipA
DestructiveIdempotent

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_ruleA
DestructiveIdempotent

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_policyA
DestructiveIdempotent

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_policyA
DestructiveIdempotent

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_zoneA
DestructiveIdempotent

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_networkA
DestructiveIdempotent

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_listA
DestructiveIdempotent

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_wifiA
DestructiveIdempotent

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_statusB
Read-onlyIdempotent

VPN servers and site-to-site tunnels with their state, plus the console's VPN health.

Inputs: site.

unifi_wan_statusA
Read-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

    A3.5/5.0

    Scored across 56 tools

    Disambiguation5/5

    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.

    Naming Consistency4/5

    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.

    Tool Count1/5

    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.

    Completeness3/5

    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

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables 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.
      10
      1
      GPL 3.0
    • A
      license
      D
      quality
      Not graded
      maintenance
      Enables 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.
      39
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables 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.
      41
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables 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.
      52
      5
      MIT