UniFi MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UniFi MCPshow me all devices on my network"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
UniFi MCP
An MCP server that lets Claude interact with your UniFi infrastructure. Supports the Site Manager API (cloud), the Network API (local console), and the Protect API (local console).
Features
Site Manager API (cloud)
Read-only access to your UniFi account via https://api.ui.com:
Tool | Description |
| List all consoles/gateways |
| Get detailed host information |
| List all sites |
| List all network devices |
| Get ISP performance metrics (latency, bandwidth, uptime) |
| Query ISP metrics for specific sites |
| List or inspect SD-WAN configurations |
Network API (local console)
Full CRUD access to a local UniFi console (UDM, UCG, etc.):
Tool | Description |
Info | |
| Application info and site discovery |
Devices | |
| List all adopted devices |
| Get device details and statistics |
| Restart, locate, or adopt a device |
Clients | |
| List all connected clients |
| Get client details |
| Block or reconnect a client |
Networks | |
| List configured networks (VLANs) |
| Get network details |
| Create a network |
| Update a network |
| Delete a network |
WiFi | |
| List WiFi broadcasts (SSIDs) |
| Get WiFi broadcast details |
| Create a WiFi broadcast |
| Update a WiFi broadcast |
| Delete a WiFi broadcast |
Firewall | |
| List firewall zones |
| List firewall policies |
| Create a firewall policy |
| Update a firewall policy |
| Delete a firewall policy |
DNS | |
| List DNS filtering policies |
Vouchers | |
| List hotspot vouchers |
| Create hotspot vouchers |
| Delete a hotspot voucher |
Supporting | |
| List WAN interfaces |
| List site-to-site VPN tunnels |
| List VPN servers |
| List RADIUS profiles |
Protect API (local console)
Access to UniFi Protect cameras, sensors, and devices on a local console:
Tool | Description |
Info | |
| Application info and NVR status |
Cameras | |
| List all cameras |
| Get camera details |
| Update camera settings |
| Get a JPEG snapshot from a camera |
Lights | |
| List all lights |
| Get light details |
| Update light settings |
Sensors | |
| List all sensors |
| Get sensor details |
| Update sensor settings |
Chimes | |
| List all chimes |
| Get chime details |
| Update chime settings |
Door Locks | |
| List all door locks |
| Get door lock details |
| Update door lock (lock/unlock, timeout) |
Events | |
| List recent events (motion, detections) |
Liveviews | |
| List all liveviews |
| Get liveview details |
| Create a liveview |
| Update a liveview |
Viewers | |
| List all viewers (Viewport devices) |
| Get viewer details |
| Update viewer settings |
Related MCP server: unifi-mcp
Prerequisites
UniFi API key -- generate at unifi.ui.com > API section. The same key works for Site Manager, Network, and Protect APIs.
Quick start
Docker (recommended)
# Build the image
docker build -t unifi-mcp .
# Run with Site Manager API only
docker run --rm -i -e UNIFI_API_KEY=your-key unifi-mcp
# Run with all three APIs (same key, just add the console host)
docker run --rm -i \
-e UNIFI_API_KEY=your-key \
-e UNIFI_NETWORK_HOST=192.168.1.1 \
-e UNIFI_PROTECT_HOST=192.168.1.1 \
unifi-mcpDocker Compose
cp .env.example .env
# Edit .env with your API keys
docker compose build
docker compose run --rm unifi-mcpLocal (with uv)
# Install dependencies
uv sync
# Run the server
UNIFI_API_KEY=your-key uv run unifi-mcpConfiguration
Variable | Required | Default | Description |
| Yes | -- | UniFi API key (shared across all APIs) |
| No |
| Site Manager API base URL |
| No |
| HTTP timeout in seconds |
| No | -- | Console IP/hostname for Network API |
| No |
| Network API key (if different) |
| No |
| Verify SSL for Network API |
| No | -- | Console IP/hostname for Protect API |
| No |
| Protect API key (if different) |
| No |
| Verify SSL for Protect API |
The Network API tools are only available when UNIFI_NETWORK_HOST is set. The Protect API tools are only available when UNIFI_PROTECT_HOST is set. By default, UNIFI_API_KEY is used for all APIs. Set UNIFI_NETWORK_API_KEY or UNIFI_PROTECT_API_KEY if a console requires a separate key.
Claude integration
Claude Desktop (via mcp-remote)
Run the server with an HTTP transport, then connect Claude Desktop using mcp-remote:
# Streamable HTTP (recommended)
docker compose up unifi-mcp-http
# Or SSE (legacy)
docker compose up unifi-mcp-sse
# Or without Compose
docker run --rm -p 8000:8000 \
-e UNIFI_API_KEY=your-key \
-e UNIFI_NETWORK_HOST=192.168.1.1 \
-e UNIFI_PROTECT_HOST=192.168.1.1 \
unifi-mcp --transport streamable-httpAdd to your claude_desktop_config.json:
{
"mcpServers": {
"unifi": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8000/mcp"]
}
}
}For SSE transport, use
http://localhost:8000/sseinstead.
Claude Desktop (stdio)
Alternatively, run the container directly via stdio:
{
"mcpServers": {
"unifi": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "UNIFI_API_KEY=your-key",
"-e", "UNIFI_NETWORK_HOST=192.168.1.1",
"-e", "UNIFI_PROTECT_HOST=192.168.1.1",
"unifi-mcp"
]
}
}
}Claude Code
Add to your MCP settings:
{
"mcpServers": {
"unifi": {
"command": "uv",
"args": ["--directory", "/path/to/unifi-mcp", "run", "unifi-mcp"],
"env": {
"UNIFI_API_KEY": "your-key",
"UNIFI_NETWORK_HOST": "192.168.1.1",
"UNIFI_PROTECT_HOST": "192.168.1.1"
}
}
}
}Project structure
src/unifi_mcp/
server.py # MCP server and tool definitions
client.py # Site Manager API client
formatting.py # Site Manager response formatters
network_client.py # Network API client (local console)
network_formatting.py # Network response formatters
protect_client.py # Protect API client (local console)
protect_formatting.py # Protect response formattersLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/frousselet/unifi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server