UniFi MCP Server
Click on "Deploy 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 MCP Server show me all connected 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 Server
MCP server for UniFi Network Controller - manage your network with AI assistants using natural language.
Features
25 read-only tools across 4 categories:
Category | Tools | Examples |
Discovery | 8 | List devices, clients, networks, WLANs |
Security | 7 | Firewall rules, IPS status, port forwards |
Statistics | 7 | Network stats, top clients, DPI, alerts |
Migration | 3 | DHCP status, VLAN connectivity, config export |
Related MCP server: UniFi Network MCP Server
Quick Start
1. Install
# Using uvx (recommended)
uvx --from git+https://github.com/MidwestMountaineer/Unifi-MCP-Server.git unifi-mcp-server
# Or pip
pip install git+https://github.com/MidwestMountaineer/Unifi-MCP-Server.git2. Get API Key
Log into your Dream Machine
Settings → System → Advanced → API
Create new API key with Read Only permissions
Copy the key (shown only once)
3. Configure
Add to your MCP client config (e.g., .kiro/settings/mcp.json):
{
"mcpServers": {
"unifi": {
"command": "uvx",
"args": ["--from", "git+https://github.com/MidwestMountaineer/Unifi-MCP-Server.git", "unifi-mcp-server"],
"env": {
"UNIFI_HOST": "192.168.1.1",
"UNIFI_API_KEY": "your-api-key-here",
"UNIFI_VERIFY_SSL": "false"
}
}
}
}4. Test
Ask your AI assistant: "List all my UniFi devices"
Kiro Power
This repo is also a Kiro Power with guided workflows. Install via Kiro's "Add power from GitHub":
https://github.com/MidwestMountaineer/Unifi-MCP-ServerSee POWER.md for workflow documentation.
Configuration
Variable | Description | Default |
| Controller IP | (required) |
| API key | (required for UniFi OS) |
| Username | (for traditional controllers) |
| Password | (for traditional controllers) |
| Controller port |
|
| Site name |
|
| Verify SSL |
|
| Log verbosity |
|
Available Tools
Discovery
unifi_list_devices/unifi_get_device_detailsunifi_list_clients/unifi_get_client_detailsunifi_list_networks/unifi_get_network_detailsunifi_list_wlans/unifi_get_wlan_details
Security
unifi_list_firewall_rules/unifi_get_firewall_rule_detailsunifi_list_traffic_routes/unifi_get_route_detailsunifi_list_port_forwards/unifi_get_port_forward_detailsunifi_get_ips_status
Statistics
unifi_get_network_stats/unifi_get_system_healthunifi_get_client_stats/unifi_get_device_statsunifi_get_top_clients/unifi_get_dpi_statsunifi_get_alerts
Migration
unifi_get_dhcp_statusunifi_verify_vlan_connectivityunifi_export_configuration
Docker
docker-compose up -dSee docs/DOCKER.md for details.
Development
# Clone and install
git clone https://github.com/MidwestMountaineer/Unifi-MCP-Server.git
cd Unifi-MCP-Server
pip install -e ".[dev]"
# Run tests
pytest
# Dev console
python devtools/dev_console.pyTroubleshooting
Issue | Solution |
Connection refused | Check |
401 Unauthorized | Regenerate API key with correct permissions |
SSL errors | Set |
Empty results | Check |
License
MIT - See LICENSE
Available Tools
41 toolsunifi_export_configurationA
Export network configuration for backup (without credentials by default)
Inputs: include_wlans, include_routing, include_networks, include_credentials, +2 more.
unifi_get_acl_ruleB
Get detailed information about a specific ACL rule
Inputs: rule_id (required).
unifi_get_acl_rule_orderingB
Get ACL rule evaluation ordering
Inputs: no named parameters.
unifi_get_alertsB
Get recent system alerts and events
Inputs: limit.
unifi_get_app_infoA
Get UniFi Network application version information
Inputs: no named parameters.
unifi_get_client_detailsC
Get detailed information about a specific connected client
Inputs: mac_address (required).
unifi_get_client_statsB
Get statistics for a specific client
Inputs: mac_address (required).
unifi_get_device_detailsB
Get detailed information about a specific UniFi device
Inputs: device_id (required).
unifi_get_device_statsC
Get statistics for a specific device
Inputs: device_id (required).
unifi_get_dhcp_statusA
Get DHCP server status and lease information
Inputs: network_id.
unifi_get_dns_policyA
Get detailed information about a specific DNS policy
Inputs: policy_id (required).
unifi_get_dpi_statsC
Get deep packet inspection statistics
Inputs: no named parameters.
unifi_get_firewall_policy_orderingB
Get firewall policy evaluation ordering for a source/destination zone pair
Inputs: source_zone_id (required), destination_zone_id (required).
unifi_get_firewall_rule_detailsC
Get detailed information about a specific firewall policy
Inputs: policy_id (required).
unifi_get_firewall_zoneB
Get detailed information about a specific firewall zone
Inputs: zone_id (required).
unifi_get_ips_statusB
Get intrusion prevention system status and alerts
Inputs: alert_limit, include_alerts.
unifi_get_network_detailsC
Get detailed information about a specific network
Inputs: network_id (required).
unifi_get_network_referencesB
Get a list of resources that reference a specific network
Inputs: network_id (required).
unifi_get_network_statsC
Get overall network statistics and health
Inputs: no named parameters.
unifi_get_port_forward_detailsB
Get detailed information about a specific port forward
Inputs: forward_id (required).
unifi_get_route_detailsC
Get detailed information about a specific traffic route
Inputs: route_id (required).
unifi_get_system_healthC
Get overall system health metrics
Inputs: no named parameters.
unifi_get_top_clientsB
List clients by bandwidth usage
Inputs: limit.
unifi_get_traffic_matching_listB
Get detailed information about a specific traffic matching list
Inputs: list_id (required).
unifi_get_wlan_detailsA
Get detailed information about a specific WiFi broadcast
Inputs: wlan_id (required).
unifi_list_acl_rulesB
List all switch-level ACL rules including IPv4 and MAC rules
Inputs: limit, filter, offset.
unifi_list_clientsB
List all connected clients across the network with optional filtering
Inputs: page, limit, filter, offset, +2 more.
unifi_list_devicesB
List all UniFi devices (switches, APs, gateways) with optional filtering
Inputs: page, limit, filter, offset, +2 more.
unifi_list_dns_policiesB
List all DNS filtering policies configured on the Dream Machine
Inputs: limit, filter, offset.
unifi_list_firewall_rulesB
List all firewall policies (zone-based rules) configured on the Dream Machine
Inputs: limit, filter, offset.
unifi_list_firewall_zonesA
List all firewall zones including system-defined and user-defined zones
Inputs: limit, filter, offset.
unifi_list_networksB
List all configured networks and VLANs
Inputs: limit, filter, offset.
unifi_list_port_forwardsC
List all port forwarding rules
Inputs: page, page_size, enabled_only.
unifi_list_sitesB
List all local sites including each site's UUID and name
Inputs: limit, filter, offset.
unifi_list_traffic_matching_listsB
List all traffic matching lists (reusable traffic pattern definitions)
Inputs: limit, filter, offset.
unifi_list_traffic_routesC
List all traffic routing rules
Inputs: page, page_size, enabled_only.
unifi_list_vpn_serversB
List all VPN server configurations
Inputs: limit, filter, offset.
unifi_list_vpn_tunnelsB
List all site-to-site VPN tunnels
Inputs: limit, filter, offset.
unifi_list_wan_interfacesB
List all WAN interfaces configured on the Dream Machine
Inputs: limit, filter, offset.
unifi_list_wlansB
List all configured WiFi broadcasts (wireless networks)
Inputs: limit, filter, offset.
unifi_verify_vlan_connectivityC
Verify connectivity across VLANs based on firewall rules
Inputs: source_vlan (required), destination_vlan (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 41 tools
Each tool has a clearly distinct purpose, with consistent verb prefixes ('get_' for details, 'list_' for collections, 'export_' and 'verify_' for unique actions). The descriptions provide enough detail to differentiate between similar resources (e.g., network details vs. stats vs. references).
All tools follow a consistent 'unifi_verb_noun' pattern with 'get_' for single item details and 'list_' for collections. No mixing of naming conventions or camelCase, making the set predictable and easy to navigate.
With 41 tools, the count exceeds the 25+ threshold for 'too many' in the calibration. While each tool may serve a specific resource, the sheer number increases cognitive load for the agent and suggests possible over-fragmentation.
The tool set covers a wide range of read operations (get, list, export, verify) but lacks any create, update, or delete functionality. This is a significant gap for a management server, as agents cannot perform any state-changing actions, leading to dead ends.
Maintenance
Related MCP Connectors
Read-only AI access to HAVN properties, leads, tasks, files, media, and analytics.
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
Ask your AI about your Airbnb and VRBO listings, bookings, guest messages and reviews. Read-only.
Related MCP Servers
- AlicenseDqualityNot gradedmaintenanceEnables comprehensive management of UniFi network infrastructure through the UniFi Cloud API, including device control, client management, camera settings, and access door control through natural language.39MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to manage UniFi network infrastructure through 50+ tools covering devices, clients, networks, WiFi, firewall rules, and guest access using the official UniFi Network API.525MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to manage and monitor UniFi network infrastructure through natural language, providing 46 management tools across device, client, WiFi, network, firewall, port forwarding, monitoring, and site management.1MIT
- AlicenseBqualityDmaintenanceProvides 170+ tools to manage UniFi networks via the internal controller API, enabling AI assistants to perform full network management including clients, devices, WLANs, firewall, and more.64MIT