Unifi logo

Unifi

UniFi semantic-analysis MCP β€” fleet health, anomaly detection, cross-site analytics

Install Unifi

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "unifi": {
      "command": "npx",
      "args": [
        "-y",
        "@us-all/unifi-mcp"
      ]
    }
  }
}

Settings β†’ Developer β†’ Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window β€” this can mean a slow first-time install rather than a real problem.

npx -y @us-all/unifi-mcp

No response to initialize.

This is an experimental automated check and can have false negatives β€” missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 7d ago.

Overview

Tools2

What Unifi lets your agent do. Expand a tool for its parameters.

Self-reported~159 tokens of context

Security & health

What it can reach and how reliably it runs β€” from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

7/7 checks healthy over the last 46d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev Β· @us-all/unifi-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads448Package downloads in the last 30 days.
Last commit3mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window β€” often a slow first install.
Tools exposed2Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

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 β€” plus 2 optional local controller tools that surface per-port error counters and SFP DDM the Cloud API doesn't expose. 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.

npm downloads tools @us-all standard Glama MCP server

Pre-flight diagnostic

Terminal
npx -y @us-all/unifi-mcp --doctor

Validates env vars, pings Site Manager API, probes Cloud Connector (if owner key set), and checks category toggles before starting. Exits non-zero on critical issues so it works in CI / pre-deploy scripts.

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 / unknown with a curated reason. Curated thresholds (e.g. WAN uptime <90% = critical, startupTime <1h = critical post-reboot).
  • Cloud Connector first-class β€” 35 tools through the official /v1/connector/consoles/{id}/... proxy. connectorAvailable (capability) vs connectorResolved (this-call) split.
  • Aggregation tools β€” fold 3–7 sequential calls into 1 with caveats array 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-site renders 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=http for ChatGPT Apps SDK or remote clients (Bearer auth via MCP_HTTP_TOKEN).
  • Local controller direct access (v1.13.0) β€” opt-in UNIFI_LOCAL_* env enables 2 tools that bypass the Cloud Connector and hit the controller's legacy /api/s/{site}/stat/device/{mac} directly on the LAN: get-port-errors (port-level rx/tx errors, link-flap counters, SFP DDM β€” Rx/Tx Power dBm, temperature, voltage, TX/RX fault) and list-port-flap-summary (fleet-wide port instability ranking). Surfaces data the Integration API doesn't expose. Requires LAN reachability.

Try this β€” 5 prompts

Connect the server to Claude Desktop or Claude Code, then paste any of these:

  1. MSP morning check β€” "Fleet health check across all my UniFi sites. Flag anything not healthy with severity, top 3 issues."
  2. Firmware rollout audit β€” "Find devices on outdated firmware across every site. Group by site, show current vs latest version, prioritize by criticality."
  3. Site degradation triage β€” "USM site has WiFi complaints. Pull the last 24h: device statuses, WAN uptime, recent reboots, top-bandwidth clients. Anything anomalous?"
  4. 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."
  5. 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."
  6. Port flap triage (requires UNIFI_LOCAL_*) β€” "Rank every port across all switches by instability score. For the top 3 worst offenders, pull SFP DDM if present and tell me whether the signal itself is bad or it's something downstream."

When to use this vs other UniFi MCPs

sirkirby/unifi-mcpenuno/unifi-mcp-server@us-all/unifi-mcp (this)
GitHub stars291117β€”
Tool count2247454
ScopeNetwork + Protect + Access + DriveNetwork + multi-site + QoS + backupSite 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

config.json
{
  "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

Terminal
claude mcp add unifi -s user \
  -e UNIFI_API_KEY=<your-key> \
  -e UNIFI_API_KEY_OWNER=<owner-key> \
  -- npx -y @us-all/unifi-mcp

Build from source

bash
git clone https://github.com/us-all/unifi-mcp-server.git
cd unifi-mcp-server && pnpm install && pnpm build
node dist/index.js

API keys β€” which one and where

The most common onboarding friction. UniFi has two surfaces through the same https://api.ui.com/v1:

SurfaceWhat it givesPathEnv var
Site Managerhosts, sites, devices summary, ISP metrics, SD-WAN configs (aggregated, console-wide)/v1/hosts, /v1/sites, /v1/devices, /v1/sd-wan-configsUNIFI_API_KEY
Cloud Connectorper-device, per-client, networks, firewall, WiFi (proxies to local controller)/v1/connector/consoles/{hostId}/...UNIFI_API_KEY_OWNER

API key permissions inherit from the role of the account that created them.

Account roleSite ManagerCloud 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 siteId is a UUID, not the literal string default
  • Available 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.

Local controller (optional, v1.13.0+)

Adds 2 tools that fill the gap left by Cloud Connector β€” per-port error counters, flap counters, and SFP DDM. These live in /api/s/{site}/stat/device/{mac} (legacy) and the official Network Integration API does not expose them (verified against OpenAPI spec v10.4.57).

Requirements:

  • LAN/VPN reachability from the host running this MCP to the controller (typically https://<controller-ip>)
  • A controller local account (Viewer / Limited Admin role is sufficient β€” Owner credentials NOT required)
  • Self-signed cert handling: set UNIFI_LOCAL_INSECURE=true for stock UDM Pro

Auth flow: POST /api/auth/login (cookie) β†’ all subsequent calls re-use the session, 401 triggers automatic re-login. Read-only.

Configuration

Reviews

No reviews yet β€” be the first to share how it worked for you.

Frequently Asked Questions about Unifi

unifi is an MCP server that provides read-only UniFi fleet health, anomaly detection, and cross-site analytics through official Site Manager API and Cloud Connector access. It offers 54 tools, seven semantic aggregations, severity verdicts, eight MCP prompts, and optional local-controller tools for port errors and SFP DDM.

The server uses the official UniFi Site Manager API and Cloud Connector, with optional direct local-controller access. Cloud Connector provides 35 tools through the official proxy, while local-controller tools require LAN reachability and expose port errors, link flaps, and SFP DDM data.

unifi provides semantic-analysis tools including site health timelines, site summaries, firmware inventories, cross-site comparisons, WAN uptime trends, bandwidth rankings, and site overviews. Analysis results include severity verdicts such as healthy, info, warning, critical, or unknown, plus reasons and caveats for partial failures.

Run `npx -y @us-all/unifi-mcp --doctor` to validate environment variables, ping the Site Manager API, probe Cloud Connector when an owner key is configured, and check category toggles. The diagnostic exits non-zero on critical issues, making it suitable for CI or pre-deploy checks.

Related MCP servers

Add a badge to your READMEShow it’s listed β€” live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewUnifi AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/unifi?style=directory)](https://allmcps.com/mcp/unifi)
HTML Embed
<a href="https://allmcps.com/mcp/unifi"><img src="https://allmcps.com/api/badge/unifi?style=directory" alt="Unifi on AllMCPs" /></a>