unifi-network-mcp
MCP server providing typed, safety-gated access to UniFi Network consoles via the official API, enabling management of devices, clients, networks, WiFi, firewall policies, and more.
README
unifi-network-mcp
MCP server for the official UniFi Network Integration API.
Gives AI assistants (Claude, and any MCP-compatible client) typed, safety-gated access to your UniFi Network console: devices, clients, networks, WiFi, firewall policies and zones, ACL rules, DNS policies, traffic matching lists, hotspot vouchers, switching views, and supporting resources — the complete documented v10.4.57 surface, 73 operations behind 15 tools.
Community project. Not affiliated with, endorsed by, or supported by Ubiquiti Inc. "UniFi" is used only to describe what this software connects to.
Quick start (cloud, recommended)
One API key, every console you manage — no VPN, no console IPs, no self-signed certificates.
- Create an API key: sign in at unifi.ui.com → Settings → API Keys → Create New API Key. Store it securely — it is shown once.
- Add the server to your MCP client. For Claude Desktop (
claude_desktop_config.json):
{
"mcpServers": {
"unifi-network": {
"command": "npx",
"args": ["-y", "@zenixsolutions/unifi-network-mcp"],
"env": {
"UNIFI_API_KEY": "<your API key>"
}
}
}
}
- Ask your assistant something like "list my UniFi consoles", then "list the clients at Acme HQ". With several consoles visible, the assistant is shown the list and picks a
consoleIdper action (ADR-002); with exactly one, it is used automatically. Calls route through Ubiquiti's documented Site Manager Connector onapi.ui.com.
Quick start (direct to one console)
Point the server at a single console instead by adding:
"UNIFI_CONSOLE_URL": "https://192.168.1.1",
"UNIFI_INSECURE": "1"
(UNIFI_INSECURE=1 accepts the console's default self-signed certificate — warned on start; see SECURITY.md.)
Configuration
| Variable | Required | Meaning |
|---|---|---|
UNIFI_API_KEY |
yes | API key from unifi.ui.com. Sent as the X-API-KEY header. |
UNIFI_CONSOLE_URL |
no | When set: direct mode against that console (integration path appended automatically; a full api.ui.com connector base also works). When unset: cloud multi-console mode via api.ui.com. |
UNIFI_INSECURE |
no | Direct mode only: set to 1 to accept a self-signed console certificate (warned on every start). Ignored in cloud mode. |
Verify a configuration without connecting a client:
npx -y @zenixsolutions/unifi-network-mcp --check # exit 0 ok, 78 misconfigured
npx -y @zenixsolutions/unifi-network-mcp --list-tools
npx -y @zenixsolutions/unifi-network-mcp --version
The tool surface
16 tools cover all 73 documented operations (measured tools/list cost: ≈7,500 tokens). Each resource area is one tool with an operation argument:
unifi_info, unifi_sites, unifi_devices, unifi_clients, unifi_networks, unifi_wifi_broadcasts, unifi_firewall_policies, unifi_firewall_zones, unifi_acl_rules, unifi_dns_policies, unifi_traffic_matching_lists, unifi_vouchers, unifi_switching, unifi_supporting — plus unifi_spec (the vendor's exact request/response schema for any operation) and unifi_consoles (cloud-mode console discovery; every tool takes an optional consoleId).
Full per-operation reference: docs/tools.md.
Safety model
- Every operation is classified Read / Create / Update / Admin / Destructive in its tool description.
- Destructive (all deletes, device removal) and Admin (device restart, PoE power-cycle, guest authorization) operations require
confirm: truein the call — an assistant cannot trigger them by accident. - Request bodies are validated locally against Ubiquiti's own published OpenAPI schemas before anything is sent.
- The real write control is your API key's permissions — scope the key in unifi.ui.com to what you actually want an assistant to do. The server adds friction, not authorization.
- The API key is never logged and is redacted from every error message.
Documentation
- docs/tools.md — tool and operation reference
- docs/compatibility.md — clients, controller versions, transports, known limitations
- docs/reference/openapi.json — the committed vendor contract (v10.4.57) this build is generated from
- SECURITY.md — security posture, residual risks, reporting
- CHANGELOG.md — release notes
Development
npm install
npm run generate # regenerate op map from docs/reference/openapi.json
npm run typecheck && npm run lint && npm test
npm run build
npm run check:budget # measured tools/list token budget (CI-enforced)
UNIFI_CONSOLE_URL=... UNIFI_API_KEY=... npm run test:contract # live, read-only
See CONTRIBUTING.md. Governance follows the Engineering OS framework; the foundation decisions are recorded in docs/rfc/RFC-004-unifi-network-mcp-foundation.md.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。