UniFi Network MCP Server
In its default read-only mode, this MCP server lets Claude and other MCP clients inspect and audit a UniFi Network console; with writes enabled per the README, it can also make guarded configuration changes.
Get the Network application version and list sites with the IDs other tools need.
Inventory adopted and pending devices, get device configs/live stats, and inspect switch stacks, MC-LAG domains, and LAGs.
List current clients plus controller-retained client history and session records.
Read networks and references, WiFi SSIDs (secrets redacted unless explicitly requested), vouchers, DNS policies, traffic matching lists, RADIUS profiles, device tags, WANs, VPNs, DPI categories/apps, and countries.
Audit firewall zones, policies and ordering, ACL rules and ordering, legacy firewall rules/groups, port forwards, UPnP status, and device SSH settings.
Use classic controller APIs for legacy firewall data and internet-exposure checks not available in the Integration API.
With write mode enabled: create/update/delete networks, WiFi, firewall policies/zones, ACL rules, DNS policies, traffic matching lists and vouchers; reorder rules; adopt/remove/restart devices; power-cycle ports; and authorize/unauthorize guests.
Write operations support dry runs, confirmation prompts, WAN-exposure refusals, request allowlisting, secret redaction, and optional write logging.
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 Network MCP Server list all adopted devices at the default site"
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 Network MCP Server
An MCP (Model Context Protocol) server that exposes the UniFi Network Integration API as tools for Claude and other MCP clients: sites, devices, clients, networks, WiFi, firewalls, ACLs, switching, DNS policies, hotspot vouchers, VPNs, and more.
Prerequisites
Node.js in the range
engines.nodeinpackage.jsonallowsA UniFi Network console with the Integration API enabled
An API key generated from your UniFi Network console (see Choosing an API key)
Related MCP server: UniFi MCP
Setup
Quick start (Claude Code)
Add to Claude Code with a single command — no clone or build needed:
claude mcp add-json unifi-network '{"command":"npx","args":["-y","@owine/unifi-network-mcp@latest"],"env":{"UNIFI_NETWORK_HOST":"192.168.1.1","UNIFI_NETWORK_API_KEY":"your-api-key"}}' -s userUse -s user for global availability across all projects, or -s project for the current project only.
@latest runs the newest release every time the server starts, including a new major version. To take fixes but choose when to make breaking upgrades, pin the major version instead (for example @owine/unifi-network-mcp@3).
Claude Desktop
Add the server to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude Desktop:
{
"mcpServers": {
"unifi-network": {
"command": "npx",
"args": ["-y", "@owine/unifi-network-mcp@latest"],
"env": {
"UNIFI_NETWORK_HOST": "192.168.1.1",
"UNIFI_NETWORK_API_KEY": "your-api-key"
}
}
}
}Manual configuration (Claude Code)
Alternatively, add the same "unifi-network" entry to your ~/.claude.json under the top-level "mcpServers" key.
From source
If you prefer to build locally, this project uses pnpm — use pnpm install, not npm install, which ignores pnpm-lock.yaml and resolves different dependency versions. Node 25 and later no longer bundle Corepack, so install pnpm itself if you don't have it; it switches to the version packageManager in package.json pins:
git clone https://github.com/owine/unifi-network-mcp.git
cd unifi-network-mcp
npm install -g pnpm # if pnpm is not installed
pnpm install
pnpm run buildThen add to Claude Code:
claude mcp add-json unifi-network '{"command":"node","args":["/path/to/unifi-network-mcp/dist/index.js"],"env":{"UNIFI_NETWORK_HOST":"192.168.1.1","UNIFI_NETWORK_API_KEY":"your-api-key"}}' -s userEnvironment Variables
Variable | Required | Default | Description |
| Yes | — | IP or hostname of your UniFi Network console, without |
| Yes | — | API key from Network integration settings |
| No | — | Absolute path to a PEM file with the console's certificate, to verify a self-signed console without turning verification off (see below) |
| No |
| Set to |
| No |
| Set to |
| No | — | Cloud Connector console ID; used only when |
| No | all write tools | Comma-separated write tool names and/or groups ( |
| No |
| Set to |
| No | — | Comma-separated firewall zone IDs (UUIDs) to treat as the WAN, in addition to the system-defined zone named |
| No | — | Absolute path of a JSON Lines file that every write tool call is appended to. Created |
UniFi consoles ship with a self-signed certificate, so against a local console the first call usually fails with a certificate error. The safe fix is to trust that one certificate: save it and point UNIFI_NETWORK_CA_CERT at the file.
openssl s_client -connect 192.168.1.1:443 </dev/null 2>/dev/null | openssl x509 > ~/.config/unifi-console.pemSet UNIFI_NETWORK_CA_CERT to the file's absolute path (for example /home/you/.config/unifi-console.pem); MCP hosts do not expand ~ in env. The server then accepts that exact certificate even though it is issued to a name like unifi.local rather than the IP you connect to, and whether it is self-signed or issued by a private CA; any other certificate must chain to the file or to a publicly trusted CA and match the hostname. Pinning does not lift a certificate's validity dates. Check the fingerprint (openssl x509 -in ~/.config/unifi-console.pem -noout -fingerprint -sha256) against the console's if the network between you is not trusted. If the console later generates a new certificate, save it again.
Setting UNIFI_NETWORK_VERIFY_SSL=false instead turns off certificate checks for this server's connections to the console: anyone who can intercept that traffic can then read the API key. Only do this on a network you trust.
Behind an HTTP(S) proxy, set NODE_USE_ENV_PROXY=1 along with HTTPS_PROXY (and NO_PROXY for anything to reach directly), as for Node's own fetch; the console's certificate is still verified through the proxy.
Choosing an API key
The key carries the rights of the admin who created it, and this server is driven by a model that reads data other people control (client hostnames, device names). Create the key as a dedicated admin with the least role that covers your use: for the default read-only mode, a View Only admin, so nothing can be changed even if a tool were misused. Use a full-access admin only when you set UNIFI_NETWORK_READ_ONLY=false, and then also read Limiting write mode.
Cloud Connector
To use a Site Manager API key with a console, set UNIFI_NETWORK_HOST=api.ui.com and UNIFI_NETWORK_CONSOLE_ID to its console ID. The existing UNIFI_NETWORK_API_KEY supplies the key. This works for current Integration API tools and the controller history and classic routes when permitted by the console/key. Cloud Connector requires eligible console ownership/access and firmware 5.0.3 or later. TLS verification stays on: the server refuses to start with UNIFI_NETWORK_VERIFY_SSL=false and api.ui.com.
References: official Cloud Connector API and the Art-of-WiFi controller client, whose session queries use epoch seconds.
Upgrading from 2.x
3.0 tightens several defaults. Most setups need no change; check these:
Cloud Connector with
UNIFI_NETWORK_VERIFY_SSL=false: the server now refuses to start withUNIFI_NETWORK_HOST=api.ui.comand verification off. UnsetUNIFI_NETWORK_VERIFY_SSL.Writes that open access need
confirm: true: creating, enabling or switching a firewall policy or ACL rule to ALLOW, disabling a blocking policy or rule, changing what an enabled policy or rule matches, a reorder that moves an ALLOW ahead of a BLOCK, creating or enabling an open SSID or changing its network, captive portal, client isolation or client filtering, changing an SSID's security type, and creating a large batch of vouchers. Without it the tool returns an error naming the change, and the agent can ask you before re-invoking. A dry run of such a change says why inconfirmationRequired.IDs must be IDs: ID inputs accept only letters, digits,
-and_(pass the IDs that list and get tools return).Smaller default results:
unifi_list_client_sessionsandunifi_list_vouchersreturn fewer rows by default, andunifi_list_client_historynow returns at mostlimitclients, most recently seen first, withtotalCountandtruncated; passlimitfor more. Rows from both history tools carry only the fields their tool descriptions list.Compact text output: tool results are compact JSON rather than indented;
structuredContentis unchanged.Writes that could let traffic in from the WAN are refused: with writes enabled, a firewall policy that allows traffic from the External zone, a change to that zone or to which networks are in it, putting a network in a zone such a policy targets, a reorder of its policies, or an edit to a traffic matching list such a policy uses now fails even with
confirm: true(see WAN-exposure refusals). SetUNIFI_NETWORK_ALLOW_WAN_EXPOSURE=trueto go back to needing onlyconfirm.Only the endpoints the tools use: every request is checked against an allowlist before it is sent. No tool behaves differently; anything else is refused.
One rule is relaxed: a dryRun: true preview of a destructive tool no longer needs confirm.
Safety Features
This server provides layered safety controls for responsible operation:
Tool annotations — Every tool declares
readOnlyHint,destructiveHintandopenWorldHint, and every write toolidempotentHint, so MCP clients (like Claude Code) can make informed confirmation decisionsServer instructions — On connect the server gives the MCP host a short usage guide for the model (get a
siteIdfirst, page withoffset/limit, preview writes withdryRun, ask before passingconfirm), matched to read-only or read-write modeRead-only mode — Enabled by default. Only read operations (list, get) are registered. Set
UNIFI_NETWORK_READ_ONLY=falseto enable write/mutating toolsDestructive tool warnings — Tools that delete or irreversibly modify resources have descriptions prefixed with
DESTRUCTIVE:to clearly signal riskConfirmation parameter — Every tool marked
DESTRUCTIVE:(includingunifi_remove_deviceandunifi_bulk_delete_vouchers) requires an explicitconfirm: trueparameter for the call to succeed. AdryRun: truepreview does not need it, since it changes nothingConfirmation for changes that open access — Some routine write tools ask for
confirm: trueonly when a particular change can let traffic or guests in: a firewall policy or ACL rule that ALLOWs traffic (created, switched on, or switched to ALLOW), disabling a policy or rule that blocks, changing what an enabled policy or rule matches (widening an ALLOW and narrowing a BLOCK both let more through), a reorder that moves an ALLOW ahead of a BLOCK it used to follow, creating or switching on an open SSID or changing an open SSID's network, captive portal, client isolation or client filtering, changing an SSID's security type, and creating a large batch of vouchers (unifi_create_voucher'sconfirmparameter states the threshold). Each is judged on the resource as the change would leave it, so the update, patch and reorder tools read it first. Without it the call returns an error naming the change; a dry run never needs it, and reports the reason inconfirmationRequiredDry-run support — Every write tool accepts an optional
dryRun: trueparameter that returns a preview of the HTTP request (method, path, body) without making any changesSafe partial updates — The UniFi PUT endpoints for WiFi broadcasts, networks, firewall policies, ACL rules and DNS policies replace the whole resource, and some fields reset when omitted (a missing
dhcpGuardingdisables DHCP guarding). Their update tools read the current resource, keep every documented body field, and overlay only the top-level fields you pass, so omitted fields keep their current values. A field you pass replaces the current one whole — nested objects such asipv4Configuration,securityConfigurationor a policy'ssourceare not deep-merged, so start from what the get tool returns. Passnullto clear an optional field. Parallel updates to one resource run one at a time. The dry-run preview shows the merged body (the read still happens)Secret redaction — WiFi passphrases (including per-VLAN PPSK keys) are returned as
[REDACTED]unless the caller passesincludeSecrets: truetounifi_list_wifi/unifi_get_wifi. Write-tool echoes and dry-run previews are always redacted, and an update that echoes back[REDACTED]keeps the stored passphraseRequest allowlist — Every request the server makes, reads included, is checked before it is sent against a fixed list of the methods and paths the tools use. Anything else, such as a path with
..or encoded characters, another application on the console, or a write the server is not set up to make, is refused and never reaches the consoleOperator limits for write mode —
UNIFI_NETWORK_WRITE_TOOLSloads only the write tools you name, writes that could let traffic in from the WAN are refused outright, andUNIFI_NETWORK_WRITE_LOGkeeps a record of every write call. See Limiting write mode
Limiting write mode
An agent with write access reads data that other people control: client hostnames, device names, SSIDs, notes on vouchers. Any of it can be written to look like an instruction, and a model can be misled by it. dryRun and confirm help when the model behaves, but they are inputs the model itself supplies. The settings below are yours: they hold whatever the model is told, because the server enforces them before anything reaches the console.
Turning writes on
Use a dedicated, least-privilege key. Create a separate admin for the agent, limited to the Network application and to the sites it should manage, and generate the key as that admin. Do not reuse your own key.
Enable writes: set
UNIFI_NETWORK_READ_ONLY=false.Load only the write tools the job needs: set
UNIFI_NETWORK_WRITE_TOOLS, for exampleunifi_create_voucher,unifi_delete_voucherfor a front desk, orwififor SSID changes. Other write tools are not registered, so the agent never sees them, and the request allowlist refuses their requests as well.Keep the WAN-exposure refusals on: leave
UNIFI_NETWORK_ALLOW_WAN_EXPOSUREunset.Name your WAN zone: set
UNIFI_NETWORK_WAN_ZONE_IDSto the ID of each site's External zone. While the server is still read-only, ask the agent to rununifi_list_firewall_zonesfor each site and copy theidof the External zone (system-defined,metadata.originSYSTEM_DEFINED). Without the list the server recognises that zone by its name, which can be changed.Turn on the write log and watch it: set
UNIFI_NETWORK_WRITE_LOGto an absolute path, for example/home/you/.local/state/unifi-mcp/writes.jsonl, and look at it after a session (tail -fworks).Try changes with
dryRun: truefirst: ask the agent to preview a change, check the request, then let it run.
A Claude Desktop entry with all of this set:
{
"mcpServers": {
"unifi-network": {
"command": "npx",
"args": ["-y", "@owine/unifi-network-mcp@latest"],
"env": {
"UNIFI_NETWORK_HOST": "192.168.1.1",
"UNIFI_NETWORK_API_KEY": "key-of-the-agent-admin",
"UNIFI_NETWORK_CA_CERT": "/home/you/.config/unifi-console.pem",
"UNIFI_NETWORK_READ_ONLY": "false",
"UNIFI_NETWORK_WRITE_TOOLS": "unifi_create_voucher,unifi_delete_voucher,wifi",
"UNIFI_NETWORK_WAN_ZONE_IDS": "6f1c2a52-3b6d-4a8e-9a0b-2d5e8f7c1a90",
"UNIFI_NETWORK_WRITE_LOG": "/home/you/.local/state/unifi-mcp/writes.jsonl"
}
}
}
}Write tool limits
UNIFI_NETWORK_WRITE_TOOLS takes write tool names from the Tools tables and group names, which match the tool modules: devices, clients, networks, wifi, hotspot, firewall, acl, dns-policies, traffic-matching. Unset, every write tool loads, as before. none or an empty value loads none, leaving a read-only tool set while the request allowlist still refuses writes. An unknown name stops the server with a configuration error listing the valid names. Read tools are never affected. The server instructions tell the model which write tools are available.
WAN-exposure refusals
With writes enabled, the server refuses these changes, whatever confirm says, and sends nothing:
creating, updating or patching a firewall policy so that it allows traffic (any action but
BLOCKorREJECT) from the WAN zone. A policy whoseconnectionStateFilterlists onlyESTABLISHEDand/orRELATEDis exempt, since it only lets return traffic back in; a missing or empty filter matches every state, so it is not. An update is judged on the full body after merging, and a patch on the policy as the patch would leave it (a patch that only turns logging or flow reporting on or off, or disables the policy, is not checked)changing the WAN zone (its name or networks), deleting it, or moving networks out of it into another zone
creating or updating a network so that it is in the WAN zone, or moving a network out of it
putting a network in a zone that a policy allowing traffic from the WAN targets (creating or updating a network with that
zoneId, or adding networks to that zone), since the network becomes reachable from the WAN without any policy changing. This holds even when the policy's destinationtrafficFilternarrows it to particular hosts, as the server cannot tell whether those hosts are on the network being movedreordering the policies for traffic from the WAN zone, which could put an allow ahead of a block
updating a traffic matching list that a policy allowing traffic from the WAN uses, since the list decides what that policy lets in
Blocking traffic from the WAN, and allowing traffic from inside to the WAN, are not affected. A dry run runs the same check and reports the refusal. ACL rules are not checked: they are enforced by switches between LAN hosts and have no zone, so they cannot let WAN traffic past the gateway firewall. The Integration API has no port-forwarding endpoint.
The Integration API marks zones only as system- or user-defined, and zone names can be changed, so a zone counts as the WAN when its ID is in UNIFI_NETWORK_WAN_ZONE_IDS, or when it is system-defined and named External (in any case). Set the ID list: a renamed External zone is otherwise missed. To check a change the server lists the site's firewall zones (and, for a matching list or a network put in a zone, its policies). If that fails, or the change names a zone that is not in the list, the write is refused rather than allowed unchecked.
A refused call returns:
Refused: the policy would ALLOW traffic from the External zone, which is the WAN. This server does not make changes that could let traffic in from the WAN, and confirm does not override this; if the change is intended, make it in the UniFi console.If you do want the agent to make such changes, UNIFI_NETWORK_ALLOW_WAN_EXPOSURE=true turns the refusals off; those changes then need confirm: true like other changes that open access.
Write log
With UNIFI_NETWORK_WRITE_LOG set, each write tool call appends one line, including dry runs and refused calls. Read tools are not logged.
{"ts":"2026-10-19T00:12:46.170Z","tsLocal":"2026-10-18T20:12:46.170-04:00","tool":"unifi_create_firewall_policy","args":{"siteId":"5f3a9c1e-2b7d-4e8f-9a6b-0c1d2e3f4a5b","policy":{"name":"SSH in","enabled":true,"action":{"type":"ALLOW"},"source":{"zoneId":"6f1c2a52-3b6d-4a8e-9a0b-2d5e8f7c1a90"},"destination":{"zoneId":"0b6d9c1e-58a4-4f43-8e0f-1c2d3e4f5a6b"}},"confirm":true},"method":"POST","path":"/integration/v1/sites/5f3a9c1e-2b7d-4e8f-9a6b-0c1d2e3f4a5b/firewall/policies","dryRun":false,"outcome":"refused","reason":"wan_exposure","durationMs":29}outcome is ok (with the HTTP status), dry_run, refused (with a reason: request_guard, wan_exposure or confirmation_required) or error (with the HTTP status when the console answered). path is the path under the Network application, without host, console ID or query string; method and path are null when the call stopped before choosing a request. Arguments are redacted: WiFi passphrases (including each presharedKeys[] entry's, which keeps its network), and any field named, in any case, passphrase, password, secret, sharedSecret, radiusSecret, their legacy x_ forms, apiKey, api_key, apiToken, token, accessToken, refreshToken, authToken, privateKey, private_key or presharedKey. The list is in src/write-log.ts. The API key and the console's response bodies are never written.
The file is created with mode 0600, and missing parent directories with 0700. The server refuses to start if the path is a symlink, not a regular file, has other hard links, or is writable by group or others. On Windows, where Node reports every writable file as mode 0666 and cannot open without following symlinks, only the symlink and regular-file checks apply: restrict the file with its ACL (for example, keep it in your user profile). If a line cannot be written (a full disk, say), the tool call still completes and the server reports the problem once on stderr.
Structured Output
Every read tool, and every write tool whose API response returns the affected resource, declares an MCP outputSchema and returns structuredContent alongside the usual text content. Clients that understand structured output get typed, machine-readable results instead of parsing JSON out of a text blob. A dryRun: true call returns its preview, {"dryRun": true, "wouldExecute": {"method", "path", "body"}}, the same way. Other write tools (deletes, device and guest actions, reorders) return the API response as text only.
The schemas live in src/utils/output-schemas.ts. They deliberately use a loose strategy: every non-key field is optional and objects accept fields the schema does not list, so firmware- and hardware-specific fields flow through unchanged rather than being stripped or triggering a validation error. This keeps the contract stable across console versions and hardware models.
Tools
System
Tool | Description |
| Get UniFi Network application info — returns |
Sites
Tool | Description |
| List all sites available to the API key |
Devices
Tool | Description |
| List all adopted devices at a site |
| Get a specific device by ID |
| Get latest statistics for a device |
| List devices pending adoption (global) |
| Adopt a pending device |
| DESTRUCTIVE: Remove (unadopt) a device — may factory reset |
| Restart a device |
| Power cycle a specific port (PoE restart) |
Clients
Tool | Description |
| List all connected clients (wired, wireless, VPN) at a site |
| Get a specific client by ID |
| Authorize a guest client on a hotspot network |
| Unauthorize a guest client |
Client history
Tool | Description |
| Historical/offline client inventory and first/last seen times |
| Retained connection sessions, duration, byte counters and roaming records |
Classic controller API
Tool | Description |
| Networks as the classic controller stores them, with their classic |
| Address and port groups that legacy firewall rules reference |
| Legacy (pre-zone-based) firewall rules — may not be enforced on zone-based firewall sites |
Internet exposure
Tool | Description |
| Port forwards: WAN port, allowed source and LAN target, enabled or not |
| Whether UPnP and NAT-PMP let LAN devices open WAN ports themselves |
| Device SSH: on or off, password logins, listening on every interface, number of keys |
Networks
Tool | Description |
| List all networks at a site |
| Get a specific network by ID |
| Get references to a network (WiFi, firewall zones, etc.) |
| Create a new network (UNMANAGED, GATEWAY or SWITCH body) |
| Update an existing network — partial changes are merged into the full PUT body |
| DESTRUCTIVE: Delete a network — disconnects all clients |
WiFi
Tool | Description |
| List all WiFi broadcasts (SSIDs) at a site (passphrases redacted by default) |
| Get a specific WiFi network by ID (passphrases redacted unless |
| Create a new WiFi network (SSID) |
| Update an existing WiFi network — partial changes are merged into the full PUT body |
| DESTRUCTIVE: Delete a WiFi network — disconnects all clients |
Hotspot Vouchers
Tool | Description |
| List all hotspot vouchers at a site |
| Get a specific hotspot voucher by ID |
| Create hotspot vouchers |
| DESTRUCTIVE: Delete a hotspot voucher |
| DESTRUCTIVE: Bulk delete vouchers matching a filter |
Firewall Zones & Policies
Tool | Description |
| List all firewall zones at a site |
| Get a specific firewall zone by ID |
| Create a new custom firewall zone |
| Replace a firewall zone's name and network list (send every network ID to keep) |
| DESTRUCTIVE: Delete a custom firewall zone |
| List all firewall policies at a site |
| Get a specific firewall policy by ID |
| Create a new firewall policy |
| Update a firewall policy — partial changes are merged into the full PUT body |
| Partially update a firewall policy (toggle logging or Insights flow reporting) |
| DESTRUCTIVE: Delete a firewall policy |
| Get user-defined firewall policy ordering for a zone pair |
| Reorder user-defined firewall policies for a zone pair |
ACL Rules
Tool | Description |
| List all ACL rules at a site |
| Get a specific ACL rule by ID |
| Get user-defined ACL rule ordering |
| Create a new ACL rule |
| Update an ACL rule — partial changes are merged into the full PUT body |
| DESTRUCTIVE: Delete an ACL rule |
| Reorder user-defined ACL rules |
Switching
Tool | Description |
| List all Switch Stacks at a site |
| Get details of a specific Switch Stack |
| List all MC-LAG (Multi-Chassis LAG) Domains at a site |
| Get details of a specific MC-LAG Domain |
| List all LAGs (Link Aggregation Groups) at a site |
| Get details of a specific LAG |
DNS Policies
Tool | Description |
| List all DNS policies at a site |
| Get a specific DNS policy by ID |
| Create a DNS policy of any type (A, AAAA, CNAME, MX, TXT, SRV, FORWARD_DOMAIN) |
| Update a DNS policy — partial changes are merged into the full PUT body |
| DESTRUCTIVE: Delete a DNS policy |
Traffic Matching
Tool | Description |
| List all traffic matching lists (port groups, IP groups) |
| Get a specific traffic matching list by ID |
| Create a new traffic matching list |
| Replace a traffic matching list (send the full items array) |
| DESTRUCTIVE: Delete a traffic matching list |
Supporting
Tool | Description |
| List all WAN interfaces at a site |
| List all site-to-site VPN tunnels at a site |
| List all VPN servers at a site |
| List all RADIUS profiles at a site |
| List all device tags at a site |
| List all DPI categories for traffic identification |
| List all DPI applications for traffic identification |
| List all countries/regions for geo-based rules |
Retained client connections
The Integration API only lists connected clients. The two history tools use the controller APIs instead: GET /proxy/network/v2/api/site/{siteReference}/clients/history and POST /proxy/network/api/s/{siteReference}/stat/session. The POST is a statistics query and does not change the network. Both tools remain available in read-only mode.
Use internalReference from unifi_list_sites (often default), not its UUID. Session queries require start and end in Unix seconds, with a maximum 31-day window. The controller ignores _start/offset on this endpoint. A full result sets mayBeTruncated=true; split the time window or filter by MAC and query again. Overlap split boundaries and deduplicate session IDs. A result below the requested limit means the query was not capped, not that all dates were retained.
{"siteReference":"default","start":1789272000,"end":1789876800}unifi_list_client_history lists offline clients only, most recently seen first, up to limit, with totalCount. truncated: true means less recently seen clients were left out; raise limit (narrowing withinHours drops those same clients).
Rows keep the controller's field names (assoc_time, duration, rx_bytes, tx_bytes, roaming_sessions, …) but carry only the fields each tool's description lists. RX/TX are the controller's counters, not relabeled client download/upload. Inventory is separate from session history. Retention varies; a non-truncated result does not prove all requested dates were retained, and ongoing sessions may not be present. Neither association nor traffic counters establish end-to-end Internet success.
These controller routes are not part of the published Integration API contract. Their availability and API-key permissions vary by controller version. Unsupported, unauthorized, HTML login, legacy meta.rc error and malformed responses fail explicitly instead of becoming an empty history. History requests are time-limited, reject redirects, and refuse oversized responses. No browser cookies are required where API-key access is supported.
Classic controller reads
Legacy firewall rules, and the firewall groups and networks they reference, are not in the Integration API. Three read tools list them from the classic controller API instead: GET /proxy/network/api/s/{siteReference}/rest/networkconf, /rest/firewallgroup and /rest/firewallrule. Like the history tools they take the site's internalReference from unifi_list_sites, and remain available in read-only mode. No classic write is allowlisted.
Each collection is returned whole; the controller does not page it. Legacy rules are sorted by ruleset, then rule_index, the order they are evaluated in. Records keep the controller's field names and their classic _ids, which differ from Integration API IDs, so an ID from one API cannot be passed to a tool of the other. Legacy rules reference networks by unifi_list_classic_networks IDs and groups by unifi_list_firewall_groups IDs. On a site that uses the zone-based firewall, legacy rules may not be enforced; its rules are the firewall policies.
Classic network records hold WAN, VPN and RADIUS credentials. Rows are therefore built from a fixed list of fields per tool (its output schema, in src/utils/output-schemas.ts), never by redacting the record, so a credential under any name is never returned. Errors are reported the same way as for the history routes.
Internet exposure
Port forwards, UPnP and device SSH settings are not in the Integration API, so the exposure tools read the classic controller API: GET /proxy/network/api/s/{siteReference}/rest/portforward and /proxy/network/api/s/{siteReference}/get/setting, directly or through the Cloud Connector. Like the history tools they take the site's internalReference from unifi_list_sites and remain available in read-only mode. No classic write is allowlisted.
Settings sections hold credentials (SSH passwords, management and cloud-access keys, RADIUS secrets), so every result is built from a fixed list of fields (its output schema, in src/utils/output-schemas.ts), never by redacting the record. SSH keys are counted, not returned.
A setting this controller version does not have comes back as status: "unavailable" with a detail saying what was looked for. It never means the feature is off. UPnP is read from a upnp settings section where there is one, otherwise from the gateway (usg) section's upnp_* fields, and source says which; Network 11.0.94 has no upnp section. upnp_nat_pmp_enabled is the stored setting, which does nothing while UPnP is off, and detail says so when the two disagree.
Remote Access and console (UniFi OS) SSH are UniFi OS settings outside this API, so unifi_get_device_ssh_settings reports device SSH only. Which internal networks can reach the console's web UI is decided by the firewall rules or policies.
Troubleshooting
Configuration errors go to the MCP host's server log and the server exits. Tool errors reach the agent as results starting with Error:.
Message | Cause and fix |
|
|
| The path does not exist for the server. Use an absolute path; |
| The file has no |
| Unset |
| The console ID only applies with |
| The console's certificate did not verify. Save it to |
| Wrong or unreachable host. |
| The key is wrong or revoked, or its admin lacks the rights (a View Only key cannot write). |
| A wrong |
| The console is slow. For a write, check whether it was applied before retrying. |
| Expected: the change needs |
| The agent passed a name or malformed ID. |
| The server would only send a request on its allowlist; this one was not, or belongs to a write tool |
| Expected: the change could let traffic in from the WAN, and |
| The WAN check could not run, so the write was refused. Check the key can read the site's firewall zones, and that the zone ID is right. |
| A typo or a read tool's name. The message lists the valid names. |
A write tool is missing, or |
|
| The path is a symlink, not a regular file, hard-linked elsewhere, or writable by others ( |
No write tools listed | Read-only is the default. Set |
| This console or key cannot use the history routes (see Retained client connections). It is not an empty history. |
| This console or key cannot read the classic controller API (see Classic controller reads). It is not an empty result. |
| History, classic-API and exposure tools take |
Development
pnpm install # Install dependencies
pnpm run build # Compile TypeScript
pnpm start # Run the server
pnpm run typecheck # Type-check src/ and tests
pnpm run lint # ESLint
pnpm run lint:fix # ESLint with auto-fix
pnpm test # Run all tests (vitest)
pnpm run test:watch # Run tests in watch mode
pnpm run test:coverage # Run tests with coverage
pnpm run test:package # Build, pack and smoke-test the published packageCommit conventions
This project uses conventional commits in pull request titles and release-drafter for releases. Pull requests are squash-merged, so the title is the commit subject:
feat: ...— new feature (minor version bump)fix: ...— bug fix (patch version bump)deps: ...— dependency update (patch version bump)feat!: ...— breaking change (major version bump); the!must be in the title, aBREAKING CHANGE:footer is not readchore:,docs:,ci:, etc. — no version bump
Every push to main updates a draft GitHub Release with the next version and its notes. A maintainer publishes the draft, which builds, tests and publishes that tagged commit to npm with provenance. To release a different version, edit the draft's tag and title before publishing. Release notes after 3.0.0 are in GitHub Releases; CHANGELOG.md covers 3.0.0 and earlier.
License
MIT — see LICENSE.
Available Tools
49 toolsunifi_get_acl_ruleGet ACL ruleBRead-only
Get a specific ACL rule by ID (full match criteria and action).
Inputs: siteId (required), aclRuleId (required). Returns: id, name, type, index, +8 more
unifi_get_acl_rule_orderingGet ACL rule orderingBRead-only
Get the evaluation order of user-defined ACL rules. Returns: orderedAclRuleIds[] — rules are evaluated in list order.
Inputs: siteId (required). Returns: orderedAclRuleIds
unifi_get_clientGet clientARead-only
Get a specific connected client by ID. Returns same shape as unifi_list_clients entries.
Inputs: siteId (required), clientId (required). Returns: id, name, type, access, +4 more
unifi_get_deviceGet deviceARead-only
Get full configuration for a device. Returns (in addition to list fields): adoptedAt, provisionedAt, configurationId, uplink.deviceId (absent on the ISP modem), features (object keyed by capability: switching {lags[]} / accessPoint {}), interfaces.ports[] for switches, gateways and modems ({idx, state, connector, maxSpeedMbps, speedMbps (may be omitted on DOWN ports), poe:{standard, type, enabled, state} on PoE ports only}), interfaces.radios[] for APs ({wlanStandard, frequencyGHz, channelWidthMHz, channel}). Some devices (e.g. 5G modems) return empty features/interfaces objects. NOTE: in the LIST endpoint, features/interfaces are capability-tag string arrays instead. Use for: switch port layout/PoE state, AP radio config, uplink topology. For live throughput/CPU/memory, use unifi_get_device_statistics.
Inputs: siteId (required), deviceId (required). Returns: id, name, model, state, +11 more
unifi_get_device_ssh_settingsGet device SSH settingsARead-only
Read the site's device SSH settings (Device SSH Authentication for adopted UniFi devices) from the classic controller API (get/setting) mgmt section: whether SSH is on, whether it accepts passwords, whether it listens on every interface (x_ssh_bind_wildcard), and how many SSH keys are installed. Credentials and keys are never returned. Console (UniFi OS) SSH is a separate UniFi OS setting this API does not expose. Which networks reach the console's web UI and SSH is set by firewall rules and policies, and from the internet by Remote Access and port forwards (unifi_list_port_forwards). status: unavailable means the controller's settings had no such fields.
Inputs: siteReference (required). Returns: detail, status, sshKeyCount, siteReference, +3 more
unifi_get_device_statisticsGet device statisticsARead-only
Get latest live statistics for a device. Returns: uptimeSec, lastHeartbeatAt, nextHeartbeatAt, loadAverage1/5/15Min, cpuUtilizationPct, memoryUtilizationPct, uplink (txRateBps, rxRateBps; absent on e.g. the ISP modem), interfaces.radios[] for APs ({frequencyGHz, txRetriesPct}; interfaces is {} for non-AP devices). NOTE: verified against 11.0.83 — the Integration API does NOT expose per-switch-port byte/error/PoE-power counters here; port-level live stats are unavailable. Use for: device health and AP radio metrics. For config (channel, power, port assignment), use unifi_get_device.
Inputs: siteId (required), deviceId (required). Returns: uplink, uptimeSec, interfaces, lastHeartbeatAt, +6 more
unifi_get_dns_policyGet DNS policyCRead-only
Get a specific DNS policy by ID (same fields as the list entry).
Inputs: siteId (required), dnsPolicyId (required). Returns: id, port, text, type, +14 more
unifi_get_firewall_policyGet firewall policyBRead-only
Get a firewall policy by ID with full match criteria and action. Returns the same fields as a unifi_list_firewall_policies entry, including loggingEnabled and reportFlowEnabled.
Inputs: siteId (required), firewallPolicyId (required). Returns: id, name, index, action, +11 more
unifi_get_firewall_policy_orderingGet firewall policy orderingARead-only
Get the evaluation order of user-defined firewall policies for a specific (source zone, destination zone) pair. Returns: orderedFirewallPolicyIds.beforeSystemDefined[] and orderedFirewallPolicyIds.afterSystemDefined[] arrays of policy IDs. System-defined rules sit between these two arrays.
Inputs: siteId (required), sourceFirewallZoneId (required), destinationFirewallZoneId (required). Returns: orderedFirewallPolicyIds
unifi_get_firewall_zoneGet firewall zoneARead-only
Get a firewall zone by ID (same fields as the list entry).
Inputs: siteId (required), firewallZoneId (required). Returns: id, name, metadata, networkIds
unifi_get_infoGet infoARead-only
Get UniFi Network application info. Returns: applicationVersion only — the Integration API returns no isUniFiOSConsole or other field here. Use for: checking the Network version when a tool's description notes version-specific behaviour.
Inputs: no named parameters. Returns: applicationVersion
unifi_get_lagGet LAGARead-only
Get full details of a LAG including its type (LOCAL/SWITCH_STACK/MULTI_CHASSIS) and member ports.
Inputs: lagId (required), siteId (required). Returns: id, type, members, metadata
unifi_get_mc_lag_domainGet MC-LAG domainBRead-only
Get full details of an MC-LAG Domain (peer switches and member LAGs).
Inputs: siteId (required), mcLagDomainId (required). Returns: id, lags, name, peers, +1 more
unifi_get_networkGet networkARead-only
Get a network/VLAN by ID. Returns the list fields PLUS (live-verified) isolationEnabled, internetAccessEnabled, mdnsForwardingEnabled, cellularBackupEnabled, a full ipv4Configuration object (autoScaleEnabled, hostIpAddress, prefixLength, dhcpConfiguration with mode/ipAddressRange/leaseTimeSeconds/domainName/pingConflictDetectionEnabled/ntpServerIpAddresses — which may contain empty-string entries), and an ipv6Configuration object when IPv6 is configured (interfaceType, clientAddressAssignment, routerAdvertisement, hostIpAddress, prefixLength). NOTE: subnet/DHCP detail appears here at get-by-id but NOT in unifi_list_networks (sparse list view).
Inputs: siteId (required), networkId (required). Returns: id, name, vlanId, zoneId, +11 more
unifi_get_network_referencesGet network referencesARead-only
Get all objects that reference this network. Returns: { referenceResources: [{ resourceType (e.g. WIFI), referenceCount, references: [{ referenceId }] }] }. Use before deleting a network to find dependencies that need to be re-pointed or removed. NOTE: on 11.0.83 the controller returns HTTP 500 (api.unexpected-error) for many networks — observed on the default network and on networks used by PPSK keys. On a 500, fall back to unifi_list_wifi + unifi_get_wifi (network.networkId and securityConfiguration.presharedKeys[].network.networkId) and unifi_list_firewall_zones (networkIds).
Inputs: siteId (required), networkId (required). Returns: referenceResources
unifi_get_switch_stackGet switch stackARead-only
Get full details of a Switch Stack including all units and stacking topology. Returns the same fields as the list response but for a single stack: id, deviceId, name, units[] (named members before 10.6.106), lags[], metadata.origin.
Inputs: siteId (required), switchStackId (required). Returns: id, lags, name, units, +3 more
unifi_get_traffic_matching_listGet traffic matching listARead-only
Get a specific traffic matching list by ID (full items array).
Inputs: siteId (required), trafficMatchingListId (required). Returns: id, name, type, items, +1 more
unifi_get_upnp_statusGet UPnP statusARead-only
Read whether UPnP and NAT-PMP are on for the site's gateway, from the classic controller API (get/setting): the dedicated upnp section where the controller has one, otherwise the gateway (usg) section's upnp_* fields. With UPnP on, LAN devices open WAN ports themselves, without a port forward. upnp_nat_pmp_enabled is the stored setting, which does nothing while UPnP is off; detail says which applies. status: unavailable means no UPnP setting was found on this controller version; it does not mean UPnP is off.
Inputs: siteReference (required). Returns: detail, source, status, upnp_enabled, +4 more
unifi_get_voucherGet voucherARead-only
Get a specific hotspot voucher by ID (same fields as the list entry).
Inputs: siteId (required), voucherId (required). Returns: id, code, name, expired, +9 more
unifi_get_wifiGet WiFiARead-only
Get full configuration for a WiFi broadcast (SSID). Returns the list fields plus the booleans (hideName, clientIsolationEnabled, uapsdEnabled, multicastToUnicastConversionEnabled, bandSteeringEnabled, arpProxyEnabled, bssTransitionEnabled, advertiseDeviceName, channel2gLockedTo6, dtimPeriod2gLockedTo3), the full securityConfiguration (type, pmfMode, fastRoamingEnabled, saeConfiguration, presharedKeys[] on PPSK SSIDs, …), and optional configs when configured (omitted otherwise): clientFilteringPolicy, blackoutScheduleConfiguration, hotspotConfiguration, mdnsProxyConfiguration, handoffSuggestionsConfiguration, dtimPeriodByFrequencyGHzOverride, broadcastingDeviceFilter, mloEnabled. Passphrases (securityConfiguration.passphrase, presharedKeys[].passphrase) are returned as "[REDACTED]" unless includeSecrets is true.
Inputs: siteId (required), wifiBroadcastId (required), includeSecrets. Returns: id, name, type, enabled, +8 more
unifi_list_acl_rulesList ACL rulesARead-only
List ACL rules (switch/AP-level access control lists, distinct from zone-based firewall policies) at a site. Returns: id, type (IPV4/MAC), name, enabled, action (ALLOW/BLOCK), description, protocolFilter, sourceFilter/destinationFilter matchers, enforcingDeviceFilter (which devices apply the rule), index (evaluation order — read-only; change it with unifi_reorder_acl_rules), metadata.origin. ACLs apply earlier in the path than firewall policies.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_classic_networksList classic networksARead-only
List the site's networks from the classic controller API (rest/networkconf), whole and unpaged. Use it to resolve the classic network IDs legacy firewall rules reference; for everything else prefer unifi_list_networks. IDs are the classic controller's _id values, which differ from Integration API IDs: do not pass one to an Integration API tool, or the reverse. Rows carry only the fields in the output schema; credentials are never returned.
Inputs: siteReference (required). Returns: data, count, siteReference
unifi_list_client_historyList client historyARead-only
List historical/offline client inventory using the controller v2 API. Returns OFFLINE clients only — currently connected clients are excluded, so merge with unifi_list_clients for a full inventory. Includes names, MACs, first_seen and last_seen epoch seconds when available. This is inventory, not session history; use unifi_list_client_sessions for past connections. Requires controller history API-key support; errors never mean zero activity. Retention depends on the controller. Returns the most recently seen clients first, up to limit, with totalCount; truncated: true means less recently seen clients were left out, so raise limit (narrowing withinHours drops those same clients). Rows carry only mac, hostname, display_name, first_seen, last_seen, is_wired, status.
Inputs: siteReference (required), limit, withinHours. Returns: data, count, limit, coverage, +3 more
unifi_list_clientsList clientsARead-only
List currently connected clients at a site. Returns per client: id, name, type (WIRED/WIRELESS/VPN/TELEPORT), macAddress, ipAddress (may be absent), connectedAt, uplinkDeviceId (the switch/AP they're attached to), access.type. NOTE: verified against 11.0.83 (WIRED/WIRELESS; VPN/TELEPORT not live-verified) — the Integration API client schema is minimal and identical across those types; it does NOT expose signal strength, channel, or per-port binding. Use for: who's online right now. Disconnected/historical clients are NOT in the Integration API; use unifi_list_client_history and unifi_list_client_sessions for controller-retained records.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_client_sessionsList client sessionsARead-only
Read retained past client connections, including disconnected clients, from the controller stat/session query endpoint. POST here only reads statistics. Rows carry only _id, mac, hostname, is_wired, assoc_time (epoch seconds), duration (seconds), rx_bytes/tx_bytes (controller perspective) and roaming_sessions when available. Use an explicit UTC epoch-second window (max 31 days). If mayBeTruncated is true, split the time window (overlap boundaries and deduplicate IDs) or filter by MAC. The controller ignores offset pagination. Records reflect controller retention and may omit ongoing sessions. Wi-Fi association/bytes do not establish end-to-end Internet success.
Inputs: end (required), start (required), siteReference (required), mac, +1 more. Returns: end, data, count, limit, +3 more
unifi_list_countriesList countriesARead-only
List countries/regions (global) for geo-IP firewall rules. Returns: code (ISO alpha-2, e.g. 'US'), name. Use the code when building firewall policies that match by source/destination country.
Inputs: limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_devicesList devicesARead-only
List all adopted devices (gateways, switches, APs) at a site. Returns: id, name, model, macAddress, ipAddress, state (ONLINE/OFFLINE/etc), supported, firmwareVersion, firmwareUpdatable, features[] (capability tags, e.g. ['switching'] or ['accessPoint']), interfaces[] (e.g. ['ports'] or ['radios']). NOTE: features/interfaces are string arrays here; unifi_get_device expands them into objects. Use for: device inventory; pair with unifi_get_device for full config (port table, radios) and unifi_get_device_statistics for live metrics.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_device_tagsList device tagsARead-only
List device tags at a site. Tags group APs/switches for selective WiFi broadcast (via broadcastingDeviceFilter on a WiFi network). Returns: id, name, deviceIds[], metadata.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_dns_policiesList DNS policiesBRead-only
List DNS policies (local DNS records and forward rules served by the gateway) at a site. Returns: id, type (A_RECORD, AAAA_RECORD, CNAME_RECORD, MX_RECORD, TXT_RECORD, SRV_RECORD, FORWARD_DOMAIN), enabled, domain, metadata.origin, plus type-specific fields: A ipv4Address+ttlSeconds; AAAA ipv6Address+ttlSeconds; CNAME targetDomain+ttlSeconds; MX mailServerDomain+priority; TXT text; SRV serverDomain/service/protocol/port/priority/weight; FORWARD_DOMAIN ipAddress (per 11.0.83 response samples).
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_dpi_applicationsList DPI applicationsARead-only
List individual DPI applications (global) — specific apps/services like 'Netflix', 'Zoom', 'Steam'. Returns: id (numeric), name. More granular than unifi_list_dpi_categories.
Inputs: limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_dpi_categoriesList DPI categoriesARead-only
List DPI categories (global, not site-scoped) — high-level traffic groupings like 'Streaming', 'Social Networks', 'Gaming'. Returns: id (numeric), name. Use the category id when building firewall policies that match by category.
Inputs: limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_firewall_groupsList firewall groupsARead-only
List the site's firewall groups (address, IPv6 address and port groups) from the classic controller API (rest/firewallgroup), whole and unpaged. Legacy firewall rules reference these by ID. IDs are the classic controller's _id values, which differ from Integration API IDs: do not pass one to an Integration API tool, or the reverse.
Inputs: siteReference (required). Returns: data, count, siteReference
unifi_list_firewall_policiesList firewall policiesARead-only
List firewall policies (zone-based rules) at a site. Returns: id, name, enabled, action (object with type field), source/destination (zone reference + trafficFilter), ipProtocolScope, connectionStateFilter, ipsecFilter, schedule, loggingEnabled, reportFlowEnabled (Insights Flows reporting; false on the predefined Allow Return Traffic and Block policies), index, description, metadata (origin SYSTEM_DEFINED/USER_DEFINED/DERIVED, configurable on system policies). action is {type: ALLOW|BLOCK, allowReturnTraffic on ALLOW}. The protocol lives in ipProtocolScope.protocolFilter (NAMED_PROTOCOL or PRESET); ports and addresses live in source/destination.trafficFilter, which is omitted when a side matches the whole zone. Unset optional fields (ipsecFilter, schedule, connectionStateFilter) are omitted, not null. Evaluation order within a zone pair comes from unifi_get_firewall_policy_ordering.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_firewall_zonesList firewall zonesARead-only
List firewall zones (groupings of networks for zone-based firewalling) at a site. Returns: id, name, networkIds[], metadata.origin (indicates system-defined vs user-defined). Use for: zone inventory; pair with unifi_list_firewall_policies to see rules between zones.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_lagsList LAGsARead-only
List LAGs (Link Aggregation Groups — bonded switch ports) at a site. Returns: id, type (LOCAL/SWITCH_STACK/MULTI_CHASSIS), members[] ({deviceId, portIdxs[]}), switchStackId (SWITCH_STACK) or mcLagDomainId (MULTI_CHASSIS), metadata.origin.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_legacy_firewall_rulesList legacy firewall rulesARead-only
List the site's legacy firewall rules (WAN_IN, LAN_IN, GUEST_LOCAL and the other rulesets) from the classic controller API (rest/firewallrule), whole and unpaged. On a site that uses the zone-based firewall these rules may not be enforced; its rules are the policies unifi_list_firewall_policies returns. IDs are the classic controller's _id values, which differ from Integration API IDs: do not pass one to an Integration API tool, or the reverse. Rules reference networks by unifi_list_classic_networks IDs and groups by unifi_list_firewall_groups IDs. Sorted by ruleset, then rule_index, the order they are evaluated in.
Inputs: siteReference (required). Returns: data, count, siteReference
unifi_list_mc_lag_domainsList MC-LAG domainsARead-only
List MC-LAG (Multi-Chassis Link Aggregation) Domains — pairs of switches presenting as one for LAG redundancy. Returns: id, name, peers[] (per the older 10.4.57 spec: {deviceId, linkPortIdxs[], role TOP|BOTTOM}; not live-verified), lags[] (LAGs spanning the domain), metadata.origin.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_networksList networksARead-only
List all networks (VLANs/LAN segments) at a site. Returns: id, name, management (UNMANAGED/GATEWAY/SWITCH), enabled, vlanId, default (true for the default network), zoneId (the firewall zone the network sits in), dhcpGuarding (only present when enabled), metadata.origin (+ metadata.configurable on the system-defined default network). NOTE: the list view is sparse — for subnet/DHCP/NTP detail (ipv4Configuration/ipv6Configuration), call unifi_get_network on a specific id. Use for: VLAN inventory; pair with unifi_get_network_references to find what consumes a network.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_pending_devicesList pending devicesARead-only
List devices pending adoption across all sites (global endpoint, not site-scoped). Returns: basic device info per pending device (macAddress, model, ipAddress, firmwareVersion, etc. — exact per-row schema is not rendered in the 11.0.83 docs). Use for: discovering new devices on the network before calling unifi_adopt_device.
Inputs: limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_port_forwardsList port forwardsARead-only
List the site's port forwards from the classic controller API (rest/portforward), whole and unpaged: each one exposes a LAN host to the internet on the WAN interface pfwd_interface. enabled: false rules forward nothing; enabledCount counts the rest. Unless src_limiting_enabled restricts it to src_firewall_group_id, the forward is open to the whole internet: src is then "any" or absent (Network 11.0.94 omits it). fwd and fwd_port are the LAN target. IDs are the classic controller's _id values.
Inputs: siteReference (required). Returns: data, count, enabledCount, siteReference
unifi_list_radius_profilesList RADIUS profilesARead-only
List RADIUS profiles (auth/accounting server configurations referenced by WiFi WPA-Enterprise, switch 802.1X port auth, VPN). Returns: id, name, metadata (origin, configurable).
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_sitesList sitesARead-only
List all sites the API key has access to. Returns: id (the siteId every other tool requires), internalReference, name. Use for: first call in any workflow — almost every other tool needs a siteId.
Inputs: limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_switch_stacksList switch stacksARead-only
List Switch Stacks (multiple physical switches managed as one logical unit) at a site. Returns: id, deviceId (the stack's primary device), name, units[] (the stacked switches — named members on consoles older than 10.6.106), lags[] (LAGs spanning the stack), metadata.origin. Per-unit schema is not rendered in the 11.0.83 docs — call unifi_get_switch_stack to inspect. Use for: identifying stacked switches; individual member configs/stats still come from unifi_get_device.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_traffic_matching_listsList traffic matching listsARead-only
List traffic matching lists at a site — named collections of ports or IPs reused in firewall/ACL rules. Returns: id, type (PORTS/IPV4_ADDRESSES/IPV6_ADDRESSES), name, items[] (tagged objects such as {type:'PORT_NUMBER', value:22} or {type:'SUBNET', value:''}). Use for: finding the matching-list ID to reference from a firewall policy.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_vouchersList vouchersARead-only
List hotspot/guest-portal vouchers at a site. Returns: id, code, name, createdAt, activatedAt (when first guest used it), expiresAt, timeLimitMinutes, dataUsageLimitMBytes, rxRateLimitKbps, txRateLimitKbps, authorizedGuestLimit, authorizedGuestCount, expired. Use filter like 'expired.eq(true)' to bulk-find stale vouchers.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_vpn_serversList VPN serversARead-only
List VPN servers (roaming/client-access VPNs) at a site. Returns: id, type (L2TP, OPENVPN, PPTP, UID, WIREGUARD), name, enabled, metadata.origin.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_vpn_tunnelsList VPN tunnelsARead-only
List site-to-site VPN tunnels (IPsec, WireGuard, OpenVPN site-to-site) at a site. Returns: tunnel definitions per row (per-row schema not rendered in 11.0.83 docs and no tunnels to sample live; the older 10.4.57 spec lists id, type (IPSEC/OPENVPN/WIREGUARD), name, metadata.origin/source — call to inspect). For roaming client VPN servers, see unifi_list_vpn_servers.
Inputs: siteId (required), limit, filter, offset. Returns: data, count, limit, offset, +1 more
unifi_list_wansList WANsARead-only
List WAN interface definitions at a site. Returns: id, name only (verified against 11.0.83 — the Integration API exposes no live link status or throughput rates here). Use for: WAN inventory, multi-WAN topology.
Inputs: siteId (required), limit, offset. Returns: data, count, limit, offset, +1 more
unifi_list_wifiList WiFiARead-only
List all WiFi broadcasts (SSIDs) at a site. Returns (sparse list view, live-verified on 11.0.83): id, name (SSID), type (STANDARD/IOT_OPTIMIZED), enabled, metadata.origin, network reference (absent on PPSK SSIDs), securityConfiguration.type, broadcastingFrequenciesGHz, hotspotConfiguration (empty object when set). Booleans such as hideName/bandSteeringEnabled/clientIsolationEnabled, the full security configuration and optional configs are only returned by unifi_get_wifi. Passphrases (securityConfiguration.passphrase, presharedKeys[].passphrase) are returned as "[REDACTED]" unless includeSecrets is true. Use for: SSID inventory. For per-AP radio state (channel, txPower), use unifi_get_device on the AP.
Inputs: siteId (required), limit, filter, offset, +1 more. Returns: data, count, limit, offset, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 49 tools
Most tools are clearly distinguishable list_X/get_X pairs on distinct resources, and the descriptions explicitly disambiguate the tricky overlaps (classic vs Integration API networks, legacy firewall rules vs zone-based policies, client history vs sessions vs current clients). The remaining friction is inherent domain overlap (three client-oriented tools, two network listings), which the descriptions handle, so misselection is unlikely but not impossible.
Every tool follows the same unifi_verb_noun snake_case pattern (unifi_list_devices, unifi_get_device, unifi_list_firewall_policies). Verb choice maps predictably to read semantics (list for collections, get for single items), and multi-word nouns are cased consistently.
49 tools is well past a reasonable surface for an MCP server, and much of the bulk comes from mechanical list/get pairs (networks, wifi, vouchers, zones, policies, ACLs, DNS policies, matching lists, stacks, MC-LAGs, LAGs, VPNs, DPI, and more). The breadth of UniFi is real, but consolidation and fewer per-resource getters would make the set far more usable.
The surface is almost entirely read-only: there is no create/update/delete for networks, WiFi, firewall policies, ACLs, DNS policies, vouchers, or port forwards, so no lifecycle coverage exists in a domain where agents will want to change config. Worse, descriptions reference tools that are not present (unifi_adopt_device in the pending-devices description, unifi_reorder_acl_rules in the ACL description), creating dead-end pointers agents will follow and fail on.
Maintenance
Related MCP Connectors
Manage Koru Shield DNS filtering: profiles, rules, categories, schedules, and logs.
Manage Accelo companies, contacts, jobs, tasks, tickets and time.
Query and manage PacketFabric NaaS: ports, virtual circuits, cloud routers, pricing, metrics.
Manage Invoice Ninja clients, invoices, quotes, expenses, tasks and projects.
Related MCP Servers
- 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.5229 npm5MIT
- AlicenseNot gradedqualityAmaintenanceEnables management of a local UniFi controller, including devices, clients, network configuration, and monitoring through a single action tool.13MIT
- -licenseNot gradedqualityNot gradedmaintenanceTurns your UniFi Network Controller into programmable tools for querying and modifying network settings via MCP.-
- AlicenseBqualityDmaintenanceProvides 170+ tools to manage UniFi networks via the internal controller API, enabling AI assistants to perform full network management including clients, devices, WLANs, firewall, and more.64MIT