# UniFi

> UniFi is an open-source MCP server for cloud and infrastructure. Inspect and manage a UniFi network: devices, clients, WiFi, firewall and VPN. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, macOS, Windows, Linux, CLI
- **Website:** https://unifi-mcp.mattoddie.dev
- **Repository:** https://github.com/mattoddie/unifi-mcp
- **MCP Registry name:** io.github.mattoddie/unifi-mcp
- **Categories:** cloud and infrastructure, security
- **Listing updated:** 2026-11-15

## About

Covering 145 tools in 14 toolsets (59 read, 57 write, 29 delete), this open-source server talks to a UniFi controller, from UniFi OS consoles such as UDM, UDM Pro, Cloud Gateway and Cloud Key Gen2+ to self-hosted Network applications up to 10.6. Authentication is a UniFi API key or a local account.

It spans switch ports and PoE, VLANs and WAN links, port forwards, legacy and zone-based firewall, traffic rules, IDS/IPS, VPN and RADIUS, hotspot vouchers, statistics and backups. Changes are off unless allowed, deleting needs a second switch, every write tool offers `dry_run` with a field-level diff, and secrets are redacted. TLS certificate pinning is supported for self-signed controllers.

## Features

- **Broad network coverage:** Devices, clients, ports, WiFi, VLANs, firewall, routes, VPN and statistics.
- **Preview and audit:** dry_run diffs and an optional JSON Lines audit log.
- **Controller compatibility:** Supports UniFi OS consoles and legacy self-hosted controllers.
- **Secret redaction:** Passphrases and keys stay hidden from the model.
- **Certificate pinning:** Pins a self-signed controller by fingerprint.

## Good for

- Run a network health check
- Find clients with weak WiFi
- Review port forwards for risk
- Create guest vouchers with a speed limit
- Block a device until further notice

## Install

### Claude Code (Terminal)

```sh
claude mcp add unifi-mcp --env UNIFI_URL='<UNIFI_URL>' --env UNIFI_API_KEY='<UNIFI_API_KEY>' --env UNIFI_PASSWORD='<UNIFI_PASSWORD>' -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e UNIFI_PASSWORD ghcr.io/mattoddie/unifi-mcp:0.8.0
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "UNIFI_PASSWORD",
        "ghcr.io/mattoddie/unifi-mcp:0.8.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "UNIFI_PASSWORD": "<UNIFI_PASSWORD>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "UNIFI_PASSWORD",
        "ghcr.io/mattoddie/unifi-mcp:0.8.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "UNIFI_PASSWORD": "<UNIFI_PASSWORD>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "unifi-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "UNIFI_PASSWORD",
        "ghcr.io/mattoddie/unifi-mcp:0.8.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "UNIFI_PASSWORD": "<UNIFI_PASSWORD>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "UNIFI_PASSWORD",
        "ghcr.io/mattoddie/unifi-mcp:0.8.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "UNIFI_PASSWORD": "<UNIFI_PASSWORD>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "UNIFI_PASSWORD",
        "ghcr.io/mattoddie/unifi-mcp:0.8.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "UNIFI_PASSWORD": "<UNIFI_PASSWORD>"
      }
    }
  }
}
```

## FAQ

### What credentials are needed?

A UniFi API key from Control Plane, Integrations, or a local account on older controllers.

### Can it delete things?

Only if both writes and deletes are enabled.

### Which controllers work?

UniFi OS consoles and self-hosted Network applications up to 10.6.

### What licence?

MIT.

### Is UniFi free?

Yes. UniFi is open source, so you can use and self-host it for free.

### How do I add UniFi to Claude Code?

Run this command in your terminal: claude mcp add unifi-mcp --env UNIFI_URL='<UNIFI_URL>' --env UNIFI_API_KEY='<UNIFI_API_KEY>' --env UNIFI_PASSWORD='<UNIFI_PASSWORD>' -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e UNIFI_PASSWORD ghcr.io/mattoddie/unifi-mcp:0.8.0

### What are the best alternatives to UniFi?

The closest alternatives to UniFi are REA, Agent Roast, Midplane, Leash and Tinplate Edge AI Safety, Security & EU Compliance.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.
- [SecureCloud](https://ai-powered.com/mcp/securecloud): SecureCloud is a free MCP server for security.
- [Eikino](https://ai-powered.com/mcp/eikino): Eikino is a freemium MCP server for security.
- [SynomosAI Governance MCP](https://ai-powered.com/mcp/synomosai-governance-mcp-2): SynomosAI Governance MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/unifi
