unifi-udm-pro-mcp

unifi-udm-pro-mcp

A high-performance MCP server for Ubiquiti UniFi Dream Machine (UDM Pro/SE) and UniFi OS Cloud Gateways, connecting directly to the local REST API using native API keys to provide 40 tools for managing Wi-Fi, VLANs, firewall rules, port forwarding, switch ports, guest vouchers, QoS, clients, and devices—all with 2FA bypass and ultra-low latency.

Category
访问服务器

README

UniFi UDM Pro MCP Server (unifi-udm-pro-mcp)

CI License: MIT MCP Protocol Node.js GitHub stars

A high-performance, native Model Context Protocol (MCP) server for Ubiquiti UniFi Dream Machine (UDM / UDM Pro / UDM SE) and UniFi OS Cloud Gateways.

Unlike legacy UniFi MCP implementations that rely on cloud session cookies, username/passwords, or 2FA tokens, this MCP server connects directly to your local UDM Pro REST API using native Local API Keys (X-API-KEY).


Key Features

  • ⚡ Ultra-Low Latency (10–30ms): Direct local LAN communication over HTTPS (https://192.168.1.1).
  • 🔐 100% 2FA-Bypass & Continuous Uptime: Uses native UniFi API Keys. Sessions never expire or prompt for 2FA.
  • 🛠️ 40 Comprehensive Tools: Complete CRUD (Create, Read, Update, Delete) coverage across Wi-Fi, VLANs, Firewall, Port Forwarding, Switch Ports, Guest Vouchers, QoS, and Devices.
  • 🔏 Safe SSL Handling: Natively handles local self-signed SSL certificates without extra environment hacks.
  • 🔒 Privacy-First: 100% local execution. No cloud proxies or external data telemetry.

Available MCP Tools (40 Tools)

1. System & Subsystems

  • unifi_get_sysinfo - UDM Pro console OS version, build, timezone, uptime.
  • unifi_get_health - Subsystem health (WAN 1/2, LAN, WLAN, VPN, ISP speed, CPU/RAM).
  • unifi_list_sites - List all sites managed by controller.
  • unifi_list_events - Recent network events and security logs.
  • unifi_list_alarms - Active security alarms.
  • unifi_run_speedtest - Trigger WAN speed test on UDM Pro gateway.

2. Device Administration

  • unifi_list_devices - Inventory of access points, switches, gateways, IP, MAC, status.
  • unifi_reboot_device - Restart AP, Switch, or Gateway by MAC address.
  • unifi_upgrade_device - Trigger firmware upgrade by MAC address.
  • unifi_locate_device - Flash physical locator LED on AP or Switch.
  • unifi_power_cycle_port - Power cycle PoE switch port by MAC and port index.

3. Client Devices & Control

  • unifi_list_clients - Real-time active clients, IP/MAC, signal, rx/tx bandwidth.
  • unifi_get_all_clients_history - Historical record of all clients ever connected (100+ devices).
  • unifi_set_client_name - Assign custom alias name to client device.
  • unifi_set_client_fixed_ip - Assign static/fixed IP to client device.
  • unifi_set_client_usergroup - Assign QoS bandwidth limit profile to client.
  • unifi_block_client - Block client by MAC address.
  • unifi_unblock_client - Unblock client by MAC address.
  • unifi_reconnect_client - Force client to reconnect to nearest AP.
  • unifi_forget_client - Remove offline client record from database.

4. Wi-Fi / WLAN (Full CRUD)

  • unifi_list_wlans - List SSIDs, WPA passphrases, bands, enabled status.
  • unifi_create_wlan - Create new Wi-Fi network.
  • unifi_update_wlan - Update Wi-Fi settings.
  • unifi_delete_wlan - Delete Wi-Fi network.
  • unifi_set_wlan_password - Instantly change WPA passphrase for SSID.
  • unifi_set_wlan_status - Enable or disable Wi-Fi network on demand.

5. Networks & VLANs (Full CRUD)

  • unifi_list_networks - List subnets, VLANs, gateway IPs, DHCP ranges.
  • unifi_create_network - Create new network subnet / VLAN.
  • unifi_update_network - Update subnet settings.
  • unifi_delete_network - Delete subnet / VLAN.

6. Firewall & Security (Full CRUD)

  • unifi_list_firewall_rules - List active firewall rules.
  • unifi_create_firewall_rule - Create firewall rule (accept/drop/reject).
  • unifi_delete_firewall_rule - Delete firewall rule by ID.
  • unifi_list_firewall_groups - List IP & Port groups.
  • unifi_create_firewall_group - Create IP or Port group.

7. Port Forwarding (Full CRUD)

  • unifi_list_port_forwards - List port forwarding rules.
  • unifi_create_port_forward - Create port forward rule (WAN -> LAN).
  • unifi_delete_port_forward - Delete port forward rule.

8. Hotspot & QoS

  • unifi_list_vouchers - List active guest hotspot vouchers.
  • unifi_create_voucher - Create new guest vouchers by duration/count.
  • unifi_revoke_voucher - Revoke guest voucher.
  • unifi_list_user_groups - List bandwidth limit profiles.
  • unifi_create_user_group - Create bandwidth limit profile (QoS max up/down).

Quick Start

Option 1: npx (Recommended)

No installation needed:

UNIFI_HOST=https://192.168.1.1 UNIFI_API_KEY=your_key npx unifi-udm-pro-mcp

Option 2: Docker

docker run -e UNIFI_HOST=https://192.168.1.1 -e UNIFI_API_KEY=your_key ghcr.io/rodolfoconcepcion/unifi-udm-pro-mcp

Option 3: Manual Install

git clone https://github.com/rodolfoconcepcion/unifi-udm-pro-mcp.git
cd unifi-udm-pro-mcp
npm install
UNIFI_HOST=https://192.168.1.1 UNIFI_API_KEY=your_key node index.js

Configuration

Claude Desktop / Antigravity

Add to claude_desktop_config.json or Antigravity MCP settings:

{
  "mcpServers": {
    "unifi-udm-pro": {
      "command": "npx",
      "args": ["-y", "unifi-udm-pro-mcp"],
      "env": {
        "UNIFI_HOST": "https://192.168.1.1",
        "UNIFI_API_KEY": "YOUR_UNIFI_LOCAL_API_KEY"
      }
    }
  }
}

VS Code (GitHub Copilot)

Add to your project's .vscode/mcp.json or user settings:

{
  "servers": {
    "unifi-udm-pro": {
      "command": "npx",
      "args": ["-y", "unifi-udm-pro-mcp"],
      "env": {
        "UNIFI_HOST": "https://192.168.1.1",
        "UNIFI_API_KEY": "YOUR_UNIFI_LOCAL_API_KEY"
      }
    }
  }
}

Cursor / Windsurf

Add to your MCP settings (Settings → MCP Servers):

{
  "mcpServers": {
    "unifi-udm-pro": {
      "command": "npx",
      "args": ["-y", "unifi-udm-pro-mcp"],
      "env": {
        "UNIFI_HOST": "https://192.168.1.1",
        "UNIFI_API_KEY": "YOUR_UNIFI_LOCAL_API_KEY"
      }
    }
  }
}

How to Obtain a UniFi API Key

  1. Log into your UniFi Console (https://192.168.1.1/).
  2. Go to Control Plane Settings → Integrations (or API Keys).
  3. Click Add API Key and copy the generated key.

Contributing

See CONTRIBUTING.md for guidelines.

Security

See SECURITY.md for vulnerability reporting.

License

MIT License - See LICENSE for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选