UniFi MCP Server

UniFi MCP Server

Enables AI assistants to manage and monitor UniFi Network Controllers through natural language. Provides 25 read-only tools for discovering devices and clients, viewing security configurations, analyzing network statistics, and exporting configuration data.

Category
访问服务器

README

UniFi MCP Server

MCP server for UniFi Network Controller - manage your network with AI assistants using natural language.

Python 3.11+ MCP License: MIT

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

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.git

2. Get API Key

  1. Log into your Dream Machine
  2. SettingsSystemAdvancedAPI
  3. Create new API key with Read Only permissions
  4. 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-Server

See POWER.md for workflow documentation.

Configuration

Variable Description Default
UNIFI_HOST Controller IP (required)
UNIFI_API_KEY API key (required for UniFi OS)
UNIFI_USERNAME Username (for traditional controllers)
UNIFI_PASSWORD Password (for traditional controllers)
UNIFI_PORT Controller port 443
UNIFI_SITE Site name default
UNIFI_VERIFY_SSL Verify SSL false
LOG_LEVEL Log verbosity INFO

Available Tools

Discovery

  • unifi_list_devices / unifi_get_device_details
  • unifi_list_clients / unifi_get_client_details
  • unifi_list_networks / unifi_get_network_details
  • unifi_list_wlans / unifi_get_wlan_details

Security

  • unifi_list_firewall_rules / unifi_get_firewall_rule_details
  • unifi_list_traffic_routes / unifi_get_route_details
  • unifi_list_port_forwards / unifi_get_port_forward_details
  • unifi_get_ips_status

Statistics

  • unifi_get_network_stats / unifi_get_system_health
  • unifi_get_client_stats / unifi_get_device_stats
  • unifi_get_top_clients / unifi_get_dpi_stats
  • unifi_get_alerts

Migration

  • unifi_get_dhcp_status
  • unifi_verify_vlan_connectivity
  • unifi_export_configuration

Docker

docker-compose up -d

See 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.py

Troubleshooting

Issue Solution
Connection refused Check UNIFI_HOST and controller is reachable
401 Unauthorized Regenerate API key with correct permissions
SSL errors Set UNIFI_VERIFY_SSL=false
Empty results Check UNIFI_SITE name, upgrade API key to Full Management

License

MIT - See LICENSE

推荐服务器

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 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
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 模型以安全和受控的方式获取实时的网络信息。

官方
精选