Skip to main content
Glama
UniFi MCP Server

UniFi MCP Server

CI Security codecov PyPI Python License Documentation Ask DeepWiki

An MCP server that exposes UniFi Network, UniFi Protect and the UniFi cloud APIs (Site Manager, Mobility, InnerSpace, Carrier Fabric) as MCP tools, so AI agents can read and change UniFi infrastructure through one standard interface. It runs against one controller or, in fleet mode, many.

Current release: 0.13.0. See CHANGELOG.md for what changed.

UniFi MCP Server MCP server – quality and maintenance score on Glama

Contents

Related MCP server: UniFi Network MCP Server

Features

366 tools in local mode, from 65 modules.

  • Network: clients (search, block, reconnect), networks and VLANs, WiFi SSIDs, DHCP reservations, DNS, WAN, guest vouchers, QoS profiles and traffic routes, DPI statistics, traffic flows (including lookup by flow ID), client-connection events and bulk client editing, and Matter/Thread inventory on Network 11.

  • Devices: inventory, adoption, restart, locate, upgrade, radio settings, port profiles and per-port overrides, switching and stacks, topology export (JSON, GraphML, DOT), diagnostics, WiFi channel planning.

  • Security: legacy firewall rules and groups, zone-based firewall (zones, policies, zone matrix), ACL rules, traffic matching lists, port forwarding, VPN and site-to-site VPN, content filtering, RADIUS and the guest portal.

  • Protect: cameras, NVRs, views, events, sensors, lights, chimes, sirens, relays, speakers, alarm hubs and the alarm manager.

  • Cloud: Site Manager (hosts, sites, cross-site statistics), the connector proxy, Mobility workspaces and devices, InnerSpace floor plans and inventory, Carrier Fabric subscribers and service plans.

  • Operations: sites, backups (create, schedule, download, restore), events, multi-site aggregation, device migration between sites, console NetFlow export configuration, and gateway packet capture.

  • Fleet mode (optional, with Postgres and Redis): many controllers behind one server, a controller registry with encrypted credentials, server-issued tokens with roles, a shared read cache, several replicas and background workers, and fleet_* tools that read across controllers. See MULTI_CONTROLLER.md and docs/FLEET_SCALING_PLAN.md.

  • Native prompts: eight parameterised UniFi operational workflows (health check, client connectivity, WiFi performance, device investigation, firewall review, change planning, Protect health, fleet summary) exposed through the standard prompts/list and prompts/get operations. See docs/PROMPTS.md.

  • Safety: every mutating tool needs confirm=True and supports dry_run=True, plus read-only and dry-run server modes, role-based access over risk tiers, and a hash-chained audit log (see below).

  • A2A discovery and delegation: an agent card built from the live tool registry, served at /a2a/agent-card and /.well-known/agent-card.json, plus a capability manifest and a delegation endpoint that runs a registered tool under the server's own role, confirmation and audit controls. See A2A.md.

  • Observability: Prometheus /metrics, /healthz, SIEM export of audit records, optional Redis caching, webhooks with HMAC verification.

API modes

Set UNIFI_API_TYPE to choose how the server reaches UniFi.

Mode

What it reaches

Use it for

local (recommended)

Your UniFi console or gateway on the LAN (UNIFI_LOCAL_HOST)

Everything: device and client control, configuration, firewall, Protect

cloud-ea

UniFi's Early Access cloud API

Sites and aggregate statistics; no per-device control or configuration

cloud-v1

UniFi's stable v1 cloud API

Sites and aggregate statistics; no per-device control or configuration

The cloud tools (Site Manager, Mobility, InnerSpace, Carrier Fabric) call api.ui.com and are registered in every mode. Set UNIFI_SITE_MANAGER_ENABLED=true to use Site Manager tools; actual exposure also depends on the selected profile. The existing Site Manager SD-WAN config list/detail/status reads use the official v1.0.0 /v1/sd-wan-configs paths after the 2026-11-08 reconciliation; this does not implement typed destination/performance steering policies, policy writes, or prove live account interoperability (see API.md and the gap reconciliation).

Site Manager health summaries use the documented /v1/sites statistics and /v1/isp-metrics/5m records. These report available values without running a speed test. The statistics fields can differ by UniFi Network version; unavailable values appear as null or unknown. The inferred site status describes device availability; reported internet issue entries appear separately because they do not by themselves prove a current fault (see API.md). That data mapping has been checked read-only against one Site Manager account; the added edge cases use mocked responses, and version-wide live compatibility has not been verified.

Zone-based firewall tools need UniFi Network 9.0 or later. Some documented UniFi endpoints do not exist on every firmware version; see docs/UNIFI_API.md.

The Matter and Thread reads need UniFi Network 11 or later. No published UniFi contract exposes a Matter or Thread path, so these tools are built against routes derived from the vendor's own Network 11.0.97 application package and verified only as far as a Network 10.6 controller allows: both routes answer 404 there, while a control route in the same API family answers 200 with the same API key, which establishes route absence rather than an auth refusal. A successful Matter or Thread read has not been observed, so the tools are implemented-needs-verification and report supported: false on a controller without the routes. A node's Matter pairing code is never returned. See the discovery record.

UniFi Network 11 / UniFi OS 6: compatible per released documentation, with four items pending live-controller verification — not yet a claim of full support. USG gateways and the classic, self-hosted Network Application Server are removed platform targets; fleet_health automatically flags any registered controller with a USG in its device inventory, but there is no API signal to auto-detect a classic Network Application Server, so label that controller instead (e.g. deployment=classic-server) and filter on it. Network 11 replaces the statistics engine and resets historical data, so the statistics tools (get_historical_stats, get_speed_test_history, get_dpi_statistics, list_top_applications, get_client_dpi) attach a statistics_note to every empty response — an empty history right after the upgrade is expected, not an outage. get_historical_stats can read site-level series from the new MODERN engine with source="auto" or source="modern" (the legacy archive stays the default); that path is mock-tested only and has not been observed on a Network 11 controller. See docs/NETWORK_11_COMPATIBILITY.md for the full compatibility matrix.

Quick start

1. Get an API key

  1. Sign in to UniFi Site Manager.

  2. Go to Settings → Control Plane → Integrations and choose Create API Key.

  3. Copy the key. It is shown only once.

2. Install

pip install unifi-mcp-server          # or: uv tool install unifi-mcp-server
# Fleet mode extras (Postgres, Redis):
pip install 'unifi-mcp-server[fleet]'

Or use the container image (amd64, arm64 and arm/v7; the -fleet variant for amd64 and arm64):

docker pull ghcr.io/enuno/unifi-mcp-server:latest

3. Add it to your MCP client

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows), Cursor (mcp.json, from View: Open MCP Settings) and most other MCP clients take the same mcpServers block:

{
  "mcpServers": {
    "unifi": {
      "command": "uvx",
      "args": ["unifi-mcp-server"],
      "env": {
        "UNIFI_API_KEY": "<your-api-key>",
        "UNIFI_API_TYPE": "local",
        "UNIFI_LOCAL_HOST": "192.168.2.1"
      }
    }
  }
}

If you installed with pip, use "command": "unifi-mcp-server" and drop args. To run the container instead:

{
  "mcpServers": {
    "unifi": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "UNIFI_API_KEY=your-api-key-here",
        "-e", "UNIFI_API_TYPE=local",
        "-e", "UNIFI_LOCAL_HOST=192.168.2.1",
        "ghcr.io/enuno/unifi-mcp-server:latest"
      ]
    }
  }
}

Keep -i and do not add -d: the client talks to the server over the container's stdin and stdout.

4. Main settings

Variable

Purpose

Default

UNIFI_API_KEY

UniFi API key (required)

—

UNIFI_API_TYPE

local, cloud-ea or cloud-v1

cloud-ea

UNIFI_LOCAL_HOST / UNIFI_LOCAL_PORT

Console address in local mode. The port depends on the deployment: 443 for a UniFi OS appliance, 11443 for UniFi OS Server 5.1.15+, 8443 for a legacy Network Application Server (whose support is unverified — see API.md, "Which console port to point at")

— / 443

UNIFI_LOCAL_VERIFY_SSL

Verify the console's TLS certificate. false logs a warning at startup

true

UNIFI_LOCAL_CA_FILE

CA certificate (PEM) for a self-signed console, instead of turning verification off. Can be the console's own certificate

—

UNIFI_LOCAL_TLS_SERVER_NAME

Name the console's certificate is checked against, when it is not UNIFI_LOCAL_HOST: unifi.local for UniFi OS's own certificate

—

UNIFI_DEFAULT_SITE

Site used when a tool call names none

default

UNIFI_SITE_MANAGER_ENABLED

Enable the cloud tools (Site Manager, Mobility, InnerSpace, Carrier)

false

UNIFI_PROFILE

Register only one group of tools (profiles)

all

UNIFI_READ_ONLY / UNIFI_DRY_RUN

Read-only or preview-only server

false

DEBUG

Registers debug_api_request (raw GET/DELETE, destructive tier, removed by read-only). Leave unset in production

unset

MCP_SERVER_TRANSPORT

stdio, streamable_http, http or sse

stdio

MCP_AUTH_TOKEN

Bearer token, required on network transports; viewer:<token> (or operator:, admin:) limits a token's role

—

REDIS_URL

Optional response cache

—

WEBHOOK_SECRET

HMAC secret for incoming UniFi webhooks

—

DATABASE_URL

Turns on fleet mode (Postgres)

—

.env.example lists every setting with comments, including audit logging, SIEM export, metrics, Supermemory and agnost.ai.

Plugins

The repository is a Claude Code plugin and a self-hosted Claude marketplace. The plugin ships the MCP server over stdio and the operator skills.

/plugin marketplace add enuno/unifi-mcp-server
/plugin install unifi-mcp-server --marketplace enuno/unifi-mcp-server

The plugin starts the server read-only and with a small tool profile. Set UNIFI_API_KEY in your environment before installing; the plugin never stores a credential. To let the agent change controller state, set UNIFI_READ_ONLY=false and widen UNIFI_PROFILE.

UNIFI_PROFILE defaults to minimal, which registers the site, client and device tools. An unset variable does not select every tool; set UNIFI_PROFILE=all for the full surface.

ChatGPT and Codex get a skills-only package, because the skills are the portable part and this project has no hosted MCP endpoint to point ChatGPT at. See docs/PLUGINS.md for the full install and publish steps, docs/CHATGPT_CONNECTOR.md for the ChatGPT connector, and docs/GROK.md for the Grok connector.

Agent skills

The skills/ directory contains 16 installable agent skills. Each is a Markdown SKILL.md that an AI agent loads when relevant: operator skills guide safe use of a running server; developer skills give repository-specific implementation procedures. The summaries below describe when to use each skill and its main workflow. Follow the linked SKILL.md for complete tool references, prerequisites, examples, safety gates, and troubleshooting guidance.

Using the server (operator skills)

Skill

When to use it and what it covers

unifi-network

Inspect and manage connected clients, networks/VLANs, WiFi/SSIDs, DHCP reservations, DNS filters, WAN connections, and guest vouchers.

unifi-devices

Inventory, adopt, diagnose, restart, or upgrade UniFi hardware; configure radios, port profiles, switching, stacks, and topology.

unifi-security

Review or manage firewall rules/groups, zone-based firewall, ACLs, port forwarding, VPNs, and content filtering; observe local-mode and firmware requirements.

unifi-system

Administer sites and backups; investigate QoS/routes, traffic flows, DPI, RADIUS, guest portal, and traffic matching lists.

unifi-protect

Work with cameras, NVRs, alarms, sensors, chimes, sirens, lights, viewers, events, and Protect configuration, with privacy and safety considerations.

unifi-fleet-operations

Operate multiple controllers through one server: select the target controller, route calls, inspect fleet health, manage registry entries, and understand fan-out limits.

unifi-channel-planning

Turn AP and neighbor observations into a low-interference channel plan, including planning constraints, scoring, validation, and safe rollout.

unifi-discovery

Check what a server exposes, its health and profile, then choose the appropriate local, cloud, or fleet backend before using tools.

unifi-safe-changes

Gate state changes with confirm, dry_run, read-only mode, risk awareness, rollback planning, and audit checks. Use when a mutation is proposed or a call is refused.

unifi-mcp-setup

Set up or configure the server: installation, environment variables, API-mode capability matrix, profiles, and example prompts.

Changing this codebase (developer skills)

Skill

When to use it and what it covers

unifi-mcp-tool-builder

Add an MCP tool end to end: research the API, design models and function behavior, register it, write tests, and update documentation.

unifi-network-config-tools

Implement or test Network configuration tools, including endpoint URL spaces, site-ID translation, read-modify-write behavior, caching, and firmware-specific cases.

unifi-security-tools

Implement or test security tools across firewall, ZBF, ACL, port forwarding, traffic matching, RADIUS, and related areas; covers endpoint/ID mapping and risk tiers.

unifi-protect-tools

Implement or test Protect modules, HTTP/WebSocket paths, v7 models, response shapes, and the confirmed/dry-run write pattern.

unifi-cloud-fleet-tools

Implement or test Site Manager, connector, integration API, Mobility, InnerSpace, Carrier Fabric, and fleet routing/authentication.

unifi-docs-sync

Keep the live tool registry, A2A card, native prompt catalog, API reference, skills, and generated artifacts aligned; includes the drift-test workflow.

Install

Claude Code loads skills from ~/.claude/skills/<name>/SKILL.md (every session) or <project>/.claude/skills/<name>/SKILL.md (one project). Copy the folders you want:

git clone https://github.com/enuno/unifi-mcp-server.git
cd unifi-mcp-server
mkdir -p ~/.claude/skills

# All operator skills
cp -r skills/unifi-network skills/unifi-devices skills/unifi-security \
      skills/unifi-system skills/unifi-protect skills/unifi-fleet-operations \
      skills/unifi-channel-planning skills/unifi-discovery \
      skills/unifi-safe-changes skills/unifi-mcp-setup ~/.claude/skills/

# Or one skill
cp -r skills/unifi-security ~/.claude/skills/

# The one-file overview of the whole server
cp -r skills/unifi-mcp-setup ~/.claude/skills/

Note: npx skills (and similar package-skill installers) only install a SKILL.md at the repository root, not the folders under skills/. Install individual skills with the cp -r skills/<name> commands above instead of relying on a root-level skill file.

Other agents that read the same SKILL.md format take the same folders; copy them into that agent's skills directory (Codex, for example, reads .agents/skills/). To update, pull and copy again. Inside this repository the developer skills are already installed for Claude Code (.claude/skills/) and Codex (.agents/skills/).

Use

You don't invoke a skill yourself. The agent reads each skill's description and loads the one that matches your request, then calls the MCP tools it describes, so the MCP server must also be configured in the same client. For example:

  • "Which clients are on the guest VLAN right now?" loads unifi-network.

  • "Audit the zone-based firewall for anything that allows WAN to LAN." loads unifi-security.

  • "Which APs share a 5 GHz channel with a neighbor? Propose a channel plan." loads unifi-channel-planning.

  • "Which controller should I target, and what tools does this server expose?" loads unifi-discovery.

  • "Plan maintenance across APs managed by two controllers." loads unifi-fleet-operations.

  • "Preview a VLAN change and explain how to roll it back." loads unifi-safe-changes.

If the agent doesn't pick a skill up, name it ("use the unifi-security skill"). Pair a skill with the matching UNIFI_PROFILE to keep the tool list small too. docs/SKILLS.md has additional guidance on skill installation and profiles.

Tool profiles and safety controls

Profiles. UNIFI_PROFILE registers only one group of modules, so the client sees fewer tool definitions:

Profile

Tools

Covers

network

48

Clients, networks, WiFi, DHCP, DNS, WAN, vouchers, channel planning

devices

53

Devices, control, migration, ports, switching, topology, diagnostics

security

47

Firewall, ZBF, ACLs, port forwarding, VPN, content filtering

system

182

Sites, backups, events, DPI, QoS, RADIUS, traffic flows, Protect, cloud

protect

75

The Protect modules

mobility / innerspace / carrier

12 / 10 / 15

One cloud API each

minimal

19

Sites, clients, devices

Counts include the four fleet tools every profile gets. An unknown profile logs a warning and loads everything.

Safety controls.

  • Every mutating tool requires confirm=True, and dry_run=True returns the change it would make without making it.

  • UNIFI_READ_ONLY=true leaves mutating tools out of the tool list entirely. UNIFI_DRY_RUN=true forces every mutating call into preview mode.

  • DEBUG=true adds debug_api_request, a raw GET or DELETE to any controller endpoint. It is a destructive-tier tool, a DELETE needs confirm=True, and read-only mode removes it. Leave DEBUG unset in production.

  • With tokens, each tool has a risk tier (read, write, destructive) and each role a set of tiers: viewer reads, operator writes, and admin can also run destructive tools, including deletes, restores, restarts, client blocking and firewall policy changes. See API.md.

  • Mutations are written to a hash-chained JSON-lines audit log (Postgres in fleet mode), with optional field encryption and SIEM export. See SECURITY.md.

  • Inputs are validated with Pydantic, and credentials are redacted from logs.

Network transports and deployment

stdio is the default and needs no port. To serve MCP over the network, use Streamable HTTP:

export MCP_SERVER_TRANSPORT=streamable_http
export MCP_SERVER_PORT=3000
export MCP_AUTH_TOKEN=$(openssl rand -hex 32)   # required on every network transport
unifi-mcp-server
# Listening on 127.0.0.1:3000; clients send Authorization: Bearer $MCP_AUTH_TOKEN

Clients and MCP gateways then connect to http://<host>:3000/mcp. The server binds to 127.0.0.1 unless you set MCP_SERVER_HOST; put an authenticating TLS proxy in front before exposing it further. http also works. sse is deprecated: client proxies such as mcp-remote can race its initialize handshake (#96).

Container, with the published port on loopback:

services:
  unifi-mcp:
    image: ghcr.io/enuno/unifi-mcp-server:latest
    environment:
      UNIFI_API_KEY: your-api-key
      UNIFI_API_TYPE: local
      UNIFI_LOCAL_HOST: 192.168.2.1
      MCP_SERVER_TRANSPORT: streamable_http
      MCP_SERVER_PORT: 3000
      MCP_SERVER_HOST: 0.0.0.0          # inside the container only
      MCP_AUTH_TOKEN: ${MCP_AUTH_TOKEN}
    ports:
      - "127.0.0.1:3000:3000"

The repository's docker-compose.yml adds Redis and the MCP Toolbox dashboard (MCP_TOOLBOX.md); copy .env.docker.example to .env and run make compose-up. That example starts read-only (UNIFI_READ_ONLY=true) with a viewer stdio caller (UNIFI_STDIO_ROLE=viewer); to allow changes, set UNIFI_READ_ONLY=false and raise UNIFI_STDIO_ROLE to operator, or admin for destructive changes.

  • Ansible: deploy/ansible/ deploys the server alone, a single-host fleet (server, worker, Redis, Postgres), or replicas behind nginx on several hosts. To have an AI agent run the deployment, start from a prompt in docs/deploy-prompts/.

  • Kubernetes: deploy/helm/unifi-mcp/ is a Helm chart for the server alone or in fleet mode with workers, taking every credential from an existing Secret.

  • Local dev deployment (either method): make helm-deploy-local or make ansible-dev-deploy build the current working tree — including uncommitted changes — tag it local-<short-sha>[-dirty], and deploy it for real, instead of pulling or building from a published release. See the "Deploying from a local checkout" / "Local dev deployment" sections in the two overview docs above.

Calling the server from code

Any MCP client library works. With the FastMCP client:

import asyncio

from fastmcp import Client

config = {
    "mcpServers": {
        "unifi": {
            "command": "unifi-mcp-server",
            "env": {
                "UNIFI_API_KEY": "<your-api-key>",
                "UNIFI_API_TYPE": "local",
                "UNIFI_LOCAL_HOST": "192.168.2.1",
            },
        }
    }
}


async def main() -> None:
    async with Client(config) as client:
        sites = await client.call_tool("list_sites", {})
        print(sites.data)

        clients = await client.call_tool("list_active_clients", {"site_id": "default"})
        print(clients.data)

        # Mutations need confirm=True; dry_run=True previews the change.
        preview = await client.call_tool(
            "create_firewall_zone",
            {"site_id": "default", "name": "IoT", "confirm": True, "dry_run": True},
        )
        print(preview.data)


asyncio.run(main())

bin/unifi-cli runs a single tool from a shell (unifi-cli list-clients --site default); see docs/SKILLS.md.

Native MCP prompts

Besides the tools, the server exposes eight parameterised UniFi operational workflows through the standard MCP prompts interface. A client discovers them with prompts/list and retrieves a rendered workflow brief with prompts/get.

import asyncio

from fastmcp import Client

config = {
    "mcpServers": {
        "unifi": {
            "command": "unifi-mcp-server",
            "env": {
                "UNIFI_API_KEY": "<your-api-key>",
                "UNIFI_API_TYPE": "local",
                "UNIFI_LOCAL_HOST": "192.168.2.1",
            },
        }
    }
}


async def main() -> None:
    async with Client(config) as client:
        for prompt in await client.list_prompts():
            print(prompt.name, prompt.description)

        result = await client.get_prompt(
            "network_health_check",
            {"site_id": "default", "focus": "wan"},
        )
        for message in result.messages:
            print(message.content.text)


asyncio.run(main())

The prompts are network_health_check, troubleshoot_client_connectivity, troubleshoot_wifi_performance, investigate_device, review_firewall_policy, plan_network_change, protect_health_check and fleet_health_summary. A workflow is advertised only when the tools it needs are registered on this server, so the prompt list follows the API mode, the profile and the read-only and dry-run settings.

Retrieving a prompt does not run the workflow and grants no approval. The rendered text tells an agent which read tools to call and what to report; the agent calls the tools itself, and the server's role checks, confirm gate and audit trail still apply.

Use make inspect to open the MCP Inspector and browse the prompts, or the MCPJungle CLI to check what the gateway forwards:

mcpjungle list prompts --server unifi
mcpjungle get prompt unifi__network_health_check --arg site_id=default

A tools-only client will not display the prompts; that is a client limitation. There is no prompts-as-tools shim.

See docs/PROMPTS.md for the full catalog, the availability matrix, the validation rules and the manual acceptance steps.

Documentation

Document

Contents

API.md

Every MCP tool and resource, with parameters and examples

docs/PROMPTS.md

The native MCP prompt catalog, with arguments and availability rules

A2A.md

The agent card, the capability manifest and the delegation endpoint

docs/AUDIT_A2A_SKILLS.md

The A2A and skills audit: what was implemented, what was not, and why

docs/SKILLS.md

Agent skills, profiles and the CLI wrapper

docs/UNIFI_API.md

The UniFi endpoints behind the tools

MULTI_CONTROLLER.md

Fleet mode: controllers, tokens and roles

METRICS.md, WEBHOOK_SETUP.md, A2A.md

Metrics, webhooks, the A2A agent endpoints

NETWORK_PLAYBOOK.md, HARBOR_SETUP.md

Operating runbooks

SECURITY.md

Reporting vulnerabilities, audit logging and hardening

SPEC.md, DEVELOPMENT_PLAN.md, ROADMAP.md

Architecture target and roadmap

docs/research/

Endpoint discovery records and negative findings: what was probed, what was observed live, and what remains unverified

CHANGELOG.md, docs/RELEASE_PROCESS.md

Release history and how releases are cut and published

Development

git clone https://github.com/enuno/unifi-mcp-server.git
cd unifi-mcp-server
make install    # uv sync from uv.lock with the dev extra (no activation needed)
make hooks      # pre-commit and commit-msg hooks
cp .env.example .env   # then set UNIFI_API_KEY and, for local mode, UNIFI_LOCAL_HOST

make test       # unit tests
make ci         # every blocking CI check: lint, typecheck, security, docs coverage, tests with the 80% gate
make inspect    # open the server in the MCP Inspector (needs Node.js)
make help       # list every target

Without make, the same commands run through uv run --locked, for example uv run --locked pytest tests/unit/ -m "not integration". Integration tests (-m integration) need real UniFi hardware.

Layout: src/main.py builds the server, src/tools/ holds the tool modules, src/api/ the UniFi clients, src/models/ the Pydantic models, src/fleet/ the fleet stack, and tests/unit/ the unit tests. AGENTS.md and CLAUDE.md describe the conventions in detail, and commands.md lists the development commands.

Contributing

Contributions from people and AI coding agents are welcome. See CONTRIBUTING.md and AGENTS.md.

  1. Fork the repository and create a branch.

  2. Write tests first, keep new code at 80% coverage or better, and run make ci.

  3. Use conventional commit messages (feat: ..., fix: ...) and open a pull request.

Issues with [Bug] in the title opened by a maintainer or collaborator get an automated first analysis; other reports are triaged by hand (details).

Permissions and data handling

The server runs on your machine and talks to your controller. It does not relay your traffic to a third party.

What leaves your controller. The server sends API requests to the controller you configured, and only to that controller: the UniFi console in local mode, or api.ui.com in cloud mode. It reads and writes through the official UniFi API. Nothing about your network is sent to the server's authors, because the authors run no server: the plugin runs uvx unifi-mcp-server, which installs the published package and starts it on your machine.

What the plugin does not do. The plugin carries no credential. .mcp.json refers to ${UNIFI_API_KEY}, and Claude Code expands it from your own environment. The plugin stores no data, keeps no history and runs no background job.

Telemetry is off by default. The server can optionally report performance data to agnost.ai, but only when you set both AGNOST_ENABLED=true and AGNOST_ORG_ID. Without those two variables the tracking code is never reached. If you do enable it, it sends the prompt and the response to api.agnost.ai, so leave it off unless you want that.

Audit records stay on your machine. Mutating calls are written to a hash-chained audit log. The path defaults to audit.log in the working directory; set UNIFI_AUDIT_LOG_PATH to an absolute path to control it. Audit records can be forwarded to a SIEM you name in UNIFI_AUDIT_SIEM_TARGETS, which is off unless you set it.

What a write costs. Every mutating tool requires confirm=True, and most support dry_run=True. UNIFI_READ_ONLY=true, which the plugin sets by default, does not register any mutating tool at all, so a read-only session cannot change your network. UNIFI_DRY_RUN=true turns every change into a preview. The 53 tools the server classifies as destructive, including the firewall, device and network changes, are off in both of those modes.

Security

Report vulnerabilities as described in SECURITY.md. Never commit credentials.

Acknowledgments

License

Apache License 2.0. See LICENSE.

Star History Chart

Available Tools

71 tools
assign_carrier_subscriber_planC

Assign a service plan to a UniFi Carrier Fabric subscriber.

Inputs: plan_id (required), subscriber_id (required), confirm, dry_run, +1 more. Returns: object

attach_carrier_subscriber_hostC

Attach a gateway host to a UniFi Carrier Fabric subscriber.

Inputs: host_id (required), subscriber_id (required), confirm, dry_run, +1 more. Returns: object

compare_site_performanceA

Compare performance metrics across all sites.

Combines reported WAN uptime and ISP metrics with device availability. Issue entries are reported separately and may not be active now.

Inputs: controller. Returns: object

connector_network_deleteC

Proxy a DELETE request to the Network Application via Cloud Connector.

Inputs: path (required), console_id (required), confirm, dry_run, +1 more. Returns: result

connector_network_getA

Proxy a GET request to the Network Application via Cloud Connector.

Forwards the request to https://api.ui.com/v1/connector/consoles/{console_id}/proxy/network/{path} and returns the raw response.

Inputs: path (required), console_id (required), params, controller. Returns: result

connector_network_patchC

Proxy a PATCH request to the Network Application via Cloud Connector.

Inputs: path (required), console_id (required), body, confirm, +2 more. Returns: result

connector_network_postC

Proxy a POST request to the Network Application via Cloud Connector.

Inputs: path (required), console_id (required), body, confirm, +2 more. Returns: result

connector_network_putC

Proxy a PUT request to the Network Application via Cloud Connector.

Inputs: path (required), console_id (required), body, confirm, +2 more. Returns: result

connector_protect_deleteC

Proxy a DELETE request to the Protect Application via Cloud Connector.

Inputs: path (required), console_id (required), confirm, dry_run, +1 more. Returns: result

connector_protect_getA

Proxy a GET request to the Protect Application via Cloud Connector.

Forwards the request to https://api.ui.com/v1/connector/consoles/{console_id}/proxy/protect/{path} and returns the raw response.

Inputs: path (required), console_id (required), params, controller. Returns: result

connector_protect_patchC

Proxy a PATCH request to the Protect Application via Cloud Connector.

Inputs: path (required), console_id (required), body, confirm, +2 more. Returns: result

connector_protect_postC

Proxy a POST request to the Protect Application via Cloud Connector.

Inputs: path (required), console_id (required), body, confirm, +2 more. Returns: result

connector_protect_putC

Proxy a PUT request to the Protect Application via Cloud Connector.

Inputs: path (required), console_id (required), body, confirm, +2 more. Returns: result

create_carrier_subscriberC

Create a UniFi Carrier Fabric subscriber.

Inputs: subscriber_number (required), name, email, notes, +7 more. Returns: object

detach_carrier_subscriber_hostC

Detach the gateway host from a UniFi Carrier Fabric subscriber.

Inputs: subscriber_id (required), confirm, dry_run, controller. Returns: object

download_innerspace_assetC

Download an asset (e.g. floor plan image) from InnerSpace.

Inputs: plan_id (required), filename (required), console_id (required), controller. Returns: object

get_active_controllerA

Show which controller a tool call without controller would target.

Returns: The controller name and where it came from: session (select_controller) or default; both are None when neither is set

Inputs: no named parameters. Returns: object

get_carrier_service_planB

Get a UniFi Carrier Fabric service plan by ID.

Inputs: plan_id (required), controller. Returns: object

get_carrier_subscriberC

Get a UniFi Carrier Fabric subscriber by ID.

Inputs: subscriber_id (required), controller. Returns: object

get_cross_site_statisticsC

Get aggregate statistics across multiple sites.

Inputs: controller. Returns: object

get_hostC

Get host details by ID.

Inputs: host_id (required), controller. Returns: object

get_innerspace_projectC

Get the InnerSpace project data for the integration on a console.

Inputs: console_id (required), controller. Returns: object

get_integration_clientC

Get a single connected client via the integration API.

Inputs: site_id (required), client_id (required), controller. Returns: object

get_integration_deviceC

Get a single adopted device via the integration API.

Inputs: site_id (required), device_id (required), controller. Returns: object

get_integration_dns_policyB

Get a single DNS policy via the integration API.

Inputs: site_id (required), policy_id (required), controller. Returns: object

get_integration_wifi_broadcastC

Get a single WiFi broadcast via the integration API.

Inputs: site_id (required), broadcast_id (required), controller. Returns: object

get_internet_healthC

Get internet health metrics across sites.

Inputs: site_id, controller. Returns: result

get_isp_metricsC

Get ISP metrics for a specific site.

Inputs: site_id (required), controller. Returns: object

get_mobility_deviceC

Get detail for a UniFi Mobility device.

Inputs: device_id (required), workspace_id (required), controller. Returns: object

get_sdwan_configC

Get SD-WAN configuration by ID.

Inputs: config_id (required), controller. Returns: object

get_sdwan_config_statusC

Get SD-WAN configuration deployment status.

Inputs: config_id (required), controller. Returns: object

get_site_detailsC

Get detailed site information.

Inputs: site_id (required), controller. Returns: object

get_site_health_summaryB

Get device availability and reported site statistics.

Status reflects online device counts only. Reported internet issue entries do not establish that an issue is active now.

Inputs: site_id, controller. Returns: result

get_site_inventoryB

Get comprehensive inventory for a site or all sites.

Provides detailed breakdown of resources including devices, clients, networks, SSIDs, VPN tunnels, and firewall rules.

Inputs: site_id, controller. Returns: result

get_version_controlC

Get API version control information.

Inputs: controller. Returns: object

health_checkA

Health check endpoint to verify server is running.

Returns: Status information

Inputs: no named parameters. Returns: object

list_all_sites_aggregatedC

List all sites with aggregated stats from Site Manager API.

Inputs: controller. Returns: result

list_carrier_service_plansB

List UniFi Carrier Fabric service plans.

Inputs: controller. Returns: object

list_carrier_subscribersB

List UniFi Carrier Fabric subscribers.

Inputs: limit, offset, plan_id, suspended, +1 more. Returns: object

list_controllersA

List the UniFi controllers this server can reach.

Every controller-bound tool accepts a controller argument naming one of these; without it, calls go to the controller chosen with select_controller, then to the default.

Returns: Controllers (name, API type, host, default site, labels), the default controller, and this session's selection

Inputs: no named parameters. Returns: object

list_dpi_application_categoriesA

List DPI application categories via the integration API.

This endpoint is global (not site-scoped) and returns the canonical list of application categories used by DPI and traffic-routing features.

Inputs: limit, offset, controller. Returns: object

list_hostsC

List all managed hosts/consoles.

Inputs: limit, offset, controller. Returns: result

list_innerspace_access_pointsB

List access points known to InnerSpace on a console.

Inputs: console_id (required), controller. Returns: object

list_innerspace_floor_plansB

List InnerSpace floor plans on a console.

Inputs: console_id (required), controller. Returns: object

list_innerspace_inventoryB

List unplaced devices in InnerSpace inventory on a console.

Inputs: console_id (required), controller. Returns: object

list_innerspace_switchesC

List switches placed on InnerSpace floor plans on a console.

Inputs: console_id (required), site_id, controller. Returns: object

list_integration_clientsC

List connected clients via the integration API.

Inputs: site_id (required), limit, offset, controller. Returns: object

list_integration_devicesC

List adopted devices via the integration API.

Inputs: site_id (required), limit, offset, controller. Returns: object

list_integration_device_tagsC

List device tags via the integration API.

Inputs: site_id (required), limit, offset, controller. Returns: object

list_integration_dns_policiesB

List DNS policies via the integration API.

Inputs: site_id (required), limit, offset, controller. Returns: object

list_integration_networksC

List networks via the integration API.

Inputs: site_id (required), limit, offset, controller. Returns: object

list_integration_sitesA

List sites via the integration API.

Returns UUID-based site identifiers suitable for use with other integration API tools in this module.

Inputs: limit, offset, controller. Returns: object

list_integration_vpn_serversC

List VPN servers via the integration API.

Inputs: site_id (required), limit, offset, controller. Returns: object

list_integration_wansC

List WAN connections via the integration API.

Inputs: site_id (required), limit, offset, controller. Returns: object

list_integration_wifi_broadcastsC

List WiFi broadcasts (SSIDs) via the integration API.

Inputs: site_id (required), limit, offset, controller. Returns: object

list_mobility_device_clientsC

List clients attached to a UniFi Mobility device.

Inputs: device_id (required), workspace_id (required), limit, offset, +1 more. Returns: object

list_mobility_devicesC

List devices in a UniFi Mobility workspace.

Inputs: workspace_id (required), limit, offset, controller. Returns: object

list_mobility_workspace_adminsC

List admins of a UniFi Mobility workspace.

Inputs: workspace_id (required), controller. Returns: object

list_mobility_workspacesB

List UniFi Mobility workspaces.

Inputs: controller. Returns: object

list_sdwan_configsC

List all SD-WAN configurations.

Inputs: controller. Returns: result

list_sitesC

List all accessible sites.

Inputs: limit, offset, controller. Returns: result

list_vantage_pointsC

List all Vantage Points.

Inputs: controller. Returns: result

query_isp_metricsC

Query ISP metrics with optional filters.

Inputs: site_id, end_time, controller, start_time. Returns: result

resume_carrier_subscriberB

Resume a suspended UniFi Carrier Fabric subscriber.

Inputs: subscriber_id (required), confirm, dry_run, controller. Returns: object

search_across_sitesB

Search for resources across all sites.

Search for devices, clients, or networks across all managed sites. Useful for locating resources in multi-site deployments.

Inputs: query (required), controller, search_type. Returns: object

select_controllerA

Choose the controller this session's later tool calls target.

A tool call's own controller argument still takes precedence.

Inputs: name (required). Returns: object

suspend_carrier_subscriberC

Suspend a UniFi Carrier Fabric subscriber.

Inputs: subscriber_id (required), reason, confirm, dry_run, +1 more. Returns: object

update_carrier_subscriberA

Update a UniFi Carrier Fabric subscriber.

Only provided fields are sent to the API. Spec semantics: an absent field leaves it unchanged, while an explicit null clears the field. This tool only sends provided fields, so use plan_id="" style clearing via direct API if ever needed.

Inputs: subscriber_id (required), name, email, notes, +7 more. Returns: object

update_mobility_deviceC

Rename a UniFi Mobility device.

Inputs: name (required), device_id (required), workspace_id (required), confirm, +2 more. Returns: object

update_mobility_device_networkC

Update LAN / DHCP settings on a UniFi Mobility device.

Inputs: device_id (required), workspace_id (required), confirm, dry_run, +6 more. Returns: object

update_mobility_device_wirelessC

Update WiFi settings on a UniFi Mobility device.

Inputs: ssid (required), password (required), device_id (required), workspace_id (required), +3 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 71 tools

    Disambiguation2/5

    Several tools have overlapping, hard-to-distinguish purposes: list_sites / list_integration_sites / list_all_sites_aggregated, and get_site_health_summary / get_internet_health / compare_site_performance / get_cross_site_statistics all sound like 'get site status.' The distinction between 'integration API' tools, Site Manager tools, and InnerSpace/Mobility/Carrier tools is an implementation detail an agent cannot reliably map to intent, and the ten generic connector_{network,protect}_{get,post,put,patch,delete} proxies are near-indistinguishable without knowing the raw API paths.

    Naming Consistency3/5

    The dominant verb_noun snake_case pattern is readable, but it is broken by noun_verb connector_*_get/post/put/patch/delete tools and by service-prefixed names (carrier_*, innerspace_*, mobility_*) that use different orderings and verbs. The 'integration' marker also floats inconsistently as list_integration_devices vs get_integration_wifi_broadcast vs list_sites, making the naming scheme only partially predictable.

    Tool Count2/5

    71 tools is far above a comfortable agent-facing surface and includes large families of near-duplicate operations (site listing variants, health/metric variants, ten raw proxy endpoints). While the UniFi domain is genuinely broad, the set is oversized and would benefit from consolidation or namespacing rather than exposing every API endpoint.

    Completeness4/5

    Coverage across sites, devices, clients, networks, SSIDs, DNS policies, VPN, SD-WAN, DPI, ISP metrics, Mobility, Carrier Fabric, and InnerSpace is extensive, and write operations are reachable through the connector proxy tools. Minor gaps exist (no first-class firewall-rule or event/alarm modeling, Protect only via raw proxy), but core workflows are achievable.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      D
      quality
      D
      maintenance
      Enables comprehensive management of UniFi network infrastructure through the UniFi Cloud API, including device control, client management, camera settings, and access door control through natural language.
      39
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to manage UniFi network infrastructure through 50+ tools covering devices, clients, networks, WiFi, firewall rules, and guest access using the official UniFi Network API.
      52
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage UniFi Network, Protect, and Access infrastructure through MCP tools, with support for local controllers and cloud relay.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents and applications to interact with UniFi network infrastructure through the UniFi Network Controller API, supporting device, client, network, firewall, QoS, backup, multi-site, and topology management.
      Apache 2.0