Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”‘ Needs an API keyCloud and servers

UniFi MCP Server

Lets your AI agent read and change your UniFi network, Protect cameras and UniFi cloud sites.

340 stars on GitHubby enunoLicense Apache-2.0Updated 20 days ago

How to install

This MCP is local: it runs on your computer.

It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Code…). Choose your app:

Paste in the terminal:

claude mcp add unifi -e UNIFI_HOST="<your value>" -e UNIFI_USERNAME="<your value>" -e UNIFI_PASSWORD="<your value>" -- npx -y unifi-mcp-server

What to fill in

NameWhat it isRequired
UNIFI_HOSTUniFi Controller hostname or IP addressYes
UNIFI_USERNAMEUniFi Controller usernameYes
UNIFI_PASSWORDUniFi Controller passwordYes
UNIFI_PORTUniFi Controller port (default: 443)No
UNIFI_VERIFY_SSLVerify SSL certificate (default: true)No
UNIFI_SITEUniFi site name (default: default)No

Ready! Now test it

Restart the app and paste one of these requests in the chat:

List all clients on the guest network and show who is using the most data.
Preview a new firewall rule that blocks a device, but do not apply it yet.

What it is

This server exposes UniFi Network, UniFi Protect and UniFi cloud APIs as MCP tools. An agent can manage clients, devices, WiFi, firewall rules and cameras on one controller or many. Every change needs confirmation and supports a dry run first.

What it can do

  • Network: clients, VLANs, WiFi, DHCP, DNS, vouchers
  • Devices: inventory, restart, upgrade, ports, topology
  • Security: firewall rules, zone-based firewall, ACLs, port forwarding, VPN
  • Protect: cameras, NVRs, sensors, lights, alarms
  • Cloud: Site Manager, Mobility, InnerSpace, Carrier Fabric
  • fleet_health: check many controllers at once
  • get_historical_stats and get_dpi_statistics: network statistics
  • Backups and multi-site operations

When to use

  • β€ΊWhen you want an agent to check which devices and clients are on your network.
  • β€ΊWhen you want to review firewall rules or WiFi settings safely, with a preview first.
  • β€ΊWhen you manage several UniFi sites and want one place to look across them.

What you need

A UniFi API key from UniFi Site Manager, plus Python (pip or uv) or Docker. In local mode you also need your console's address.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

Is it free and open source?

The readme shows an open license badge and installs from PyPI or a container image; no fee is mentioned.

What do I need?

A UniFi API key, which you create in Site Manager under Settings, Control Plane, Integrations. The key is shown only once.

How many tools does it have?

343 tools in local mode and 71 in either cloud mode.

Is it safe to let an agent change settings?

Every mutating tool needs confirm=True and supports dry_run=True. You can also run the server in read-only or dry-run mode.

Which API mode should I use?

local is recommended. The cloud modes only cover sites and aggregate statistics, with no per-device control.

Does it support UniFi Network 11?

It is compatible per released documentation, with four items still awaiting live-controller checks.

If it does not work

  • β€ΊSet UNIFI_API_KEY, and for local mode also UNIFI_API_TYPE=local and UNIFI_LOCAL_HOST.
  • β€ΊFor a self-signed console certificate, set UNIFI_LOCAL_CA_FILE instead of turning off verification.
  • β€ΊWith Docker, keep the -i flag and do not add -d.

5 new skills a week. 1 minute to read.