Best for
- Home or small-office users running a local UniFi gateway who want AI-assisted network operations
- Technically comfortable users familiar with UniFi controller concepts who will validate tool behavior incrementally
Broad feature coverage (devices, networks, WiFi, firewall, QoS, backups, topology), but the server.json manifest and the README's described latest version disagree on packaging, transport, and auth variables, and several enterprise security features remain planned rather than implemented — verify the docs for the specific version installed before relying on it.
UniFi MCP Server is a third-party community project (by enuno) that exposes the UniFi Network Controller's official API to AI agents via the Model Context Protocol. It can list and control devices (APs, switches, gateways), manage clients, create/modify WiFi networks and VLANs, configure firewall rules and Zone-Based Firewall (ZBF) policies, and manage QoS, backups, and multi-site setups. The repository contains two overlapping configuration stories: the published server.json manifest (npm package v0.2.0, stdio transport, authenticating with UNIFI_HOST/UNIFI_USERNAME/UNIFI_PASSWORD) and the README's description of the latest release (PyPI package v0.2.5, authenticating with UNIFI_API_KEY and UNIFI_API_TYPE, and supporting stdio/SSE/HTTP/Streamable HTTP transports). The README also states several 'Phase 5' capabilities (dry-run mode, audit logging, RBAC, A2A) are still planned, not yet implemented — check the docs for the version you actually install.
1) Determine which distribution you're actually installing: the repo's server.json manifest corresponds to an npm package (v0.2.0, stdio transport, requiring UNIFI_HOST/UNIFI_USERNAME/UNIFI_PASSWORD), while the README describes the latest stable release (v0.2.5) installed via pip install unifi-mcp-server with a different UNIFI_API_KEY/UNIFI_API_TYPE-based config — the two env-var schemes are not interchangeable, so confirm which one matches your install. 2) For the npm package, launch it in your MCP client with npx -y unifi-mcp-server and set UNIFI_HOST, UNIFI_USERNAME, UNIFI_PASSWORD (optionally UNIFI_PORT, UNIFI_VERIFY_SSL, UNIFI_SITE). 3) For the PyPI package, use the README's UNIFI_API_KEY/UNIFI_API_TYPE/UNIFI_LOCAL_HOST variables instead. 4) Restart your client and test with a read-only tool first before running any mutating operations.
{"mcpServers":{"unifi":{"command":"npx","args":["-y","unifi-mcp-server"],"env":{"UNIFI_HOST":"your-unifi-controller-host","UNIFI_USERNAME":"your-username","UNIFI_PASSWORD":"your-password"}}}}