unifi-mcp-server
UniFi MCP Server
The MSP-style UniFi MCP — built around the official Site Manager API + Cloud Connector with cross-site analytics no other UniFi MCP exposes.
54 tools split across 7 semantic-analysis aggregations, 9 raw Site Manager, and 35 Cloud Connector. Severity verdicts (
healthy/info/warning/critical) on top of curated thresholds. 8 MCP Prompts (4 fleet-wide ops + 4 MSP workflows). Read-only — Ubiquiti's API keys don't ship write yet.
What it does that others don't
Site Manager analytics —
site-health-timeline,summarize-site,firmware-inventory,compare-sites,wan-uptime-trend,top-clients-by-bandwidth,list-sites-overview. No other UniFi MCP exposes these.Severity verdicts, not just numbers — every analysis tool returns
healthy / info / warning / critical / unknownwith a curated reason. Curated thresholds (e.g. WAN uptime <90% =critical, startupTime <1h =criticalpost-reboot).Cloud Connector first-class — 35 tools through the official
/v1/connector/consoles/{id}/...proxy.connectorAvailable(capability) vsconnectorResolved(this-call) split.Aggregation tools — fold 3–7 sequential calls into 1 with
caveatsarray surfacing partial failures (e.g. Site Manager API can't window-bound WAN uptime — that's surfaced explicitly).MCP Prompts (8) — fleet ops:
triage-site-degradation,firmware-rollout-audit,wan-uptime-report,cross-site-anomaly-detection. MSP workflows:msp-onboard-site-checklist,msp-monthly-client-report,msp-fleet-firmware-plan,msp-bandwidth-complaint-investigation.Token-efficient by design — smallest schema footprint of all
@us-all/*MCPs (default ~5K tokens with owner key). Fleet of 200+ devices analyzable inside a single session.Apps SDK card —
summarize-siterenders as a fleet-status card on ChatGPT clients (online %, WAN uptime, gateway, devices) via_meta["openai/outputTemplate"]. Claude clients receive the same JSON content.stdio + Streamable HTTP — defaults to stdio. Set
MCP_TRANSPORT=httpfor ChatGPT Apps SDK or remote clients (Bearer auth viaMCP_HTTP_TOKEN).
Related MCP server: UniFi MCP Server
Try this — 5 prompts
Connect the server to Claude Desktop or Claude Code, then paste any of these:
MSP morning check — "Fleet health check across all my UniFi sites. Flag anything not
healthywith severity, top 3 issues."Firmware rollout audit — "Find devices on outdated firmware across every site. Group by site, show current vs latest version, prioritize by criticality."
Site degradation triage — "USM site has WiFi complaints. Pull the last 24h: device statuses, WAN uptime, recent reboots, top-bandwidth clients. Anything anomalous?"
WAN SLA report — "Generate a monthly WAN uptime report for all sites. Surface outages > 5 minutes, dual-WAN failover events, sites below 99.5% target."
Cross-site anomaly — "Compare USS to my other sites — clients per AP, traffic patterns, device firmware mix. Flag outliers and suggest the most likely cause."
When to use this vs other UniFi MCPs
sirkirby/unifi-mcp | enuno/unifi-mcp-server |
| |
GitHub stars | 291 | 117 | — |
Tool count | 224 | 74 | 51 |
Scope | Network + Protect + Access + Drive | Network + multi-site + QoS + backup | Site Manager + Cloud Connector + analytics |
Site Manager API | ❌ | partial | ✅ deep + analytics |
Cloud Connector | ❌ | partial (3 modes) | ✅ avail/resolved split |
UniFi Protect (cameras) | ✅ | ❌ | ❌ (out of scope) |
UniFi Access (doors) | ✅ | ❌ | ❌ (out of scope) |
Aggregation tools | ❌ | ❌ | ✅ 7 |
Severity verdicts | ❌ | ❌ | ✅ curated thresholds |
MCP Prompts | ❌ | ❌ | ✅ 8 (incl. 4 MSP workflows) |
Use sirkirby when you need cameras (Protect) or door access. Use enuno if you want raw Network API breadth. Use this server for MSP-style multi-site analytics, fleet triage, and any "is something off?" question across many consoles.
Install
Claude Desktop
{
"mcpServers": {
"unifi": {
"command": "npx",
"args": ["-y", "@us-all/unifi-mcp"],
"env": {
"UNIFI_API_KEY": "<your-key>",
"UNIFI_API_KEY_OWNER": "<owner-key-or-same-key-if-role=owner>"
}
}
}
}Claude Code
claude mcp add unifi -s user \
-e UNIFI_API_KEY=<your-key> \
-e UNIFI_API_KEY_OWNER=<owner-key> \
-- npx -y @us-all/unifi-mcpBuild from source
git clone https://github.com/us-all/unifi-mcp-server.git
cd unifi-mcp-server && pnpm install && pnpm build
node dist/index.jsAPI keys — which one and where
The most common onboarding friction. UniFi has two surfaces through the same https://api.ui.com/v1:
Surface | What it gives | Path | Env var |
Site Manager | hosts, sites, devices summary, ISP metrics, SD-WAN configs (aggregated, console-wide) |
|
|
Cloud Connector | per-device, per-client, networks, firewall, WiFi (proxies to local controller) |
|
|
API key permissions inherit from the role of the account that created them.
Account role | Site Manager | Cloud Connector |
Admin (non-owner) | ✅ | ❌ 403 |
Owner | ✅ | ✅ |
If you have the owner role, set both env vars to the same key. That's the most common case for @us-all operators.
Get the key: unifi.ui.com → Settings → API → Generate. View Only is the only option in GA today (Full Access greyed out — Early Access program needed for write).
Cloud Connector requirements
Console firmware ≥ 5.0.3
API path:
https://api.ui.com/v1/connector/consoles/{hostId}/{appPath}Local
siteIdis a UUID, not the literal stringdefaultAvailable endpoints: Network integration API (
/network/integration/v1/sites, devices, clients, networks). Legacy paths (/api/s/{site}/stat/event) return 404. Event logs / syslog not exposed.
Configuration
Variable | Required | Default | Description |
| ✅ | — | API key from unifi.ui.com (any admin role) |
| ❌ | — | Owner-role API key — enables 35 Cloud Connector tools. If your key has owner role, set this to the same value. |
| ❌ |
| API base URL |
| ❌ | — | Comma-sep allowlist of categories. |
| ❌ | — | Comma-sep denylist. Ignored when |
| ❌ |
|
|
| conditional | — | Bearer token. Required when |
| ❌ |
| HTTP listen port |
| ❌ |
| HTTP bind host (DNS rebinding protection auto-enabled for localhost) |
| ❌ |
| Skip Bearer auth — e.g. behind a reverse proxy that handles it |
Categories (8): analysis, raw, devices, clients, networks, firewall, wan, reference.
When MCP_TRANSPORT=http: POST /mcp (Bearer-auth JSON-RPC) + GET /health (public liveness).
Token efficiency
Smallest schema footprint of all @us-all/* MCPs.
Scenario | Tools | Schema tokens |
default no-owner | 17 | 1,700 |
| 8 | 1,000 (−42%) |
default with owner key | 52 | ~5,000 |
| 8 | 1,000 (−80%) |
Severity & thresholds
Every analysis tool returns one of:
healthy— no issuesinfo— informational, no actionwarning— needs attentioncritical— immediate actionunknown— API failure or incomplete data
Curated thresholds:
Condition | Severity |
Device offline |
|
|
|
|
|
|
|
WAN uptime < 90% |
|
WAN uptime < 95% |
|
MCP Prompts (8)
Workflow templates available via MCP prompts/list. Four are fleet-ops; four are MSP-specific (managed-service-provider workflows).
Fleet ops:
triage-site-degradation— site complaints workflow: device + WAN + reboots + clients in sequence.firmware-rollout-audit— fleet-wide firmware diff and rollout safety check.wan-uptime-report— monthly WAN SLA-style report across sites.cross-site-anomaly-detection— compare a site to fleet baseline; flag outliers.
MSP workflows:
msp-onboard-site-checklist— pass/fail readiness checklist for a newly added customer site (firmware floor, console connectivity, uptime trend, connector availability, firewall sanity, recent reboots, pending devices).msp-monthly-client-report— customer-facing monthly health report (one site → headline, network availability, devices, top users, recommendations) with non-technical phrasing.msp-fleet-firmware-plan— staggered N-wave rollout plan to a target firmware version, ordered by risk-tolerance with maintenance windows + rollback triggers.msp-bandwidth-complaint-investigation— triage 'internet is slow at site X' via WAN trend + ISP metrics + top clients + DPI categories + recent reboots.
MCP Resources
unifi://site/{hostName}/devices— site's devices snapshotunifi://reboots/recent— recently rebooted devices fleet-wide
Tools (54)
8 categories. Use search-tools to discover at runtime; full list collapsed below. Cloud Connector tools (33) only register when UNIFI_API_KEY_OWNER is set; without it the surface is 21 tools.
Group | Tools |
Semantic analysis (incl. aggregations) | 9 |
Site Manager raw | 9 |
Cloud Connector (devices/clients/networks/wifi/firewall/wan/reference) | 33 |
Sites local ( | 2 |
Meta ( | 1 |
Semantic analysis (9)
list-sites-overview, analyze-site-health, detect-recent-reboots, compare-sites, firmware-inventory, wan-uptime-trend, top-clients-by-bandwidth, summarize-site (aggregation), site-health-timeline (aggregation)
Site Manager API (9)
list-hosts, get-host, list-sites, list-devices, get-isp-metrics (optional), query-isp-metrics (optional), list-sdwan-configs, get-sdwan-config, get-sdwan-config-status
Cloud Connector — devices (4)
get-device-details, get-device-by-id, get-device-statistics, list-pending-devices
Cloud Connector — clients (2)
list-site-clients, get-client-details
Cloud Connector — networks (3)
list-networks, get-network-details, get-network-references
Cloud Connector — WiFi (2)
list-wifi-broadcasts, get-wifi-broadcast-details
Cloud Connector — firewall / ACL / DNS (10)
list-firewall-zones, get-firewall-zone, list-firewall-policies, get-firewall-policy, get-firewall-policy-ordering, list-acl-rules, get-acl-rule, get-acl-rule-ordering, list-dns-policies, get-dns-policy
Cloud Connector — traffic / WAN / VPN (5)
list-traffic-matching-lists, get-traffic-matching-list, list-wans, list-vpn-tunnels, list-vpn-servers
Cloud Connector — hotspot / reference (7)
list-vouchers, get-voucher-details, list-radius-profiles, list-device-tags, list-dpi-categories, list-dpi-applications, list-countries
Sites local (2)
list-local-sites, get-app-info
Meta
search-tools — query other tools by keyword; always enabled.
Architecture
Claude → MCP stdio → src/index.ts
├── tools/analysis.ts → Site Manager API (UNIFI_API_KEY)
├── tools/*.ts (raw) → Site Manager API (UNIFI_API_KEY)
└── tools/connector.ts → Cloud Connector (UNIFI_API_KEY_OWNER)
helpers/resolver.ts → hostName ↔ ID mappingBuilt on @us-all/mcp-toolkit:
extractFields— token-efficient response projectionsaggregate(fetchers, caveats)— fan-out helper forsummarize-site/site-health-timelinecreateWrapToolHandler—X-API-KEYredaction +ConnectorError/UniFiErrorextractionRetry: 3 attempts, exponential backoff (1s → 2s → 4s) + jitter, 30s Cloud Connector timeout
Limitations
Read-only — UniFi API keys don't support write yet (Full Access role greyed out in GA).
Rate limit — 10,000 req/min on stable v1; 100 req/min on Early Access.
Cloud Connector partial proxy — Network integration API works; legacy paths return 404; event logs/syslog not exposed.
ISP Metrics — may return 404 depending on account/plan.
Tech stack
Node.js 18+ • TypeScript strict ESM • pnpm • @modelcontextprotocol/sdk • zod v4 • dotenv.
License
Available Tools
19 toolsanalyze-site-healthARead-only
Analyze health of a specific site by name (e.g., 'USM'). Returns device status, WAN info, reboot detection
Inputs: name (required), extractFields.
compare-sitesARead-only
Side-by-side comparison of all (or selected) sites: device count, online %, WAN avg/min uptime, gateway. Use to spot fleet outliers.
Inputs: names, extractFields.
detect-recent-rebootsARead-only
Detect devices that rebooted within a time window. Checks all sites by default
Inputs: name, hours, extractFields.
firmware-inventoryARead-only
Group all devices by firmware version + model and surface outdated devices. Helps detect fleet inconsistency and pending upgrades.
Inputs: groupBy.
get-hostARead-only
Get detailed information about a specific host by ID
Inputs: id (required).
get-isp-metricsBRead-only
Get ISP performance metrics. May be unavailable depending on account
Inputs: no named parameters.
get-sdwan-configCRead-only
Get a specific SD-WAN configuration by ID
Inputs: id (required).
get-sdwan-config-statusBRead-only
Get the status of a specific SD-WAN configuration
Inputs: id (required).
list-devicesBRead-only
List all devices across hosts (switches, APs, gateways, cameras)
Inputs: hostId, type, extractFields.
list-hostsARead-only
List all UniFi console hosts (UDM, UDM Pro, Cloud Key, etc.)
Inputs: extractFields.
list-sdwan-configsARead-only
List all SD-WAN configurations
Inputs: no named parameters.
list-sitesARead-only
List all sites with statistics (device counts, WAN status, ISP info)
Inputs: no named parameters.
list-sites-overviewARead-only
Get a health overview of all UniFi sites with status, issues, and device counts
Inputs: extractFields.
query-isp-metricsBRead-only
Query ISP metrics with filters. May be unavailable depending on account
Inputs: hostIds, siteIds, duration, metricType.
search-toolsARead-only
Discover available tools by natural language query. Returns matching tool names + descriptions across all categories. Use this first to navigate the 54-tool surface efficiently.
Inputs: query (required), category, limit.
site-health-timelineARead-only
Per-site health snapshot over a lookback window: devices with stability scores, reboots, WAN uptime, optional client count. Replaces 5+ sequential calls (devices + wan + reboots + clients). Caveats[] surfaces partial-data and API limitations.
Inputs: hostName (required), lookbackDays, extractFields.
summarize-siteARead-only
Deep aggregated site view: devices + WAN status + (opt) clients + networks + WiFi broadcasts in one call. Replaces 4-5 round-trips. Connector-dependent fields auto-skip when owner key absent. Renders an Apps SDK card on ChatGPT clients (Claude clients receive the same JSON text).
Inputs: name (required), includeClients, clientLimit, includeNetworks, +2 more.
top-clients-by-bandwidthARead-only
Top N clients by bandwidth on a site (combined / tx-only / rx-only). Requires Cloud Connector (UNIFI_API_KEY_OWNER).
Inputs: name (required), topN, metric, limit.
wan-uptime-trendARead-only
Aggregate WAN uptime across all sites with severity flagging (default threshold 95%). Returns per-WAN sorted by lowest uptime first.
Inputs: threshold.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have distinct purposes (e.g., analyze-site-health vs summarize-site), but get-isp-metrics and query-isp-metrics overlap somewhat, as both retrieve ISP metrics with only slight differences in parameters.
Tool names follow a consistent verb_noun pattern (e.g., list-sites, get-host, detect-recent-reboots), with occasional noun_noun combinations like firmware-inventory that are still descriptive. No mixing of case styles.
19 tools is slightly above the typical 3-15 range, but the server covers a broad UniFi management domain (devices, sites, health, ISP, SD-WAN), making the count reasonable without feeling bloated.
The tool set covers monitoring and querying comprehensively (list, get, analyze, compare), but lacks CRUD operations for management. For a read-only monitoring scope, it is nearly complete.
Maintenance
Related MCP Connectors
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Remote MCP tools for 3-vendor AI workflow diagnostics, HAR sandboxes, 50v audits, and rubrics.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to manage and monitor UniFi Network Controllers through natural language. Provides 25 read-only tools for discovering devices and clients, viewing security configurations, analyzing network statistics, and exporting configuration data.41MIT
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive management of UniFi Network infrastructure through 24 tools for monitoring and controlling devices, clients, wireless networks, security, and guest access. Supports network administration tasks like device restarts, client blocking, WLAN configuration, and backup creation.13 npmMIT
- AlicenseAqualityBmaintenanceEnables querying UniFi network devices and data using natural language through MCP clients like Claude Desktop.460 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query and manage UniFi controllers and console fleets through natural language, using the UniFi Site Manager Cloud Connector. Runs remotely on Cloudflare Workers with no local install.1MIT