Skip to main content
Glama
unifi-mcp-server

unifi-mcp-server

by PainInTheNic

unifi-mcp-server

An MCP (Model Context Protocol) server that lets Claude manage your Ubiquiti UniFi network through the official UniFi Network API — list devices and clients, check health stats, inspect and edit networks / WiFi / firewall / ACL / DNS config, adopt or restart devices, power-cycle PoE ports, and manage guest access and hotspot vouchers.

How it works

┌────────────┐   JSON-RPC over stdio   ┌──────────────────┐   HTTPS + X-API-KEY   ┌───────────────┐
│ Claude Code │ ◄────────────────────► │ unifi-mcp-server │ ◄──────────────────►  │ UniFi console │
│  (client)   │    tools/list,         │  (this project,  │  /proxy/network/      │ (UDM, UCG,    │
│             │    tools/call          │   Node process)  │  integration/v1/...   │  Cloud Key…)  │
└────────────┘                         └──────────────────┘                       └───────────────┘
  • Where it runs: on your machine. Claude Code launches node dist/index.js as a subprocess each session and talks JSON-RPC to it over stdin/stdout. Nothing is hosted anywhere; the only network traffic is HTTPS from this machine to your console.

  • What a "tool" is: a typed function this server registers (e.g. unifi_list_devices). Claude sees each tool's name, description, and input schema, decides when to call it, and gets text back.

  • Auth: a UniFi API key sent as the X-API-KEY header. The key lives in an environment variable — never in code.

Related MCP server: unifi-mcp

Requirements

  • A UniFi OS console (UDM/UDR/UCG/Cloud Key Gen2+, port 443) or UniFi OS Server (port 11443) running Network 9.0+. Network 10.x unlocks the full tool set (networks, WiFi, firewall, ACL, DNS tools); on 9.x those return a clear "not supported" error while devices/clients/vouchers still work. ⚠ The legacy self-hosted Network Server (port 8443) does not support API-key auth and will not work with this server.

  • Node.js 18+ on this machine.

Setup

1. Create a UniFi API key

  1. Open your UniFi console in a browser and go to the Network application.

  2. Go to Settings → Control Plane → Integrations (on newer 10.x versions this may appear as Settings → Integrations).

  3. Click Create API Key, name it (e.g. claude-mcp), and copy it immediately — it is shown only once.

2. Build

npm install
npm run build

3. Register with Claude Code

claude mcp add --scope user unifi --env UNIFI_BASE_URL=https://YOUR_CONSOLE_IP --env UNIFI_API_KEY=YOUR_KEY --env UNIFI_TLS_VERIFY=false -- node "C:\path\to\MCP-UniFi\dist\index.js"
  • --scope user makes the server available in every project (omit for just the current one).

  • Drop --env UNIFI_TLS_VERIFY=false if your console has a real (trusted) TLS certificate — verification is on by default. The flag is needed for the self-signed certificate consoles ship with; the server logs a warning when verification is off.

  • The key is stored in your user-level Claude settings file in your profile directory. If you prefer it in a system environment variable instead, set UNIFI_API_KEY machine-wide and register without the --env UNIFI_API_KEY flag — the server reads the process environment.

Verify with claude mcp list, then just ask Claude things like:

  • "Which UniFi devices are offline right now?"

  • "Show me the health stats for my main switch."

  • "What clients are on the guest network?"

  • "Generate 5 guest WiFi vouchers for the weekend, 24h each."

  • "Power-cycle the PoE port my camera is on." (asks you to confirm first)

Configuration reference

Env var

Required

Default

Meaning

UNIFI_BASE_URL

yes

—

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

UNIFI_API_KEY

yes

—

API key from Settings → Control Plane → Integrations

UNIFI_TLS_VERIFY

no

true

TLS cert validation (secure by default). Set false only for self-signed console certs on a trusted LAN — it allows on-path interception of the API key.

UNIFI_API_PATH

no

/proxy/network/integration

Path prefix override (rarely needed)

Tools (73)

Read-only (40) — safe, no side effects:

  • Discovery: unifi_get_application_info, unifi_get_system_info, unifi_list_sites

  • Devices: unifi_list_devices, unifi_get_device, unifi_get_device_statistics, unifi_list_pending_devices

  • Clients: unifi_list_clients, unifi_get_client

  • Networks / topology: unifi_list_networks, unifi_get_network, unifi_get_network_references, unifi_list_wans, unifi_list_vpn

  • WiFi: unifi_list_wifi, unifi_get_wifi

  • Firewall / security: unifi_list_firewall_policies, unifi_get_firewall_policy, unifi_get_firewall_policy_ordering, unifi_list_firewall_zones, unifi_list_acl_rules, unifi_get_acl_rule, unifi_get_acl_rule_ordering, unifi_list_dns_policies, unifi_get_dns_policy, unifi_list_traffic_matching_lists, unifi_get_traffic_matching_list

  • Switching: unifi_list_lags, unifi_get_lag, unifi_list_mclag_domains, unifi_get_mclag_domain, unifi_list_switch_stacks, unifi_get_switch_stack

  • Reference data: unifi_list_countries, unifi_list_dpi_applications, unifi_list_dpi_categories, unifi_list_device_tags, unifi_list_radius_profiles

  • Vouchers: unifi_list_vouchers, unifi_get_voucher

Write (33) — change things; Claude Code prompts for permission, and the ones that can disrupt the network are annotated destructiveHint (⚠) so clients warn first:

  • Devices: unifi_adopt_device, unifi_unadopt_device ⚠, unifi_restart_device ⚠, unifi_power_cycle_port ⚠

  • Guest access: unifi_authorize_guest_access, unifi_unauthorize_guest_access ⚠

  • Networks: unifi_create_network, unifi_update_network ⚠, unifi_delete_network ⚠

  • WiFi: unifi_create_wifi, unifi_update_wifi ⚠, unifi_delete_wifi ⚠

  • Firewall policies: unifi_set_firewall_policy_enabled ⚠, unifi_create_firewall_policy ⚠, unifi_update_firewall_policy ⚠, unifi_delete_firewall_policy ⚠, unifi_reorder_firewall_policies ⚠

  • Firewall zones: unifi_create_firewall_zone, unifi_update_firewall_zone ⚠, unifi_delete_firewall_zone ⚠

  • ACL rules: unifi_create_acl_rule ⚠, unifi_update_acl_rule ⚠, unifi_delete_acl_rule ⚠, unifi_reorder_acl_rules ⚠

  • DNS records: unifi_create_dns_policy, unifi_update_dns_policy ⚠, unifi_delete_dns_policy ⚠

  • Traffic-matching lists: unifi_create_traffic_matching_list, unifi_update_traffic_matching_list ⚠, unifi_delete_traffic_matching_list ⚠

  • Vouchers: unifi_generate_vouchers, unifi_delete_voucher ⚠, unifi_delete_vouchers ⚠ (bulk, filter required)

Editing config: create_* tools take a config object (the full resource); update_* tools do a full replacement — fetch the current object with the matching get_* tool using responseFormat: 'json', change what you need, and pass it back. List tools support limit/offset pagination and UniFi filter expressions, e.g. state.eq('OFFLINE'), access.type.eq('GUEST'), name.like('Office*'). Every tool also accepts responseFormat: 'json' for the raw API object.

unifi_get_system_info (Network app version and update availability) reads the console's legacy, undocumented Network API, which also accepts the API key. It may break on a future Network version. UniFi OS update availability needs an admin login session, so no tool can report it.

Security notes

  • The API key is only read from the environment and never appears in tool output or logs.

  • WiFi passphrases and any credential-looking fields are redacted from responses (shown as [redacted]). Write tools refuse any value you or Claude supply that contains that placeholder (anywhere in the request, names included) before sending anything, so a fetch-modify-write can never save it as the literal new passphrase — supply the real value or leave the field out. (unifi_set_firewall_policy_enabled is exempt: it writes back the console's own unredacted copy of the policy plus the new on/off state.)

  • HTTP redirects are never followed, so the X-API-KEY header cannot be forwarded to another host; a redirect is reported as an error pointing at UNIFI_BASE_URL.

  • TLS verification is ON by default. UNIFI_TLS_VERIFY=false is an explicit opt-out for self-signed console certs (the server logs a warning); install a proper certificate on the console to remove the need for it.

  • All resource IDs are validated as UUIDs before being placed in URLs, so a malformed ID can never redirect a request to a different endpoint.

  • Write tools describe their blast radius in their descriptions so Claude confirms with you before rebooting infrastructure.

Known limitations (of the official UniFi API, not this server)

Not available in the official Integration API as of v10.4.57 — these would require the unofficial legacy API (a possible phase 2):

  • Block / unblock / kick a client

  • Firmware upgrades, locate-LED

  • Port forwarding, static routes, traffic rules/QoS, per-port switch config

  • Historical statistics, events, alarms (only latest per-device stats exist)

Development

npm run dev        # run from source (tsx)
npm run build      # compile to dist/
npm test           # offline unit tests (node:test via tsx)
npm run inspect    # open MCP Inspector against the built server

Ground truth for the API: https://developer.ui.com/network/v10.4.57/openapi.json (also llms.txt and a Postman collection at the same base URL).

License

MIT © PainInTheNic

Available Tools

73 tools
unifi_adopt_deviceAdopt Pending DeviceA
Idempotent

Adopt a pending UniFi device (from unifi_list_pending_devices) into a site, identified by its MAC address. The device will provision and join the network under this controller.

Inputs: macAddress (required), siteId, ignoreDeviceLimit.

unifi_authorize_guest_accessAuthorize Guest AccessA

Authorize a client for guest network access (hotspot/captive-portal networks), optionally with time, data, or bandwidth limits. Only meaningful for clients on a guest network. NOTE: re-authorizing an already-authorized guest cancels the existing authorization, restarts the expiry clock, and resets traffic counters — do not retry this call casually.

Inputs: clientId (required), siteId, rxRateLimitKbps, txRateLimitKbps, +2 more.

unifi_create_acl_ruleCreate ACL RuleA
Destructive

Create a layer-2/switch ACL rule. 'config' requires action (ALLOW/BLOCK), enabled, name, type; plus sourceFilter/destinationFilter/enforcingDeviceFilter as needed. Model it on an existing rule fetched via unifi_get_acl_rule. CAUTION: changes switching-level access; confirm with the user.

Inputs: config (required), siteId.

unifi_create_dns_policyCreate DNS Record / PolicyA

Create a local DNS record or forward-domain policy. 'config' requires type (A_RECORD/AAAA_RECORD/CNAME_RECORD/MX_RECORD/SRV_RECORD/TXT_RECORD/FORWARD_DOMAIN) and enabled, plus the type-specific fields (e.g. domain + ipv4Address + ttlSeconds for A_RECORD; domain + ipAddress for FORWARD_DOMAIN). This is local DNS record management, NOT domain blocking. Easiest: model it on an existing entry fetched via unifi_get_dns_policy (responseFormat='json').

Inputs: config (required), siteId.

unifi_create_firewall_policyCreate Firewall PolicyA
Destructive

Create a zone-based firewall policy. 'config' is the full policy object; required: name, enabled, action (ALLOW/BLOCK/REJECT), source, destination, ipProtocolScope, loggingEnabled. Model it on an existing policy fetched via unifi_get_firewall_policy. CAUTION: a new ALLOW/BLOCK policy changes live traffic filtering — confirm with the user.

Inputs: config (required), siteId.

unifi_create_firewall_zoneCreate Custom Firewall ZoneA

Create a custom firewall zone grouping one or more networks. 'config' requires name (string) and networkIds (array of network UUIDs from unifi_list_networks). Returns the created zone.

Inputs: config (required), siteId.

unifi_create_networkCreate Network (LAN/VLAN)A

Create a new LAN network / VLAN on a site. 'config' is the full network object; required for all: name (string), vlanId (integer), management (string), enabled (boolean). For GATEWAY/SWITCH-managed networks (management != "UNMANAGED"), ipv4Configuration (subnet + DHCP) is ALSO required — plus, for GATEWAY, isolationEnabled, internetAccessEnabled, and cellularBackupEnabled. Easiest: model it on an existing network fetched via unifi_get_network with responseFormat='json', changing name/vlanId/subnet. Returns the created network.

Inputs: config (required), siteId.

unifi_create_traffic_matching_listCreate Traffic Matching ListA

Create a reusable traffic-matching list (named IP-address or port list referenced by firewall policies). 'config' requires name and type (IPV4_ADDRESSES / IPV6_ADDRESSES / PORTS), plus the list entries. Model it on an existing list via unifi_get_traffic_matching_list.

Inputs: config (required), siteId.

unifi_create_wifiCreate WiFi Network (SSID)A

Create a new WiFi network (SSID / broadcast). 'config' is the full broadcast object. Because the required fields vary by type (a STANDARD SSID additionally needs advertiseDeviceName, arpProxyEnabled, broadcastingFrequenciesGHz, and bssTransitionEnabled on top of the base name, enabled, type, securityConfiguration, network, hideName, clientIsolationEnabled, uapsdEnabled, channel2gLockedTo6, dtimPeriod2gLockedTo3, multicastToUnicastConversionEnabled), the reliable path is to fetch an existing SSID with unifi_get_wifi (responseFormat='json'), copy its shape, and change name/network. Reads show the passphrase as '[redacted]' and a config still containing that placeholder is refused, so set a real passphrase in securityConfiguration (ask the user). Returns the created SSID.

Inputs: config (required), siteId.

unifi_delete_acl_ruleDelete ACL RuleA
DestructiveIdempotent

Delete an ACL rule. CAUTION: irreversible and changes switching-level access; confirm with the user. IDs come from unifi_list_acl_rules.

Inputs: aclRuleId (required), siteId.

unifi_delete_dns_policyDelete DNS Record / PolicyA
DestructiveIdempotent

Delete a local DNS record / forward-domain policy. CAUTION: irreversible; confirm with the user. IDs come from unifi_list_dns_policies.

Inputs: dnsPolicyId (required), siteId.

unifi_delete_firewall_policyDelete Firewall PolicyA
DestructiveIdempotent

Delete a user-defined firewall policy. CAUTION: irreversible and changes live traffic filtering — confirm with the user and verify the policy with unifi_get_firewall_policy first. System-defined policies cannot be deleted. IDs come from unifi_list_firewall_policies.

Inputs: policyId (required), siteId.

unifi_delete_firewall_zoneDelete Custom Firewall ZoneA
DestructiveIdempotent

Delete a custom firewall zone. Only custom (user-defined) zones can be deleted — system zones cannot. CAUTION: irreversible; policies referencing this zone may be affected. Confirm with the user. IDs come from unifi_list_firewall_zones.

Inputs: zoneId (required), siteId.

unifi_delete_networkDelete Network (LAN/VLAN)A
DestructiveIdempotent

Delete a LAN network / VLAN. CAUTION: irreversible — clients on it lose their network and dependent WiFi/firewall/routes may break. Check unifi_get_network_references first and confirm with the user. Set force=true to delete even while other resources still reference it. IDs come from unifi_list_networks.

Inputs: networkId (required), force, siteId.

unifi_delete_traffic_matching_listDelete Traffic Matching ListA
DestructiveIdempotent

Delete a traffic-matching list. CAUTION: irreversible; firewall policies referencing it may break. Confirm with the user. IDs come from unifi_list_traffic_matching_lists.

Inputs: trafficMatchingListId (required), siteId.

unifi_delete_voucherDelete Hotspot VoucherA
DestructiveIdempotent

Delete one hotspot voucher by ID, revoking the code. IDs come from unifi_list_vouchers. This cannot be undone — confirm with the user first.

Inputs: voucherId (required), siteId.

unifi_delete_vouchersDelete Hotspot Vouchers (bulk)A
DestructiveIdempotent

Delete every hotspot voucher matching a filter, in one call. A filter is REQUIRED so this can't wipe all vouchers by accident — e.g. "expired.eq(true)" to clear expired ones, or "name.eq('Weekend guests')" for a batch. CAUTION: irreversible; confirm with the user. To delete a single voucher by ID, use unifi_delete_voucher instead.

Inputs: filter (required), siteId.

unifi_delete_wifiDelete WiFi Network (SSID)A
DestructiveIdempotent

Delete a WiFi SSID. CAUTION: irreversible — connected clients lose this network. Confirm with the user. Set force=true to delete even if other resources reference it. IDs come from unifi_list_wifi.

Inputs: wifiId (required), force, siteId.

unifi_generate_vouchersGenerate Hotspot VouchersA

Generate new guest hotspot voucher codes with optional time/data/bandwidth limits. Returns the generated codes — share them with guests to grant WiFi access.

Inputs: name (required), count, siteId, rxRateLimitKbps, +4 more.

unifi_get_acl_ruleGet ACL Rule DetailsA
Read-onlyIdempotent

Get the full definition of one layer-2/switch ACL rule by ID: source/destination filters (IP- or MAC-based), enforcing-device filter, action, and index. IDs come from unifi_list_acl_rules.

Inputs: aclRuleId (required), siteId.

unifi_get_acl_rule_orderingGet ACL Rule OrderingA
Read-onlyIdempotent

Get the current evaluation order of user-defined ACL rules (an ordered list of rule IDs). Use this before unifi_reorder_acl_rules.

Inputs: siteId.

unifi_get_application_infoGet UniFi Application InfoA
Read-onlyIdempotent

Get the UniFi Network application version running on the console. Useful as a connectivity check — if this fails, the base URL or API key is misconfigured.

Inputs: no named parameters.

unifi_get_clientGet Connected Client DetailsA
Read-onlyIdempotent

Get full details for one currently connected client by ID (IDs come from unifi_list_clients): connection type, IP/MAC, access type (default/guest), uplink device, and connection time.

Inputs: clientId (required), siteId, responseFormat.

unifi_get_deviceGet UniFi Device DetailsA
Read-onlyIdempotent

Get full details for one adopted UniFi device by ID: firmware version and update availability, adoption time, port table (with PoE state), and radio table. Get device IDs from unifi_list_devices.

Inputs: deviceId (required), siteId, responseFormat.

unifi_get_device_statisticsGet UniFi Device StatisticsA
Read-onlyIdempotent

Get the latest live statistics for one adopted device: uptime, CPU %, memory %, load average, and uplink throughput (bits/sec). Good for health checks and 'is this AP overloaded?' questions.

Inputs: deviceId (required), siteId, responseFormat.

unifi_get_dns_policyGet DNS Policy DetailsA
Read-onlyIdempotent

Get one local DNS record / forward-domain policy by ID: domain, record type (A/AAAA/CNAME/MX/SRV/TXT/FORWARD_DOMAIN), and enabled state. This is local DNS record management, not content filtering. IDs come from unifi_list_dns_policies.

Inputs: dnsPolicyId (required), siteId, responseFormat.

unifi_get_firewall_policyGet Firewall Policy DetailsA
Read-onlyIdempotent

Get the full definition of one firewall policy by ID: source/destination zones and matchers, protocol, action, schedule, logging. IDs come from unifi_list_firewall_policies.

Inputs: policyId (required), siteId.

unifi_get_firewall_policy_orderingGet Firewall Policy OrderingA
Read-onlyIdempotent

Get the current evaluation order of user-defined firewall policies for one source→destination zone pair — the policy IDs split into those evaluated before and after the system-defined policies. Use this before unifi_reorder_firewall_policies. Zone IDs come from unifi_list_firewall_zones.

Inputs: sourceFirewallZoneId (required), destinationFirewallZoneId (required), siteId.

unifi_get_lagGet LAG DetailsA
Read-onlyIdempotent

Get one Link Aggregation Group by ID: its type and member devices/ports. IDs come from unifi_list_lags.

Inputs: lagId (required), siteId, responseFormat.

unifi_get_mclag_domainGet MC-LAG Domain DetailsA
Read-onlyIdempotent

Get one MC-LAG domain by ID: peer switches (and their roles/link ports) and the LAGs shared across them. IDs come from unifi_list_mclag_domains.

Inputs: mcLagDomainId (required), siteId, responseFormat.

unifi_get_networkGet Network DetailsA
Read-onlyIdempotent

Get the full configuration of one LAN network/VLAN by ID: subnet, gateway, DHCP range and state, VLAN ID. IDs come from unifi_list_networks.

Inputs: networkId (required), siteId, responseFormat.

unifi_get_network_referencesGet Network ReferencesA
Read-onlyIdempotent

List what depends on a LAN network/VLAN — clients, devices, WiFi SSIDs, static/OSPF routes, NAT rules, SD-WAN. Check this BEFORE deleting or heavily reconfiguring a network to see what would break. IDs come from unifi_list_networks.

Inputs: networkId (required), siteId, responseFormat.

unifi_get_switch_stackGet Switch Stack DetailsA
Read-onlyIdempotent

Get one switch stack by ID: its member devices and any LAGs on the stack. IDs come from unifi_list_switch_stacks.

Inputs: switchStackId (required), siteId, responseFormat.

unifi_get_system_infoGet UniFi System InfoA
Read-onlyIdempotent

Get console system info: UniFi Network application version, whether a Network application update is available or already downloaded, the previous Network version, and the console model and UniFi OS version. Use this to answer 'are there app updates?' (for device firmware updates use unifi_get_device). Reads the console's legacy, undocumented Network API, so it may break on future Network versions. It cannot report UniFi OS or other app (Protect, Access...) update availability — that endpoint needs an admin login session, not an API key.

Inputs: siteId, responseFormat.

unifi_get_traffic_matching_listGet Traffic Matching ListA
Read-onlyIdempotent

Get one traffic-matching list by ID, including its entries. IDs come from unifi_list_traffic_matching_lists.

Inputs: trafficMatchingListId (required), siteId.

unifi_get_voucherGet Hotspot Voucher DetailsA
Read-onlyIdempotent

Get one hotspot voucher by ID: its code, label, usage counts, time limit, and expiry status. IDs come from unifi_list_vouchers.

Inputs: voucherId (required), siteId, responseFormat.

unifi_get_wifiGet WiFi Network DetailsA
Read-onlyIdempotent

Get the full configuration of one WiFi network (SSID) by ID: security settings, associated LAN network, band/AP settings. IDs come from unifi_list_wifi. Passphrases are redacted.

Inputs: wifiId (required), siteId, responseFormat.

unifi_list_acl_rulesList ACL RulesA
Read-onlyIdempotent

List layer-2/switch ACL rules on a site with name, action, and enabled state. These are switching-level ACLs, separate from zone firewall policies. Filter example: "action.eq('BLOCK')".

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_clientsList Connected ClientsA
Read-onlyIdempotent

List clients currently connected to the network (laptops, phones, IoT, etc.) with name, IP, MAC, connection type (WIRED/WIRELESS/VPN/TELEPORT), and connect time. Note: this shows CURRENTLY CONNECTED clients only. Filter examples: "type.eq('WIRELESS')", "access.type.eq('GUEST')", "ipAddress.eq('192.168.1.50')".

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_countriesList CountriesA
Read-onlyIdempotent

List ISO country codes and names known to the console (console-wide, not site-scoped). These codes appear in radio/regulatory settings — useful for resolving a country code to its name.

Inputs: limit, filter, offset, responseFormat.

unifi_list_devicesList UniFi DevicesA
Read-onlyIdempotent

List UniFi devices (gateways, switches, access points) adopted on a site, with name, model, MAC, IP, and state (ONLINE, OFFLINE, UPDATING, CONNECTION_INTERRUPTED, ISOLATED, ...). Use unifi_get_device for full details of one device. Filter example: "state.eq('OFFLINE')" to find offline devices.

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_device_tagsList Device TagsA
Read-onlyIdempotent

List user-defined device tags (labels/groups) on a site and which devices carry each tag. Device IDs correspond to unifi_list_devices.

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_dns_policiesList DNS PoliciesA
Read-onlyIdempotent

List custom local DNS records and forward-domain policies on a site — A/AAAA/CNAME/MX/SRV/TXT records and FORWARD_DOMAIN rules the gateway resolves locally. NOTE: this is local DNS record management, NOT DNS content filtering or domain blocking. Each entry has a domain, a record type, and enabled state. Filter example: "domain.like('*.home.arpa')".

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_dpi_applicationsList DPI ApplicationsA
Read-onlyIdempotent

List the Deep Packet Inspection (DPI) application catalog (console-wide, not site-scoped). Each entry's numeric ID is what traffic-identification and QoS rules reference. Use a filter like "name.like('Netflix')" to find one.

Inputs: limit, filter, offset, responseFormat.

unifi_list_dpi_categoriesList DPI Application CategoriesA
Read-onlyIdempotent

List Deep Packet Inspection (DPI) application categories — the groupings that DPI applications belong to (console-wide, not site-scoped).

Inputs: limit, filter, offset, responseFormat.

unifi_list_firewall_policiesList Firewall PoliciesA
Read-onlyIdempotent

List zone-based firewall policies on a site: name, action (ALLOW/BLOCK/REJECT), enabled state, and whether system-defined. Use unifi_get_firewall_policy for full match criteria. Filter examples: "name.like('Block')", "metadata.origin.eq('USER_DEFINED')".

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_firewall_zonesList Firewall ZonesA
Read-onlyIdempotent

List the firewall zones on a site (e.g. Internal, External, Gateway, VPN, Hotspot, plus custom zones) and which networks belong to each. Zone IDs appear in firewall policies' source/destination.

Inputs: limit, offset, siteId, responseFormat.

unifi_list_lagsList Link Aggregation GroupsA
Read-onlyIdempotent

List Link Aggregation Groups (LAGs) on a site — bundles of switch ports acting as one logical link (LACP trunks). Use unifi_get_lag for one LAG's full membership.

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_mclag_domainsList MC-LAG DomainsA
Read-onlyIdempotent

List Multi-Chassis LAG (MC-LAG) domains on a site — pairs of switches presenting shared LAGs for redundancy. Use unifi_get_mclag_domain for one domain's details.

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_networksList Networks (LANs/VLANs)A
Read-onlyIdempotent

List the configured LAN networks/VLANs on a site with name, VLAN ID, management type, and enabled state. Use unifi_get_network for one network's full configuration including subnet and DHCP. Filter example: "vlanId.eq(20)".

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_pending_devicesList Devices Pending AdoptionA
Read-onlyIdempotent

List UniFi devices that are visible on the network but not yet adopted into the controller. Console-wide (not site-scoped).

Inputs: limit, offset, responseFormat.

unifi_list_radius_profilesList RADIUS ProfilesA
Read-onlyIdempotent

List RADIUS server profiles on a site — used by enterprise/802.1X WiFi authentication (referenced from WiFi broadcast security settings). List only; the API has no single-item GET for RADIUS profiles.

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_sitesList UniFi SitesA
Read-onlyIdempotent

List the sites managed by this UniFi console. Returns each site's name and ID. Most consoles have exactly one site; its ID is what other tools accept as 'siteId' (they auto-detect it when there is only one site).

Inputs: limit, offset, responseFormat.

unifi_list_switch_stacksList Switch StacksA
Read-onlyIdempotent

List switch stacks on a site — multiple physical switches managed as one logical unit. Use unifi_get_switch_stack for one stack's members.

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_traffic_matching_listsList Traffic Matching ListsA
Read-onlyIdempotent

List reusable traffic-matching lists on a site — named IP-address or port lists (type IPV4_ADDRESSES / IPV6_ADDRESSES / PORTS) that firewall policies reference instead of inlining addresses. Use unifi_get_traffic_matching_list for one list's entries.

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_vouchersList Hotspot VouchersA
Read-onlyIdempotent

List guest hotspot vouchers on a site, including the voucher codes, usage counts, and expiry status. Vouchers are access codes guests redeem on the captive portal.

Inputs: limit, filter, offset, siteId, +1 more.

unifi_list_vpnList VPN Servers and TunnelsA
Read-onlyIdempotent

List VPN configuration on a site: 'servers' lists VPN servers (e.g. WireGuard/L2TP for remote access), 'site_to_site' lists site-to-site VPN tunnels.

Inputs: kind, limit, offset, siteId, +1 more.

unifi_list_wansList WAN InterfacesB
Read-onlyIdempotent

List the WAN (internet uplink) interfaces configured on a site (ID and name).

Inputs: limit, offset, siteId, responseFormat.

unifi_list_wifiList WiFi Networks (SSIDs)A
Read-onlyIdempotent

List the WiFi networks (broadcast SSIDs) configured on a site, with enabled state and security type. Passwords are never included. Use unifi_get_wifi for one SSID's full settings.

Inputs: limit, offset, siteId, responseFormat.

unifi_power_cycle_portPower-Cycle a PoE PortA
Destructive

Power-cycle a single PoE port on a UniFi switch — briefly cuts and restores power to whatever is plugged into that port (camera, AP, phone). Useful to remotely reboot a hung PoE device. CAUTION: the connected device loses power; confirm with the user first.

Inputs: portIdx (required), deviceId (required), siteId.

unifi_reorder_acl_rulesReorder ACL RulesA
DestructiveIdempotent

Set the evaluation order of user-defined ACL rules. Pass every user-defined ACL rule ID in the desired order (see unifi_get_acl_rule_ordering for the current order). CAUTION: order determines which rule wins; confirm with the user. IDs come from unifi_list_acl_rules.

Inputs: orderedAclRuleIds (required), siteId.

unifi_reorder_firewall_policiesReorder Firewall PoliciesA
DestructiveIdempotent

Set the evaluation order of user-defined firewall policies for one source→destination zone pair. The API splits user policies into those evaluated BEFORE the zone's system-defined policies and those AFTER, so pass two ordered lists. Use unifi_get_firewall_policy_ordering (or model on the current order) to see the existing split. CAUTION: order determines which rule wins — reordering changes what traffic is allowed/blocked; confirm with the user. Zone IDs come from unifi_list_firewall_zones; policy IDs from unifi_list_firewall_policies.

Inputs: afterSystemDefined (required), beforeSystemDefined (required), sourceFirewallZoneId (required), destinationFirewallZoneId (required), +1 more.

unifi_restart_deviceRestart UniFi DeviceA
Destructive

Restart (reboot) one adopted UniFi device. CAUTION: the device drops all traffic while rebooting — restarting a gateway or the switch/AP serving this machine will cause an outage of a minute or more. Confirm with the user before restarting shared infrastructure.

Inputs: deviceId (required), siteId.

unifi_set_firewall_policy_enabledEnable/Disable Firewall PolicyA
DestructiveIdempotent

Enable or disable an existing user-defined firewall policy (system/predefined policies cannot be modified). This changes live traffic filtering — confirm with the user before toggling a policy, and double-check WHICH policy with unifi_get_firewall_policy first.

Inputs: enabled (required), policyId (required), siteId.

unifi_unadopt_deviceRemove (Unadopt) DeviceA
DestructiveIdempotent

Remove (un-adopt) an adopted UniFi device from this site, returning it to the pending-adoption pool. The device keeps running with its current configuration but leaves this controller's management until re-adopted — it is NOT factory-reset. It reappears in unifi_list_pending_devices and can be re-added with unifi_adopt_device. CAUTION: this drops the device from management; confirm with the user before removing infrastructure.

Inputs: deviceId (required), siteId.

unifi_unauthorize_guest_accessRevoke Guest AccessA
DestructiveIdempotent

Revoke (unauthorize) a guest client's network access. The client is kicked back to the captive portal. Only meaningful for clients on a guest network. Confirm with the user before revoking someone's access.

Inputs: clientId (required), siteId.

unifi_update_acl_ruleUpdate ACL RuleA
DestructiveIdempotent

Replace an ACL rule (full PUT). Fetch the current rule via unifi_get_acl_rule, modify, and pass as 'config'. CAUTION: changes switching-level access; confirm with the user. IDs come from unifi_list_acl_rules.

Inputs: config (required), aclRuleId (required), siteId.

unifi_update_dns_policyUpdate DNS Record / PolicyA
DestructiveIdempotent

Replace a local DNS record / forward-domain policy (full PUT). Fetch the current object via unifi_get_dns_policy, modify, and pass as 'config'. IDs come from unifi_list_dns_policies.

Inputs: config (required), dnsPolicyId (required), siteId.

unifi_update_firewall_policyUpdate Firewall PolicyA
DestructiveIdempotent

Replace a user-defined firewall policy (full PUT). Fetch the current object with unifi_get_firewall_policy, modify it, and pass it as 'config' (system-defined policies cannot be edited). CAUTION: this changes live traffic filtering — confirm with the user and double-check WHICH policy. For a simple enable/disable use unifi_set_firewall_policy_enabled instead. IDs come from unifi_list_firewall_policies.

Inputs: config (required), policyId (required), siteId.

unifi_update_firewall_zoneUpdate Firewall ZoneA
DestructiveIdempotent

Replace a firewall zone (full PUT) — e.g. change which networks belong to it. Fetch the current zone via unifi_list_firewall_zones, modify, and pass as 'config'. CAUTION: moving networks between zones changes which firewall policies apply to them; confirm with the user. IDs come from unifi_list_firewall_zones.

Inputs: config (required), zoneId (required), siteId.

unifi_update_networkUpdate Network (LAN/VLAN)A
DestructiveIdempotent

Replace the configuration of an existing LAN network / VLAN (full PUT). Fetch the current object with unifi_get_network (responseFormat='json'), change what you need, and pass the whole object as 'config'. CAUTION: changing subnet/VLAN/DHCP can disconnect every client on this network — confirm with the user first. IDs come from unifi_list_networks.

Inputs: config (required), networkId (required), siteId.

unifi_update_traffic_matching_listUpdate Traffic Matching ListA
DestructiveIdempotent

Replace a traffic-matching list (full PUT). Fetch the current list via unifi_get_traffic_matching_list, modify, and pass as 'config'. CAUTION: firewall policies referencing this list will use the new entries; confirm with the user. IDs come from unifi_list_traffic_matching_lists.

Inputs: config (required), trafficMatchingListId (required), siteId.

unifi_update_wifiUpdate WiFi Network (SSID)A
DestructiveIdempotent

Replace the configuration of an existing WiFi SSID (full PUT). Fetch the current object with unifi_get_wifi (responseFormat='json'), modify it, and pass the whole object as 'config'. NOTE: reads show the passphrase as '[redacted]', and a config still containing that placeholder is refused before anything is sent (it would otherwise become the literal new passphrase) — put the real passphrase back in securityConfiguration (ask the user for it). CAUTION: reconfiguring an SSID disconnects its connected clients — confirm with the user. IDs come from unifi_list_wifi.

Inputs: config (required), wifiId (required), siteId.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 73 tools

    Disambiguation4/5

    Tools are organized by resource with clear action verbs, so list/get/create/update/delete for networks, WiFi, firewall policies, ACLs, DNS policies, and traffic lists are easily told apart. A few boundaries blur: unifi_get_application_info overlaps heavily with unifi_get_system_info (both report the Network app version), unifi_delete_voucher vs unifi_delete_vouchers (and unifi_list_vouchers) differ only by plurality, and zone handling is asymmetric (list_firewall_zones but get only via list). Otherwise descriptions explicitly cross-reference the right neighbor tool.

    Naming Consistency5/5

    Every tool follows the same unifi_verb_noun snake_case pattern (unifi_list_devices, unifi_update_wifi, unifi_set_firewall_policy_enabled). No camelCase or mixed verb styles anywhere, and singular/plural distinctions track real single-vs-bulk semantics.

    Tool Count2/5

    73 tools is far past the practical ceiling for reliable tool selection, even though the UniFi Network domain is genuinely broad. Many clusters (LAGs, MC-LAG domains, switch stacks, DPI, countries) are read-only single-purpose tools that inflate the surface without adding much capability.

    Completeness4/5

    Core configurable resources (networks, WiFi, firewall policies, ACL rules, DNS policies, traffic matching lists, vouchers) have full CRUD plus ordering/reference helpers, which is strong lifecycle coverage. Gaps remain: VPN, LAG, MC-LAG, switch stacks, device tags, and RADIUS profiles are list/get-only with no creation, and there is no client-level action (block/kick) or device firmware update.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server providing Claude Code with full UniFi network management capabilities -- devices, clients, ports, bandwidth auditing, firewall policies, and traffic rules -- all through natural language.
      47 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server that turns Claude into a UniFi network specialist. Manage devices, optimize WiFi, audit security, and troubleshoot your network through natural language.
      31
      13 npm
      2
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      An MCP server to manage your UniFi network via Claude, providing tools to list devices and clients and block/unblock clients. It runs as a Docker container and is designed for local network use only.
      -