# UniFi Fabric MCP Server

The UniFi Fabric MCP Server MCP server for Claude Code connects an AI assistant to a UniFi network. It can inspect offline devices, investigate Wi-Fi issues, and manage settings.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6 repo stars
- Author: swkstudios
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/swkstudios/unifi-fabric-mcp-server
- Updated: 2026-11-15
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/unifi-fabric-mcp-server

## What it does

The server gives an assistant access to UniFi Fabric data and controls for networks, Wi-Fi, VPN, firewall policies, clients, and devices. It also covers Protect cameras and InnerSpace floor plans. Tools load on demand; the full catalog contains 798 tools.

Connect consoles to a fabric through UniFi Site Manager and provide a fabric API key. One key covers an organization, while multiple keys can connect several organizations. Requests go through Ubiquiti's cloud, so the server does not need to reach a controller on the local network.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `UNIFI_API_KEY`, `UNIFI_WRITE_POLICY`, `UNIFI_TOOL_MODE`, `MCP_AUTH_MODE`, `MCP_BEARER_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env UNIFI_API_KEY=<UNIFI_API_KEY> --env UNIFI_WRITE_POLICY=<UNIFI_WRITE_POLICY> --env UNIFI_TOOL_MODE=<UNIFI_TOOL_MODE> --env MCP_AUTH_MODE=<MCP_AUTH_MODE> --env MCP_BEARER_TOKEN=<MCP_BEARER_TOKEN> --transport stdio unifi-fabric-mcp-server -- uvx unifi-fabric-mcp-server
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unifi-fabric-mcp-server <command>

### Codex

**Platform CLI**
```bash
codex mcp add unifi-fabric-mcp-server --env UNIFI_API_KEY=<UNIFI_API_KEY> --env UNIFI_WRITE_POLICY=<UNIFI_WRITE_POLICY> --env UNIFI_TOOL_MODE=<UNIFI_TOOL_MODE> --env MCP_AUTH_MODE=<MCP_AUTH_MODE> --env MCP_BEARER_TOKEN=<MCP_BEARER_TOKEN> -- uvx unifi-fabric-mcp-server
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unifi-fabric-mcp-server <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "unifi-fabric-mcp-server": {
            "command": "uvx",
            "args": [
                "unifi-fabric-mcp-server"
            ],
            "env": {
                "UNIFI_API_KEY": "<UNIFI_API_KEY>",
                "UNIFI_WRITE_POLICY": "<UNIFI_WRITE_POLICY>",
                "UNIFI_TOOL_MODE": "<UNIFI_TOOL_MODE>",
                "MCP_AUTH_MODE": "<MCP_AUTH_MODE>",
                "MCP_BEARER_TOKEN": "<MCP_BEARER_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unifi-fabric-mcp-server <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "unifi-fabric-mcp-server": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "unifi-fabric-mcp-server"
            ],
            "env": {
                "UNIFI_API_KEY": "<UNIFI_API_KEY>",
                "UNIFI_WRITE_POLICY": "<UNIFI_WRITE_POLICY>",
                "UNIFI_TOOL_MODE": "<UNIFI_TOOL_MODE>",
                "MCP_AUTH_MODE": "<MCP_AUTH_MODE>",
                "MCP_BEARER_TOKEN": "<MCP_BEARER_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unifi-fabric-mcp-server <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e UNIFI_API_KEY=<UNIFI_API_KEY> -e UNIFI_WRITE_POLICY=<UNIFI_WRITE_POLICY> -e UNIFI_TOOL_MODE=<UNIFI_TOOL_MODE> -e MCP_AUTH_MODE=<MCP_AUTH_MODE> -e MCP_BEARER_TOKEN=<MCP_BEARER_TOKEN> unifi-fabric-mcp-server uvx unifi-fabric-mcp-server
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unifi-fabric-mcp-server <command>

## When to use it
- find offline UniFi devices
- investigate Wi-Fi problems
- review recent Protect camera events
- locate InnerSpace floor plans
- change network and firewall settings

## Example prompts
- List my UniFi sites and the devices at each one.
- Find offline devices and suggest what to investigate.
- Show recent events from my Protect cameras.

## Similar
- [UniFi Protect MCP](https://affpapa.org/en/nevibecode/mcp/unifi-protect-mcp.md) — MCP server · ★ 1107 repo stars
- [UniFi Network MCP](https://affpapa.org/en/nevibecode/mcp/unifi-network-mcp.md) — MCP server · ★ 1107 repo stars
- [unifi-mcp-server](https://affpapa.org/en/nevibecode/mcp/unifi-mcp-server.md) — MCP server · ★ 370 repo stars
- [mcp-unifi-applications](https://affpapa.org/en/nevibecode/mcp/mcp-unifi-applications.md) — MCP server · ★ 40 repo stars
- [UniFi Gateway](https://affpapa.org/en/nevibecode/mcp/unifi-gateway.md) — MCP server · ★ 31 repo stars
- [UniFi MCP](https://affpapa.org/en/nevibecode/mcp/unifi-mcp.md) — MCP server · ★ 87 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
