UnifiyMe
UnifiyMe is an MCP server that lets you monitor, manage, and control UniFi network infrastructure through LLMs, with additional Discord, Prometheus, and Docker integrations.
Monitor network health: Get overall status, device/client lists, bandwidth stats, topology, alarms, DPI stats, WLAN/network configs, firmware status, firewall rules/groups, and recent events.
Manage clients: Block/unblock, force reconnect, search history, set aliases/notes, assign user groups, and create bandwidth-limited user groups.
Control devices physically: Reboot devices, power-cycle PoE ports, and flash LEDs for locating.
Create guest WiFi vouchers on demand.
Run deep diagnostics: Perform network deep dives, fetch router logs, and execute SSH commands directly on the router.
Enforce specialized policies: Block/unblock YouTube for restricted devices, detect/migrate IoT devices, throttle IoT traffic, and protect VIP devices.
Manage firewall and traffic rules: Read/create/update/delete firewall groups, port forwarding rules, traffic rules, and complex match-based rules.
Manage tags on clients and devices.
Integrate with external tools: Discord bot management, Prometheus metrics export, Grafana dashboards, and Docker Compose deployment.
Pre-configured Caddy integration for automated TLS/HTTPS termination.
Manage and monitor your network directly from Discord.
Run the entire stack (UnifiyMe, Prometheus, Grafana) using Docker Compose.
Pre-configured dashboards for visualizing network health and performance.
Export UniFi metrics to Prometheus for long-term monitoring and alerting.
Specialized tools for managing YouTube access via UniFi firewall rules.
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., "@UnifiyMe Show me the current network health"
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.
UnifiyMe

A Model Context Protocol (MCP) server for UniFi Network Controllers. This server allows you to interact with your UniFi network infrastructure through LLMs, providing both high-level monitoring and deep system-level control.
Features
Network Monitoring: Quick overview of devices, clients, and site health.
Client Management: Block/unblock clients, force reconnections, and search historical connection data.
Physical Control: Power cycle PoE ports and flash device LEDs for easy location.
Advanced Analytics: Deep Packet Inspection (DPI) stats, subsystem health, and alarm tracking.
Guest Access: Create guest WiFi vouchers on the fly.
SSH Diagnostics: Execute commands directly on the router and fetch system logs for deep troubleshooting.
Discord Integration: Manage and monitor your network directly from Discord.
Prometheus Exporter: Export UniFi metrics to Prometheus for long-term monitoring and alerting.
Grafana Dashboards: Pre-configured dashboards for visualizing network health and performance.
Restricted YouTube Blocker: Specialized tools for managing YouTube access via UniFi firewall rules.
Related MCP server: UniFi MCP Server
Optimization
This server includes specialized optimizations for UniFi controllers:
Monkey-patched Session Management: Reduces redundant heartbeat checks, cutting request overhead by up to 50%.
Intelligent Caching: 10-second TTL cache for frequent lookups to improve responsiveness and reduce controller load.
Reliability & Security
Persistence Layer: Automated background monitoring ensures that critical traffic rules (like YouTube blocking) are re-enforced every 60 seconds if they are tampered with.
Health Monitoring: Integrated
/healthendpoint and Docker health checks ensure maximum uptime and automated container recovery.API Hardening: All Gateway actions are strictly validated with MAC address regex and required field checks.
Secure Reverse Proxy: Pre-configured Caddy integration for automated TLS/HTTPS termination.
Setup
Clone the repository.
Install dependencies:
npm installCreate a
.envfile with your UniFi credentials:UNIFI_HOST=https://your-unifi-controller-ip UNIFI_USERNAME=your-username UNIFI_PASSWORD=your-password UNIFI_SITE=default # Optional: SSH Credentials for diagnostics SSH_HOST=192.168.1.1 SSH_USERNAME=root SSH_PASSWORD=your-ssh-password # Optional: Discord Bot Configuration DISCORD_TOKEN=your-discord-bot-token DISCORD_CLIENT_ID=your-discord-client-idBuild the project:
npm run build
Usage
1. Installation via npm (Published)
This is the recommended way for most users. You can run the server directly using npx in your Claude Desktop configuration.
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"unifyme": {
"command": "npx",
"args": ["-y", "unifiyme"],
"env": {
"UNIFI_HOST": "https://<CONTROLLER-IP>",
"UNIFI_USERNAME": "<YOUR-USERNAME>",
"UNIFI_PASSWORD": "<YOUR-PASSWORD>",
"UNIFI_SITE": "default"
}
}
}
}2. Local Development Setup
If you prefer to run from source or are contributing:
Clone the repository.
Install dependencies:
npm installBuild the project:
npm run buildUse the following config:
{
"mcpServers": {
"unifyme": {
"command": "node",
"args": ["/path/to/UnifiyMe/dist/index.js"],
"env": {
"UNIFI_HOST": "...",
"UNIFI_USERNAME": "...",
"UNIFI_PASSWORD": "...",
"UNIFI_SITE": "default"
}
}
}
}Discord Bot
To start the Discord bot:
npm run start # If built
# OR
npm run dev # For developmentPrometheus Exporter
The server automatically starts a Prometheus exporter on port 9090 (configurable). Metrics are available at /metrics.
Docker Support
You can run the entire stack (UnifiyMe, Prometheus, Grafana) using Docker Compose:
docker-compose up -dTools
Monitoring & Discovery
get_network_status: Get overall network health and status.list_devices: List all network devices (APs, switches, gateways).list_clients: List all connected network clients.get_device_details: Get detailed information about a specific device.search_network: Search for devices or clients by IP, MAC, hostname, or alias.get_bandwidth_stats: Get top bandwidth consumers.get_network_topology: Get network topology (simplified view of uplinks).get_client_history: Search historical client data.get_network_health: Get detailed subsystem health status.get_alarms: List recent alerts and IPS/IDS events.get_dpi_stats: Get application usage statistics.get_wlan_config: Get WiFi network configurations (SSIDs, security, etc.).get_network_config: Get logical network configurations (VLANs, subnets, DHCP).get_firmware_status: Check for available firmware updates across all devices.get_firewall_rules: Get all configured firewall rules.get_firewall_groups: Get all configured firewall groups (IP, Port).get_deep_dive: Perform a deep dive into network health, DPI stats, and active client traffic.get_events: Get recent network events.
Control & Management
reboot_device: Restart a device by MAC address.cycle_poe_port: Power cycle a PoE port on a switch.locate_device: Flash/Stop flashing the LED on a device.block_client/unblock_client: Manage network access for clients.reconnect_client: Force a client to reconnect.create_voucher: Create guest WiFi vouchers.set_client_user_group: Assign a client to a specific user group (for throttling).create_user_group: Create a new user group with bandwidth limits.
Specialized Management
block_restricted_youtube/unblock_restricted_youtube: Manage YouTube access for Restricted devices.get_restricted_youtube_status: Check current YouTube blocking status for Restricted.detect_iot_devices: Identify potential IoT devices not on the IoT VLAN.migrate_iot_devices: Propose migration of detected IoT devices to a target network.enforce_iot_limits: Throttle high-bandwidth IoT devices.protect_vips: Ensure VIP devices are not throttled.ensure_traffic_rule: Create or update complex traffic rules.
Diagnostics (SSH)
run_ssh_command: Execute a command directly on the router.get_router_logs: Fetch system logs from the router.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines on how to report issues, suggest features, and submit pull requests.
License
This project is licensed under the MIT License.
Available Tools
51 toolsblock_clientB
Block a client device from the network
Inputs: mac (required).
block_restricted_youtubeA
Block YouTube for all Restricted devices
Inputs: no named parameters.
create_user_groupC
Create a new user group with bandwidth limits
Inputs: name (required), up, down.
create_voucherB
Create a guest WiFi voucher
Inputs: minutes (required), note, count.
cycle_poe_portB
Power cycle a PoE port on a switch
Inputs: mac (required), port (required).
delete_port_forward_ruleA
Delete a port forwarding rule by id.
Inputs: id (required).
delete_traffic_ruleA
Delete a traffic rule by id.
Inputs: id (required).
detect_iot_devicesC
Identify potential IoT devices that are not on the IoT VLAN
Inputs: iotVlanId.
enforce_iot_limitsC
Throttle high-bandwidth IoT devices
Inputs: thresholdMbps.
ensure_port_forward_ruleC
Create or update a port forwarding rule
Inputs: fwd (required), src (required), name (required), proto (required), +3 more.
ensure_traffic_ruleC
Create or update a complex traffic rule
Inputs: action (required), description (required), matching_target (required), enabled, +4 more.
get_alarmsB
List recent network alarms and threats
Inputs: limit, archived.
get_bandwidth_statsC
Get top bandwidth consumers
Inputs: limit.
get_client_detailsB
Get comprehensive details about a specific network client
Inputs: mac (required).
get_client_dpiC
Get Deep Packet Inspection (DPI) statistics for a specific client
Inputs: mac (required), limit.
get_client_historyB
Search for clients in the controller history
Inputs: query (required), hours.
get_deep_diveC
Perform a deep dive into network health, DPI stats, and active client traffic
Inputs: no named parameters.
get_device_detailsB
Get detailed information about a specific device
Inputs: mac (required).
get_dpi_statsC
Get Deep Packet Inspection (DPI) statistics for applications
Inputs: limit.
get_eventsC
Get recent network events
Inputs: hours.
get_firewall_groupsA
Get all configured firewall groups (IP, Port)
Inputs: no named parameters.
get_firewall_rulesB
Get all configured firewall rules
Inputs: no named parameters.
get_firmware_statusA
Check for available firmware updates across all devices
Inputs: no named parameters.
get_network_configA
Get logical network configurations (VLANs, subnets, DHCP)
Inputs: no named parameters.
get_network_healthB
Get detailed health status of network subsystems
Inputs: no named parameters.
get_network_statusB
Get overall network health and status
Inputs: no named parameters.
get_network_topologyB
Get network topology (simplified view of uplinks)
Inputs: no named parameters.
get_port_forward_rulesA
Get all configured port forwarding rules
Inputs: no named parameters.
get_restricted_youtube_statusA
Check if YouTube is currently blocked for Restricted devices
Inputs: no named parameters.
get_router_logsA
Fetch recent system logs from the router via SSH
Inputs: lines, filter.
get_traffic_rulesA
List all traffic rules (the modern unified rule system used by ensure_traffic_rule).
Inputs: no named parameters.
get_wlan_configB
Get WiFi network configurations (SSIDs, security, etc.)
Inputs: no named parameters.
list_clientsC
List all connected network clients
Inputs: search, status.
list_devicesA
List all network devices (APs, switches, gateways)
Inputs: site, type.
list_device_tagsA
List all tags currently applied to clients and devices, with counts and where they are used
Inputs: no named parameters.
list_user_groupsA
List existing user groups with IDs, bandwidth limits, and member counts
Inputs: no named parameters.
locate_deviceA
Flash the LED on a device to locate it
Inputs: mac (required), enable.
migrate_iot_devicesB
Propose migration of detected IoT devices to a target network
Inputs: targetNetworkId (required), dryRun.
protect_vipsC
Ensure VIP devices are not throttled
Inputs: defaultGroupId (required).
reboot_deviceC
Restart a Unifi device
Inputs: mac (required).
reconnect_clientA
Force a client to reconnect (useful for roaming)
Inputs: mac (required).
run_ssh_commandC
Execute a command directly on the router via SSH
Inputs: command (required).
search_networkB
Search for devices or clients by IP, MAC, hostname, or alias
Inputs: query (required).
set_client_aliasA
Set the friendly name (alias) on a client by MAC. This is the UniFi "name" field that overrides hostname.
Inputs: mac (required), name (required).
set_client_noteA
Set the freeform note field on a client by MAC
Inputs: mac (required), note (required).
set_client_user_groupA
Assign a client to a specific user group (for throttling)
Inputs: group_id (required), client_id (required).
set_device_tagsA
Set the tags array on a client or device by MAC. Replaces all existing tags. Auto-detects client vs device by MAC.
Inputs: mac (required), tags (required), target.
unblock_clientB
Unblock a previously blocked client device
Inputs: mac (required).
unblock_restricted_youtubeA
Unblock YouTube for all Restricted devices
Inputs: no named parameters.
update_port_forward_ruleA
Update an existing port forwarding rule by id. Pass any subset of fields to patch.
Inputs: id (required), payload (required).
update_traffic_ruleA
Update an existing traffic rule by id. Pass any subset of fields to patch.
Inputs: id (required), payload (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 51 tools
Multiple tools have unclear boundaries, especially between get_network_status, get_network_health, and get_deep_dive, as well as between get_bandwidth_stats, get_dpi_stats, and get_client_dpi. The ensure_ vs update_ rule pairs also overlap in purpose, making it easy for an agent to pick the wrong tool.
Most tools follow a readable verb_noun pattern, but read operations inconsistently mix get_, list_, and search_. The ensure_ and update_ rule tools are also semantically redundant in naming, though the overall style is still understandable.
With 51 tools, this server is extremely large and unwieldy for an agent to navigate. Many health, DPI, client, and rule-management operations could be consolidated, and the sheer count creates significant selection overhead.
Read coverage is broad: status, topology, devices, clients, configs, firewall rules, port forwards, traffic rules, groups, and tags are all present. However, several lifecycle gaps exist, including no create/update/delete for Wi-Fi or network configs, no update/delete for firewall rules or user groups, no firmware upgrade action, and no voucher management beyond creation.
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that turns Claude into a UniFi network specialist. Manage devices, optimize WiFi, audit security, and troubleshoot your network through natural language.3117 npm2MIT
- AlicenseAqualityDmaintenanceControl your UniFi network via AI with a lightweight 2-tool MCP server that supports both cloud and local UniFi controllers.313 npmMIT
- AlicenseBqualityDmaintenanceAn MCP server that enables AI assistants to manage UniFi network infrastructure, including cloud management, local network devices, and Protect cameras, through natural language.621MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for UniFi Network Controller enabling AI assistants to manage UniFi infrastructure via natural language. It supports firewall rules, IPv6, and uses lazy/eager tool modes to minimize context usage.6Mozilla Public 2.0