Sponsored by Deepsite.site

Unifi MCP Server

Created By
enuno2 months ago
https://github.com/enuno/unifi-mcp-server
Content

Features

Core Capabilities

  • Device Management: List, monitor, restart, locate, and upgrade UniFi devices (APs, switches, gateways)
  • Network Configuration: Create, update, and delete networks, VLANs, and subnets with DHCP configuration
  • Client Management: Query, block, unblock, and reconnect clients
  • Firewall Rules: Create, update, and delete firewall rules with traffic filtering
  • WiFi/SSID Management: Create and manage wireless networks with WPA2/WPA3, guest networks, and VLAN isolation
  • Port Forwarding: Configure port forwarding rules for external access
  • DPI Statistics: Deep Packet Inspection analytics for bandwidth usage by application and category
  • Multi-Site Support: Work with multiple UniFi sites seamlessly
  • Real-time Monitoring: Access device, network, client, and WiFi statistics

Advanced Features

  • Redis Caching: Optional Redis-based caching for improved performance (configurable TTL per resource type)
  • Webhook Support: Real-time event processing with HMAC signature verification
  • Automatic Cache Invalidation: Smart cache invalidation when configuration changes
  • Event Handlers: Built-in handlers for device, client, and alert events

Safety & Security

  • Confirmation Required: All mutating operations require explicit confirm=True flag
  • Dry-Run Mode: Preview changes before applying them with dry_run=True
  • Audit Logging: All operations logged to audit.log for compliance
  • Input Validation: Comprehensive parameter validation with detailed error messages
  • Password Masking: Sensitive data automatically masked in logs
  • Type-Safe: Full type hints and Pydantic validation throughout
  • Security Scanners: CodeQL, Trivy, Bandit, Safety, and detect-secrets integration

Technical Excellence

  • Async Support: Built with async/await for high performance and concurrency
  • MCP Protocol: Standard Model Context Protocol for AI agent integration
  • Comprehensive Testing: 105 unit tests with detailed coverage reporting
  • CI/CD Pipelines: Automated testing, security scanning, and Docker builds
  • Multi-Architecture: Docker images for amd64 and arm64

Quick Start

Prerequisites

  • Python 3.10 or higher
  • A UniFi account at unifi.ui.com
  • UniFi API key (obtain from Settings → Control Plane → Integrations)
  • Access to UniFi Cloud API or local gateway

Installation

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone the repository
git clone https://github.com/enuno/unifi-mcp-server.git
cd unifi-mcp-server

# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"

Using pip

# Clone the repository
git clone https://github.com/enuno/unifi-mcp-server.git
cd unifi-mcp-server

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -e ".[dev]"

Using Docker

# Pull the image
docker pull ghcr.io/enuno/unifi-mcp-server:latest

# Run the container (Cloud API)
docker run -d \
  -e UNIFI_API_KEY=your-api-key \
  -e UNIFI_API_TYPE=cloud \
  -p 3000:3000 \
  ghcr.io/enuno/unifi-mcp-server:latest

# OR run with local gateway proxy
docker run -d \
  -e UNIFI_API_KEY=your-api-key \
  -e UNIFI_API_TYPE=local \
  -e UNIFI_HOST=192.168.1.1 \
  -p 3000:3000 \
  ghcr.io/enuno/unifi-mcp-server:latest

Server Config

{
  "mcpServers": {
    "unifi": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_API_KEY=$API_KEY",
        "-e",
        "UNIFI_API_TYPE=cloud",
        "ghcr.io/enuno/unifi-mcp-server:latest"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
CursorThe AI Code Editor
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Amap Maps高德地图官方 MCP Server
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
DeepChatYour AI Partner on Desktop
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbot™
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。