PlugWiki
UniFi Network MCP logo

UniFi Network MCP Server by sirkirby: Setup for Claude, Cursor and Other Apps

CommunityLocal

Lets Claude, Cursor and other assistants check your UniFi network and change firewall rules, VLANs, Wi-Fi, VPNs and devices after a confirm step.

This community server connects your assistant to a UniFi Network controller. It can list clients, devices, firewall policies, VLANs, Wi-Fi networks and VPNs, read traffic flows and stats, and, after a preview and your confirm, change or delete them. It runs on your computer and signs in to your own controller with a local admin login. It is not made by Ubiquiti.

Good for

  • Home-lab owners who want to ask about clients, traffic and Wi-Fi in plain words
  • Small-office admins who audit firewall rules and VLAN isolation
  • Network engineers who script routine changes and want a preview first

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install UniFi Network MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the UniFi Network MCP server to Claude Code. Run this command:
    
    /plugin marketplace add sirkirby/unifi-mcp
    
    Ask me for UNIFI_NETWORK_HOST, UNIFI_NETWORK_USERNAME, UNIFI_NETWORK_PASSWORD and only put the values in that config, nowhere else.
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv (Python 3.13+).

Read-only mode: Set UNIFI_NETWORK_READ_ONLY=true in the server env, or set UNIFI_POLICY_NETWORK_CREATE, UNIFI_POLICY_NETWORK_UPDATE and UNIFI_POLICY_NETWORK_DELETE to false.

Changes show a preview first and apply only after you confirm. An API key (UNIFI_NETWORK_API_KEY) alone only covers device, client, network and Wi-Fi lists.

From the project README. Source.

Tools

  • Shows one MAC access rule

    Returns the full settings of one MAC access rule by ID. A MAC access rule is a layer 2 rule that decides which devices on a VLAN may talk to each other.

    Try: “Show the details of a MAC access rule.”

    Read · unifi_get_acl_rule_details

  • Shows recent controller alerts

    Returns the recent alerts raised by the controller.

    Try: “Show me recent alerts.”

    Read · unifi_get_alerts

  • Shows network anomalies

    Returns anomaly events the controller detected on the network.

    Try: “Has the controller flagged any anomalies?”

    Read · unifi_get_anomalies

  • Shows one access point group

    Returns the full settings of one access point group by ID. An access point group is a set of access points that broadcast chosen Wi-Fi names.

    Try: “Show the details of a access point group.”

    Read · unifi_get_ap_group_details

  • Shows auto-backup settings

    Returns whether automatic backups are on, plus schedule, retention and cloud backup settings.

    Try: “Are automatic backups enabled?”

    Read · unifi_get_autobackup_settings

  • Shows everything about one client

    Looks up a single client by MAC address. By default it returns the full record, or a short summary if you ask.

    Try: “Show me the details for the client with MAC AA:BB:CC:DD:EE:FF.”

    Read · unifi_get_client_details

  • Shows which apps one client uses

    Returns traffic for one client broken down by application or category, using the controller deep packet inspection data.

    Try: “Which apps is my TV using the most bandwidth on?”

    Read · unifi_get_client_dpi_traffic

  • Shows one client group

    Returns the full settings of one client group by ID. A client group is a named set of devices, listed by MAC address, that policies can target.

    Try: “Show the details of a client group.”

    Read · unifi_get_client_group_details

  • Shows guest login sessions

    Returns the session history of hotspot and captive portal logins. It does not track normal connections.

    Try: “Show the guest portal sessions for this week.”

    Read · unifi_get_client_sessions

  • Shows a client traffic history

    Returns upload and download totals over time for one client from the controller report.

    Try: “How much data did this phone upload yesterday?”

    Read · unifi_get_client_stats

  • Shows Wi-Fi quality for one client

    Returns signal, noise, satisfaction score and transmit and receive rates for a wireless client.

    Try: “Why is the laptop in the study getting a weak Wi-Fi signal?”

    Read · unifi_get_client_wifi_details

  • Shows one content filter profile

    Returns the full settings of one content filter profile by ID. A content filter profile is a DNS-based block list by category, with optional safe search.

    Try: “Show the details of a content filter profile.”

    Read · unifi_get_content_filter_details

Read from the source code

Permissions

high risk · 9 things to watch · 4 advisories

High risk

The assistant can read your whole network setup and, after you confirm a preview, change or delete firewall rules, networks, Wi-Fi and devices. Turn off create, update and delete with the policy variables unless you need them, and read each preview.

What it can do

Watch out for

  • It can delete firewall rules, networks and Wi-Fi

    Nineteen tools delete or erase things, including firewall policies and zones, networks, SSIDs, VPN clients, backups and client history. Set UNIFI_POLICY_NETWORK_DELETE=false if you do not need deletes, or UNIFI_NETWORK_READ_ONLY=true to block all changes. github.com

  • A wrong change can cut you off from your network

    The tools change firewall, VLAN, Wi-Fi, VPN and gateway settings, and can reboot, upgrade, disable or power-cycle devices. Deleting a Wi-Fi network disconnects every device on it. Our advice: take a backup first and read each preview before you confirm. github.com

  • Your admin login sits in the client config

    The controller address and a local admin username and password are set as environment variables. Use a dedicated admin account for the assistant. github.com

  • The run and batch tools can call any other tool

    The execute and batch tools run whatever tool they name. Approving one means approving the tool and arguments inside it, so check them. github.com

  • Confirmation can be switched off

    Setting UNIFI_TOOL_PERMISSION_MODE=bypass or UNIFI_NETWORK_TOOL_PERMISSION_MODE=bypass applies every change that policy allows without a preview. The deprecated UNIFI_AUTO_CONFIRM=true does the same. Leave these unset unless you run unattended automation. github.com

  • Your network details go to your AI app

    Client names, MAC and IP addresses, traffic flows and firewall rules are passed to the assistant you use. Pick an app you trust with that data. github.com

  • Secrets are hidden unless you turn that off

    Wi-Fi passphrases, VPN keys, SNMP strings and device SSH credentials are redacted by default. Setting UNIFI_NETWORK_REDACT_SENSITIVE_FIELDS=false returns them raw. github.com

  • The optional web mode has no sign-in by default

    The server uses stdio by default. If you turn on its HTTP mode it binds 127.0.0.1, and anything that can reach it can call the tools unless you set the bearer token. github.com

  • Gate names by category

    Variables follow UNIFI_POLICY_NETWORK_<CATEGORY>_<ACTION>, for example UNIFI_POLICY_NETWORK_FIREWALL_POLICIES_DELETE, UNIFI_POLICY_NETWORK_WLANS_DELETE and UNIFI_POLICY_NETWORK_NETWORKS_UPDATE. The shorthand names in the tool manifest, such as client_group, are never read. github.com

Security advisories

Technical details
Turning on read-onlySet UNIFI_NETWORK_READ_ONLY=true (or UNIFI_READ_ONLY=true for every UniFi server). Read-only mode denies every non-read action whatever the UNIFI_POLICY_* gates say. Setting UNIFI_POLICY_NETWORK_CREATE, UNIFI_POLICY_NETWORK_UPDATE and UNIFI_POLICY_NETWORK_DELETE to false has the same effect. For clients that only allow read tools, also set UNIFI_TOOL_REGISTRATION_MODE=eager.
Talks toYour UniFi Network controller on your network
Sign-in and keysThe controller address and a local admin username and password sit in your client config as environment variables. An optional API key can replace them for device, client, network and Wi-Fi lists only.

Questions

Is the UniFi Network MCP server official?

No. It is a community project by sirkirby, not made by Ubiquiti. The same repository also has servers for UniFi Protect and UniFi Access.

What credentials does it need?

The controller address plus a local admin username and password. An API key alone works for device, client, network and Wi-Fi lists. Changes use the admin login, and a few tools also need the API key.

Can it delete firewall rules and networks?

Yes. It has delete tools for firewall policies, zones, networks, Wi-Fi networks, VPN clients and more. Each delete shows a preview first and runs only after confirm, and you can turn deletes off with UNIFI_POLICY_NETWORK_DELETE=false.

Can it run read-only?

Yes. Set UNIFI_NETWORK_READ_ONLY=true (or UNIFI_READ_ONLY=true for every UniFi server) and every change is denied, whatever the UNIFI_POLICY_* variables say. Or set UNIFI_POLICY_NETWORK_CREATE, UNIFI_POLICY_NETWORK_UPDATE and UNIFI_POLICY_NETWORK_DELETE to false. Both are enforced on the server, so they hold whatever the client allows.

Does it run on my computer or in the cloud?

On your computer. It talks to your controller over your own network and has no hosted version.

Why does the tool list look short at first?

The default mode lists a few tools directly and loads the rest on request, to save space in the assistant. Setting UNIFI_TOOL_REGISTRATION_MODE=eager lists every tool.

How is it different from the UniFi Protect and Access servers?

Network covers the gateway, switches, Wi-Fi, firewall and VPN. The Protect server handles cameras and the Access server handles doors, and each is installed on its own.

Is it free?

Yes. The repository is MIT licensed. The published package metadata on PyPI declares no license.

How do I add it to Claude Code?

Use the install box above. Claude Code can install it as a plugin, which also walks you through the controller settings.

Information

updated Nov 2, 2026

Publisher
Community
Package
unifi-network-mcp
Registry
PyPI
Transport
stdio
Auth
token in env
Version
0.7.8
License
MIT
Last commit
Oct 30, 2026
Open issues
13
Listed in
Official MCP registry

GitHubPyPIOfficial MCP Registry

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 4
  1. github.com · github.com
  2. github.com · github.com
  3. github.com · github.com
  4. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.