# UniFi Network

> UniFi Network is an open-source MCP server for cloud and infrastructure. Read-only diagnostics and approved changes for a UniFi Network console, via MCP. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, Web
- **Repository:** https://github.com/graf3x/unifi-mcp
- **MCP Registry name:** io.github.Graf3x/unifi-mcp
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-11-29

## About

Ask an AI assistant plain questions about a UniFi network and get finished answers: which clients are on the guest network, which switch port a device uses, whether the connection dropped, and which access points sit on a busy channel. The server runs on your own network next to one console and talks to its local API, so no UI.com account or cloud service is involved.

Reads are the default. When writes are enabled, every change is shown in full on a form that you accept or decline, and the model cannot approve it on your behalf. Wi-Fi passphrases, per-network keys and voucher codes are replaced with placeholders before the assistant sees them, and TLS to the console is pinned to its certificate or public key.

It suits people who run a UniFi Network console at home or in a small office and use an MCP-capable client such as Claude. Remote access is possible through a Cloudflare tunnel or a token-protected LAN listener, and setup is handled by a local page that tests each setting.

## Features

- **Question-based diagnostics:** Composite tools answer everyday network questions such as client location, DHCP reservations and recent internet health.
- **Read-only by default:** Write tools are hidden unless writes are explicitly enabled, and each change needs approval on a confirmation form.
- **Credential redaction:** Wi-Fi passphrases, per-network keys and voucher codes are masked before answers reach the assistant.
- **Pinned console TLS:** The connection to the console is pinned to its certificate or public key, or checked against a trusted CA.
- **Throttled console access:** Reads are rate-limited and cached to avoid overloading the console's internal API.
- **Setup and tunnel checks:** A local setup page tests the console, certificate, API key and tunnel, and explains what to fix.

## Good for

- Find which switch port a device is connected to when troubleshooting
- Check whether an access point is on a noisy or busy Wi-Fi channel
- Review recent internet drops and packet loss over the past days
- List devices that are offline or have firmware updates waiting
- Add a DNS record for a local host with explicit approval for each change

## Install

### Claude Code: Add with the CLI (Terminal)

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

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

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

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

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

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "unifi-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "MCP_LAN_ACCESS_TOKEN",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add unifi-mcp --env UNIFI_URL='<UNIFI_URL>' --env UNIFI_API_KEY='<UNIFI_API_KEY>' --env MCP_LAN_ACCESS_TOKEN='<MCP_LAN_ACCESS_TOKEN>' -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e MCP_LAN_ACCESS_TOKEN ghcr.io/graf3x/unifi-mcp:0.13.0
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.unifi-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "UNIFI_URL", "-e", "UNIFI_API_KEY", "-e", "MCP_LAN_ACCESS_TOKEN", "ghcr.io/graf3x/unifi-mcp:0.13.0"]
env = { UNIFI_URL = "<UNIFI_URL>", UNIFI_API_KEY = "<UNIFI_API_KEY>", MCP_LAN_ACCESS_TOKEN = "<MCP_LAN_ACCESS_TOKEN>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

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

Or run: gemini mcp add -s user -e UNIFI_URL='<UNIFI_URL>' -e UNIFI_API_KEY='<UNIFI_API_KEY>' -e MCP_LAN_ACCESS_TOKEN='<MCP_LAN_ACCESS_TOKEN>' unifi-mcp docker -- run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e MCP_LAN_ACCESS_TOKEN ghcr.io/graf3x/unifi-mcp:0.13.0

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

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

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

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

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "MCP_LAN_ACCESS_TOKEN",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

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

Use .kiro/settings/mcp.json to add it to one workspace only.

### 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",
        "MCP_LAN_ACCESS_TOKEN",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 5 of 14 tools read data; 9 names don't say. From the server's own tool labels and tool names; not verified by us.

- `who_is_on_network_faq`: Lists who is on the network right now.
- `client_path_faq`: Shows which switch port a client is connected to.
- `dhcp_reservation_faq`: Checks whether a device gets its reserved fixed IP.
- `internet_health_faq`: Reports recent internet drops and packet loss.
- `wifi_health_faq`: Finds access points on busy or noisy channels.
- `device_diagnostics_faq`: Reports switch port errors, drops and flapping links.
- `system_log`: Reads console system log entries.
- `network_health_faq`: Lists offline devices and pending firmware updates.
- `list_port_forwards` (name suggests: reads): Lists ports forwarded to the internet.
- `getting_started`: Explains setup and configuration status.
- `unifi_status` (name suggests: reads): Reports the server's connection status to the console.
- `search_operations` (name suggests: reads): Finds an available API operation by name.
- `describe_operation` (name suggests: reads): Shows the schema for an API operation.
- `call_read_operation` (name suggests: reads): Runs a read-only API operation.

## FAQ

### Does UniFi Network need a UI.com account or cloud access?

No. The server talks to the console over your network with a local API key and sends nothing to Ubiquiti's cloud.

### Can the assistant change my network without asking?

Only if writes are turned on. Each change is then shown in full on a form that you accept or decline yourself.

### Is UniFi Network free?

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

### How do I add UniFi Network 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 MCP_LAN_ACCESS_TOKEN='<MCP_LAN_ACCESS_TOKEN>' -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e MCP_LAN_ACCESS_TOKEN ghcr.io/graf3x/unifi-mcp:0.13.0

### What are the best alternatives to UniFi Network?

The closest alternatives to UniFi Network are UniFi, Unifi, UniFi Network MCP, UniFi Site Manager and Network (unofficial) and UniFi RMCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [UniFi](https://ai-powered.com/mcp/unifi-3): UniFi is an open-source MCP server for cloud and infrastructure.
- [Unifi](https://ai-powered.com/mcp/unifi-2): Unifi is an open-source MCP server for cloud and infrastructure.
- [UniFi Network MCP](https://ai-powered.com/mcp/unifi-network-mcp): UniFi Network MCP is an open-source MCP server for cloud and infrastructure.
- [UniFi Site Manager and Network (unofficial)](https://ai-powered.com/mcp/unifi-site-manager-and-network-unofficial): UniFi Site Manager and Network (unofficial) is an open-source MCP server for cloud and infrastructure.
- [UniFi RMCP](https://ai-powered.com/mcp/unifi-rmcp-2): UniFi RMCP is an open-source MCP server for cloud and infrastructure.
- [Unifi MCP Server](https://ai-powered.com/mcp/unifi-mcp-server): Unifi MCP Server is an open-source MCP server for cloud and infrastructure.
- [UniFi](https://ai-powered.com/mcp/unifi): UniFi is an open-source MCP server for cloud and infrastructure.
- [UniFi Gateway](https://ai-powered.com/mcp/unifi-gateway-2): UniFi Gateway is an open-source MCP server for cloud and infrastructure.

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