UniFi MCP
MCP server for the UniFi ecosystem
UniFi MCP is an open-source Model Context Protocol server that exposes the full Ubiquiti UniFi stack — Network, Protect, Access, and Drive — as agent-callable tools. It lets any MCP-compliant agent (Claude, ChatGPT, Cursor, opencode, etc.) inspect firewall policies, audit camera events, control door access, and reason about a UniFi deployment in plain English.
What it covers
UniFi Network: clients, devices, firewall policies, port forwarding, VPN, WLANs, traffic routes, and statistics. UniFi Protect: cameras, motion events, smart detections, recordings. UniFi Access: doors, users, schedules, and entry events. UniFi Drive: storage and file management. All exposed as discrete MCP tools with typed parameters and pagination.
Why an MCP server, not an API client
An API client requires the agent to know the endpoint surface up front. An MCP server lets the agent discover the available tools, parameter schemas, and pagination semantics at runtime — which means a fresh agent session can productively reason about a UniFi network without any prompt engineering. It's the difference between handing someone a Postman collection and handing them a workshop full of labelled tools.
Stack
Python, the official MCP SDK, aiohttp-backed UniFi controller integrations, Docker for local deployment, Cloudflare Workers for hosted variants, and the companion UniFi Network Rules project for backing up and automating UDM firewall policies through Home Assistant.
- MCP
- Python
- UniFi API
- Docker
- Cloudflare Workers