Unifi MCP Server logo

Unifi MCP Server

Connects AI agents to UniFi Network, Protect, and cloud APIs for network management, monitoring, and controlled changes.

Install Unifi MCP Server

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

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "unifi-mcp-server": {
      "command": "uvx",
      "args": [
        "unifi-mcp-server"
      ],
      "env": {
        "UNIFI_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

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

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The unifi-mcp-server MCP server exposes UniFi Network, Protect, and cloud APIs as MCP tools for reading and changing infrastructure. It can connect to a local console or gateway, use UniFi cloud API modes, or operate across multiple controllers in fleet mode. Use it when an agent needs UniFi inventory, configuration, device operations, security controls, Protect resources, or site-level data through one interface. Mutating operations require confirmation and can be restricted with read-only, dry-run, profiles, and role-based controls.

Use cases

  • Inspect UniFi clients, sites, devices, and network status
  • Manage wireless networks, VLANs, DHCP, DNS, and firewall settings
  • Operate UniFi Protect cameras, sensors, alarms, and related devices
  • Preview or confirm controlled changes to UniFi infrastructure
  • Aggregate information across controllers with fleet mode

Key features

  • UniFi Network and Protect API tools
  • Site Manager, Mobility, InnerSpace, and Carrier Fabric access
  • Local, cloud, and multi-controller fleet modes
  • Confirmation, dry-run, read-only, and role-based controls
  • stdio and network transport options
  • Audit, metrics, health, cache, and webhook support

Tools8

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

Self-reported~15 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 1d ago

Recent health check succeeded.

8/8 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · unifi-mcp-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars306Stargazers on the source repository.
Last commit4d agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.

How Unifi MCP Server works

What unifi-mcp-server MCP server does

The unifi-mcp-server MCP server gives MCP clients access to UniFi infrastructure through the official UniFi APIs. In local mode, it can work with a UniFi console or gateway on the LAN and exposes tools for Network and Protect administration. Its coverage includes clients, networks, VLANs, wireless settings, DHCP, DNS, WAN, devices, switching, topology, firewall policies, VPNs, backups, sites, cameras, sensors, alarms, and other documented UniFi resources.

Cloud modes reach UniFi's Site Manager APIs for sites and aggregate statistics. Cloud tools for Site Manager, Mobility, InnerSpace, and Carrier Fabric are available across API modes when enabled. Fleet mode can place multiple controllers behind one deployment and provides cross-controller tools, but it requires PostgreSQL and Redis extras.

How it works

The server communicates with an MCP client over stdio by default. It can also use streamable HTTP, HTTP, or SSE transports. A client sends tool calls, and the server maps them to the selected UniFi API mode and configured controller. Local mode registers the broadest tool set, while cloud modes provide a smaller set focused on sites and aggregate data.

Tool availability can be narrowed with profiles such as read, write, destructive, viewer, operator, and admin. Mutating calls require confirm=True, and supported operations accept dry_run=True for previews. Server-wide read-only and dry-run settings provide additional restrictions. Network transports require a bearer token, with token prefixes available to limit roles. Audit logging, health and metrics endpoints, optional Redis caching, and webhook HMAC verification are also supported by configuration.

Setup and configuration

Install the package with pip or uv, or run the published container image. Configure an MCP client with the server command and environment variables. UNIFI_API_KEY is required. Set UNIFI_API_TYPE to local, cloud-ea, or cloud-v1; local mode also needs UNIFI_LOCAL_HOST. The default API mode is cloud-ea, while the documented quick-start configuration uses local mode.

UNIFI_SITE_MANAGER_ENABLED=true enables the cloud tools. UNIFI_LOCAL_VERIFY_SSL controls certificate verification, and UNIFI_LOCAL_CA_FILE can provide a CA certificate for a self-signed console. MCP_SERVER_TRANSPORT selects the transport, while MCP_AUTH_TOKEN is required for network transports. DATABASE_URL enables fleet mode. Keep container execution attached to standard input and output when an MCP client launches it.

Tools and capabilities

The unifi-mcp-server MCP server includes tools for:

  • Searching, blocking, and reconnecting clients
  • Managing networks, VLANs, WiFi, DHCP reservations, DNS, WAN, vouchers, and traffic policies
  • Inspecting, adopting, restarting, upgrading, locating, and configuring devices and ports
  • Working with firewall rules, ACLs, VPNs, port forwarding, RADIUS, and guest portals
  • Reading and managing Protect cameras, events, sensors, lights, alarms, speakers, and related devices
  • Managing sites, backups, migrations, topology exports, events, and cross-site data
  • Calling a debug API request tool when DEBUG is enabled

Limitations and notes

Cloud API modes do not provide per-device control or configuration; those capabilities require local mode. Zone-based firewall tools require UniFi Network 9.0 or newer. Individual endpoints may be unavailable on some firmware versions. The debug tool exposes raw GET and DELETE access, is classified as destructive, and is removed in read-only mode, so it should remain disabled in production unless needed.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Unifi MCP Server

unifi-mcp-server is an MCP server that connects AI agents to UniFi Network, UniFi Protect, and UniFi cloud APIs. Its tools cover clients, devices, networks, security, sites, backups, cameras, sensors, and other infrastructure operations. It supports local controllers, cloud API modes, and optional multi-controller fleet deployments.

Install it with pip or uv, or run the published Docker image. For example, use `pip install unifi-mcp-server` or `uv tool install unifi-mcp-server`, then add an MCP server entry with `UNIFI_API_KEY` and the appropriate API settings. Fleet mode uses the optional fleet extras.

Set `UNIFI_API_TYPE` to `local` and provide `UNIFI_LOCAL_HOST` along with `UNIFI_API_KEY`. Add the server command to your MCP client's configuration. You can also set `UNIFI_LOCAL_PORT`, certificate verification, and a CA file when the console requires custom TLS handling.

Yes, unifi-mcp-server works with Cursor through its MCP settings. Add the server's `mcpServers` configuration in Cursor's MCP configuration, choose the installed command or container invocation, and provide the required UniFi environment variables.

Yes, set `UNIFI_READ_ONLY=true` to prevent mutating tools from being used. You can also use `UNIFI_DRY_RUN=true` for preview-only operation, select a restricted tool profile, and require confirmation for individual mutating calls.

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 MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/unifi-mcp-server?style=directory)](https://allmcps.com/mcp/unifi-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/unifi-mcp-server"><img src="https://allmcps.com/api/badge/unifi-mcp-server?style=directory" alt="Unifi MCP Server on AllMCPs" /></a>