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
| Name | What it is | Required |
|---|---|---|
UNIFI_HOST | UniFi Controller hostname or IP address | Yes |
UNIFI_USERNAME | UniFi Controller username | Yes |
UNIFI_PASSWORD | UniFi Controller password | Yes |
UNIFI_PORT | UniFi Controller port (default: 443) | No |
UNIFI_VERIFY_SSL | Verify SSL certificate (default: true) | No |
UNIFI_SITE | UniFi 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 onceget_historical_statsandget_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
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
implementing-gcp-vpc-firewall-rulesLets your agent implement and audit firewall rules in Google Cloud network. Controls ingress and egress access to protect workloads and monitor rule effectiveness.edge-device-exploitationExplains how attackers target routers, firewalls and VPN devices at a network's edge, so network teams can check and patch them.deauth-pmfHelps your agent check whether a Wi-Fi network protects its devices against forced disconnects, by reading the access point's management frame settings.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.