Skip to main content
Glama

UniFi Fabric MCP Server connects your AI assistant to your UniFi network. Find offline devices, dig into Wi-Fi problems, review cameras, or change settings just by asking.

It works through UniFi Fabrics, which put your sites and companies under one organization in UniFi Site Manager. Join your consoles to a fabric, create a fabric API key, and you're set. One key covers the whole organization, and the server runs on your own computer or server. Everything goes through Ubiquiti's cloud, so it never needs to reach a controller on your local network.

What you can do

Ask your assistant to help with tasks such as:

  • “List my UniFi sites and the devices in each one.”

  • “Which devices are offline, and what should I investigate?”

  • “Show me the recent events from my Protect cameras.”

  • “Show me the floor plans in my InnerSpace project.”

You can also manage networks, Wi-Fi and firewall policies. See tool usage and the tools reference for details.

Related MCP server: UniFi MCP Server

Features

  • 798 tools, loaded on demand. Discovery mode gives your assistant a small search-and-call toolset instead of flooding its context with the whole catalog; the full catalog is one setting away.

  • Deep Network and Protect coverage, plus InnerSpace. Networks, Wi-Fi, VPN, firewall, clients, devices, cameras and floor plans; see tool families for what is and is not covered.

  • Protect events and snapshots as MCP resources. Clients that browse resources can read recent events, an event summary, a camera index and JPEG snapshots per console. See Protect MCP resources.

  • Multi-site and multi-organization. One fabric key covers every site in the organization, and you can configure several keys to manage many organizations from one server. See the MSP guide.

  • Ready for shared deployments. Run it over HTTPS behind a gateway: request headers can carry each caller's own API keys (the server stores none) and tighten write policy or tool families per request, so one server can safely serve many users. See header key mode.

  • Write controls. allow, dry-run or deny globally, with per-family and per-tool exceptions.

  • Everything is a switch. Expose only the tool families you want, hide individual tools, run discovery mode or advertise the full catalog, and opt into redaction and audit logging; all of it is environment settings, no code changes. See the configuration guide.

  • Secret redaction and audit logging. Mask credential fields in responses and log every write attempt, optionally with a tamper-evident hash chain that unifi-fabric-audit-verify checks. See the configuration guide.

  • Optional trace export. Send request spans to your own OpenTelemetry collector over OTLP, with an allowlist of safe attributes. See trace export.

  • Any MCP client, any transport. stdio locally; HTTPS and SSE for servers, with bearer-token or OAuth authentication and TLS served by the server itself (bring your own certificate), up to mutual TLS. See authentication and TLS.

Installation

1. Join your fabric and create an API key

  1. Sign in to UniFi Site Manager. In the Sites sidebar under Fabrics, create a fabric (Create New) if you don't have one, and make sure the sites with your consoles are in it. New to fabrics? See Ubiquiti's video and announcement.

  2. Select your fabric, then open API Keys and select Create New API Key.

  3. Enable at least Site Manager and Network scopes; add Protect for cameras. Choose the sites the key can access.

  4. Copy the key and store it securely. It is shown only once.

Treat the key like a password: each client stores it in plain text in its own configuration file, so keep those files private.

2. Connect your assistant

NOTE

The package commands below use the currently published 0.7.2 release. This README describes 0.7.2 source. Upgrading from an earlier release? See themigration guides before changing settings.

The setups below run the server with uvx (from uv), which fetches everything it needs — no Python setup required. Prefer pip? See the client setup guide.

Claude Code

With Claude Code 2.1.275 or later, run:

/plugin marketplace add swkstudios/unifi-fabric-mcp-server
/plugin install unifi-fabric@unifi-fabric

Enter your API key when prompted. Or skip the plugin and add the server directly from a terminal (the first line prompts for your key):

printf 'UniFi API key: '; read -rs UNIFI_API_KEY; echo; export UNIFI_API_KEY
claude mcp add unifi-fabric -e UNIFI_API_KEY="$UNIFI_API_KEY" -- uvx --from unifi-fabric-mcp-server==0.7.2 unifi-fabric-mcp

Open Settings > Developer > Edit Config and merge the following into the configuration:

{
  "mcpServers": {
    "unifi-fabric": {
      "command": "/absolute/path/to/uvx",
      "args": ["--from", "unifi-fabric-mcp-server==0.7.2", "unifi-fabric-mcp"],
      "env": { "UNIFI_API_KEY": "your-api-key-here" }
    }
  }
}

Replace the command path with the output of which uvx on macOS or where uvx on Windows, and replace the key placeholder. Quit Claude Desktop completely and reopen it.

Alternatively, download the Claude Desktop extension (.mcpb) and open it; Claude Desktop prompts for your API key during installation.

From a terminal (the first line prompts for your key):

printf 'UniFi API key: '; read -rs UNIFI_API_KEY; echo
codex mcp add unifi-fabric --env UNIFI_API_KEY="$UNIFI_API_KEY" -- uvx --from unifi-fabric-mcp-server==0.7.2 unifi-fabric-mcp

This stores the key in ~/.codex/config.toml. Run codex mcp list to check the registration.

Export the key before starting agy — that keeps it out of config files (Antigravity does not expand ${VAR} in env values):

printf 'UniFi API key: '; read -rs UNIFI_API_KEY; echo; export UNIFI_API_KEY
agy mcp add unifi-fabric -- uvx --from unifi-fabric-mcp-server==0.7.2 unifi-fabric-mcp
agy

When Antigravity is started from the Dock (Antigravity 2.0 and the IDE), it cannot see exported variables; store the key in the config instead:

agy mcp add --env UNIFI_API_KEY="$UNIFI_API_KEY" unifi-fabric -- uvx --from unifi-fabric-mcp-server==0.7.2 unifi-fabric-mcp

Install this repository as a Gemini CLI extension; it prompts for your API key (stored in the system keychain) and your write-policy choice:

gemini extensions install https://github.com/swkstudios/unifi-fabric-mcp-server

Use the install button above, or add this to .vscode/mcp.json in your workspace (VS Code prompts for the key on first start):

{
  "inputs": [
    { "id": "unifi_api_key", "type": "promptString", "description": "UniFi Fabric API key", "password": true }
  ],
  "servers": {
    "unifi-fabric": {
      "command": "uvx",
      "args": ["--from", "unifi-fabric-mcp-server==0.7.2", "unifi-fabric-mcp"],
      "env": { "UNIFI_API_KEY": "${input:unifi_api_key}" }
    }
  }
}

Use the install button above, or merge this into ~/.cursor/mcp.json and replace the key placeholder:

{
  "mcpServers": {
    "unifi-fabric": {
      "command": "uvx",
      "args": ["--from", "unifi-fabric-mcp-server==0.7.2", "unifi-fabric-mcp"],
      "env": { "UNIFI_API_KEY": "your-api-key-here" }
    }
  }
}

ChatGPT cannot launch a local MCP server. It connects over the network, signed in through OAuth — so using it means self-hosting:

  1. Run this server in OAuth mode (MCP_AUTH_MODE=oauth) behind an identity provider you operate.

  2. Make it reachable from ChatGPT: a public HTTPS URL behind a TLS proxy, or a private connection through OpenAI's Secure MCP Tunnel (no public exposure needed).

  3. In ChatGPT, open Plugins, select +, then Add custom MCP server, and choose OAuth.

The ChatGPT guide walks through each step and has a security checklist. Never expose the server without authentication: it can reconfigure your network.

Run the server locally over stdio (Python 3.12+, or let uv fetch one):

export UNIFI_API_KEY="your-api-key-here"
uvx --from unifi-fabric-mcp-server==0.7.2 unifi-fabric-mcp

Or register it with the standard MCP configuration your client reads:

{
  "mcpServers": {
    "unifi-fabric": {
      "command": "uvx",
      "args": ["--from", "unifi-fabric-mcp-server==0.7.2", "unifi-fabric-mcp"],
      "env": { "UNIFI_API_KEY": "your-api-key-here" }
    }
  }
}

Prefer a one-time install with pipx install unifi-fabric-mcp-server==0.7.2 or uv tool install unifi-fabric-mcp-server==0.7.2, then use "command": "unifi-fabric-mcp" with no args.

Run the server as a container that your MCP clients reach over HTTP with a bearer token, so only clients holding the token can use your UniFi key:

# Generate a random token once and keep it: the server checks it and your MCP client sends it.
export MCP_BEARER_TOKEN="$(openssl rand -hex 32)"
printf 'UniFi API key: '; read -rs UNIFI_API_KEY; echo; export UNIFI_API_KEY
docker run -e UNIFI_API_KEY -e MCP_AUTH_MODE=bearer -e MCP_BEARER_TOKEN \
  -p 127.0.0.1:3000:3000 ghcr.io/swkstudios/unifi-fabric-mcp-server:0.7.2

The third line prompts for your UniFi key. -e UNIFI_API_KEY and -e MCP_BEARER_TOKEN with no =value pass both from your shell, so neither is written into the command. Point your client at it with an HTTP entry (the token stays in your environment):

{
  "mcpServers": {
    "unifi-fabric": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": { "Authorization": "Bearer ${MCP_BEARER_TOKEN}" }
    }
  }
}

-p 127.0.0.1:3000:3000 serves this machine only; to serve other machines, publish the port and add TLS. The Docker guide has the smoke test, digest pinning and TLS options.

Full walkthroughs for every client are in the client setup guide.

3. Ask your first question

Ask your assistant: “List my UniFi sites and the devices in each one.” If it answers with your sites, you are connected — everything in What you can do works from here.

How it works

By default, the server exposes a small set of discovery tools to your assistant rather than loading the entire 798-tool catalog into context at once. When you ask a question or request a change, the assistant searches the catalog, inspects the matching tool, and calls it through the server.

The server sends the request over HTTPS with your UniFi Fabric API key to the UniFi Fabric API (api.ui.com). Ubiquiti's cloud relays the request to the consoles joined to your fabric, which reach your network devices and Protect deployment, and returns the response along the same path. You do not need to open inbound ports, log in directly to a controller, or install software on your consoles.

Tool families

Catalog: 798 registered tools; 779 are in the product families listed below. The remaining 19 cover Ubiquiti's ISP and mobile-routing products (Carrier Fabric and Mobility), which this overview leaves out. Availability depends on your hardware, permissions and API routes; see coverage and limitations.

Family

Tools

Family

Tools

Network

345

Protect

225

VPN

42

Devices

39

Firewall

33

InnerSpace

32

Site Manager

20

Statistics

19

Clients

15

Connector relay

5

Hotspot

4

Verification status

Evidence

Result

Every tool runs in CI against a simulated upstream

798 tools

Live-tested on a real console

402 of 798 passed on build 8a86a795f635, 2026-11-10

Live write tools passed

170 on that build and date

Full results, failures and untested tools are in coverage and limitations.

Security

IMPORTANT

Writes are allowed by default — the server can change your network. One setting controls that:

Setting

Effect

UNIFI_WRITE_POLICY=allow

Default: read and write tools are available.

UNIFI_WRITE_POLICY=dry-run

Writes return a preview of what would be sent; nothing changes.

UNIFI_WRITE_POLICY=deny

Read-only: write tools are hidden and refused.

# example: run read-only
export UNIFI_WRITE_POLICY=deny

Per-family and per-tool exceptions are available through UNIFI_WRITE_EXCEPTIONS; see the configuration guide. Upgrading from an older release? The variable names changed; see the migration guide. Upgrading from 0.7.1? Nine tools are removed and set_door_lock_state changed; see the 0.7.2 migration guide.

  • Review requests before they run — use your MCP client's permission prompts.

  • Responses can contain sensitive data — the server masks its own configured secrets; set UNIFI_REDACT_SECRETS=1 to also mask documented credential fields (Wi-Fi PSKs, RADIUS secrets, tokens).

  • Protect your files — client config files and logs hold your API key; keep them private.

  • Remote deployments need authentication and TLS — see authentication and TLS.

Verify the image

Release images are signed with Cosign and carry an SBOM and provenance attestation; see Verify the image.

More info

Guide

What it covers

Configuration

Every setting: discovery, write controls, audit logging

Client setup

Full walkthroughs for every supported MCP client

Troubleshooting

Fixes for common setup, connection and key errors

Docker deployment

Running as a shared HTTP service with auth and TLS

Migration guide

Upgrading from an older release

0.7.2 migration guide

Upgrading from 0.7.1: removed tools and changed routes

Tool usage

Workflows and examples for using the tools

Tool reference

Every tool, listed by family

Coverage

Live-verification results, compatibility and limits

Agent skills

Ready-made skills for AI assistants

MSP setup

Managed-service and multi-organization use

Introducing UniFi Fabrics

Ubiquiti's announcement of fabrics, with a video overview

Project: Privacy · Security policy · Contributing · License

This project is not affiliated with or endorsed by Ubiquiti. UniFi is a trademark of Ubiquiti Inc. Licensed under the MIT License.

Available Tools

5 tools
call_read_toolCall Read ToolA
Read-onlyIdempotent

Execute a read tool with its original validation, guards, audit and result format.

Refuses write calls, including state-changing routes of the mixed GET relay. Describe the target first; its schema and permissions apply. Read-only mode and secret scrubbing are preserved.

Inputs: name (required), arguments (required).

call_write_toolCall Write ToolA
Destructive

Execute a tool that may mutate live configuration through registered dispatch.

Describe the target first. Target validation, per-area opt-outs, UNIFI_WRITE_POLICY=deny, OAuth permissions, dry-run, audit and secret scrubbing match a direct call.

Inputs: name (required), arguments (required).

describe_toolDescribe ToolB
Read-onlyIdempotent

Return the complete enabled tool schema, identical to its full-mode tools/list entry.

Inputs: name (required). Returns: name, title, annotations, description, +2 more

list_tool_familiesList Tool FamiliesA
Read-onlyIdempotent

List enabled families and counts; use their slugs as search_tools family filters.

Inputs: no named parameters. Returns: result

search_toolsSearch ToolsA
Read-onlyIdempotent

Find enabled tools by intent, ranked over names, descriptions and parameter schemas.

Default returns ten matches. Choose any positive limit, or null for every match; no tool or search result is hard-capped. more_available is true when the limit cut the list (total_matched gives the full count): raise the limit or refine. Empty query browses tools. Use describe_tool for the exact schema, then call_read_tool or call_write_tool. Enabled families (tool counts): carrier: 11; clients: 15; connector: 5; devices: 39; firewall: 33; hotspot: 4; innerspace: 32; mobility: 8; network: 345; protect: 225; site_manager: 20; statistics: 19; vpn: 42.

Inputs: query (required), limit, family, writes. Returns: result, total_matched, more_available

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 5 tools

    Disambiguation4/5

    The gateway flow is clear: discover (search_tools, list_tool_families), inspect (describe_tool), then execute (call_read_tool, call_write_tool). Minor overlap between search_tools and list_tool_families as discovery entry points, but the descriptions distinguish intent-ranked search from family-level browsing. The read/write split of the execution tools is cleanly disambiguated.

    Naming Consistency4/5

    All names use snake_case with a verb_noun shape: call_read_tool, call_write_tool, describe_tool, search_tools, list_tool_families. The only deviation is that the two execution tools share a 'call_' prefix while describe_tool also acts on a tool, which slightly muddies the verb semantics but remains predictable.

    Tool Count5/5

    Five facade tools are a well-scoped surface for a dispatcher fronting a very large registry (hundreds of underlying tools across 13 families). A meta-server should stay minimal, and each of these five earns its place: two discovery, one schema inspection, two execution.

    Completeness4/5

    The discover-inspect-execute lifecycle, family browsing, filtering, pagination via limits, and read/write separation with policy guards cover the gateway domain well. Gaps are minor: no bulk/batch invocation and no aggregated error or health inspection tool, but agents can work around these by chaining search_tools and describe_tool.

    Maintenance

    ActivityNo data
    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
      A
      quality
      D
      maintenance
      MCP server that turns Claude into a UniFi network specialist. Manage devices, optimize WiFi, audit security, and troubleshoot your network through natural language.
      31
      13 npm
      2
      MIT