$git clone https://github.com/sirkirby/unifi-mcpLeverage agents and agentic AI workflows to manage your UniFi deployment.
| 1 | # UniFi MCP |
| 2 | |
| 3 | <p align="center"> |
| 4 | <img src="docs/assets/hero-readme.jpg" alt="UniFi MCP — AI agents for your UniFi infrastructure" width="720"> |
| 5 | </p> |
| 6 | |
| 7 | Leverage agents and agentic AI workflows to manage your UniFi deployment. |
| 8 | |
| 9 | [](https://pypi.org/project/unifi-network-mcp/) |
| 10 | [](https://pypi.org/project/unifi-protect-mcp/) |
| 11 | [](https://pypi.org/project/unifi-access-mcp/) |
| 12 | [](https://pypi.org/project/unifi-mcp-relay/) |
| 13 | [](https://pypi.org/project/unifi-api-server/) |
| 14 | [](https://www.npmjs.com/package/unifi-mcp-worker) |
| 15 | [](LICENSE) |
| 16 | [](https://www.python.org/downloads/) |
| 17 | |
| 18 | ## Servers |
| 19 | |
| 20 | | Server | Status | Tools | Package | |
| 21 | |--------|--------|-------|---------| |
| 22 | | [Network](apps/network/) | Stable | 186 | [`unifi-network-mcp`](https://pypi.org/project/unifi-network-mcp/) | |
| 23 | | [Protect](apps/protect/) | Beta | 61 | [`unifi-protect-mcp`](https://pypi.org/project/unifi-protect-mcp/) | |
| 24 | | [Access](apps/access/) | Beta | 36 | [`unifi-access-mcp`](https://pypi.org/project/unifi-access-mcp/) | |
| 25 | |
| 26 | ## Cloud Relay |
| 27 | |
| 28 | | Component | Status | Package | |
| 29 | |-----------|--------|---------| |
| 30 | | [Relay Sidecar](https://github.com/sirkirby/unifi-mcp/tree/main/packages/unifi-mcp-relay) | Beta | [`unifi-mcp-relay`](https://pypi.org/project/unifi-mcp-relay/) | |
| 31 | | [Worker Gateway](https://github.com/sirkirby/unifi-mcp/tree/main/apps/worker) | Beta | [`unifi-mcp-worker`](https://www.npmjs.com/package/unifi-mcp-worker) (CLI) | |
| 32 | |
| 33 | Cloud Relay pairs the Cloudflare-hosted Worker gateway with the Relay sidecar on your LAN. The Worker provides the authenticated edge MCP endpoint, Durable Object broker, multi-location routing, token boundary, and deployment/management CLI. The Relay sidecar is a local MCP HTTP client and forwarder: it discovers configured local MCP servers over HTTP and maintains an outbound WebSocket to the Worker. Remote requests follow `MCP client → Worker gateway → outbound WebSocket → Relay sidecar → local MCP servers over HTTP`; the API server is not in this path. Read-only tools support annotation-based multi-location fan-out, while writes require explicit location targeting. Deploy the Worker with `npm install -g unifi-mcp-worker && unifi-mcp-worker install`, then see the [Relay sidecar README](packages/unifi-mcp-relay/) to connect local servers. |
| 34 | |
| 35 | ## REST + GraphQL API (non-MCP) |
| 36 | |
| 37 | | Component | Status | Package | |
| 38 | |-----------|--------|---------| |
| 39 | | [API Server](https://github.com/sirkirby/unifi-mcp/tree/main/apps/api) | Beta | [`unifi-api-server`](https://pypi.org/project/unifi-api-server/) · [GHCR image](https://github.com/sirkirby/unifi-mcp/pkgs/container/unifi-api-server) | |
| 40 | |
| 41 | `unifi-api-server` is an independent HTTP service for consumers that do not speak MCP. It provides typed REST resources, read-only GraphQL queries, SSE streams, scoped API keys and administration, plus a REST action endpoint for supported controller operations. It shares `unifi-core` managers with the MCP servers but does not proxy or require them. |
| 42 | |
| 43 | See [`apps/api/README.md`](apps/api/README.md) for quick-start and deployment patterns. |
| 44 | |
| 45 | ## What is this? |
| 46 | |
| 47 | UniFi MCP is a collection of [Model Context Protocol](https://modelcontextprotocol.io/) servers that let AI assistants and automation tools interact with Ubiquiti UniFi controllers. Each server targets a specific UniFi application (Network, Protect, Access) and exposes its functionality as MCP tools — queryable, composable, and safe by default. |
| 48 | |
| 49 | ## MCP Discovery |
| 50 | |
| 51 | UniFi MCP keeps the standard MCP path primary: capable clients disco |