mcp server
unifi-manager-mcp
UniFi Site Manager API MCP Server - A Model Context Protocol server for managing UniFi infrastructure at scale
Set up
Runs on your computer. Pick your agent and operating system.
This project does not publish an install method we can turn into a config. Follow the README instead.
README
synced Oct 23, 2026UniFi Manager MCP
Model Context Protocol (MCP) server for Ubiquiti UniFi Site Manager API integration. Monitor and manage your UniFi infrastructure at scale through an AI-powered interface.
Focused on: Site Manager API integration for monitoring hosts, devices, deployments, and network infrastructure at scale.
⚠️ Early Development Warning: This project is in early development and may contain bugs that could cause unexpected behavior. Use with caution.
⚠️ Prompt Injection Risk: You are responsible for guarding against prompt injection when using these tools. Exercise extreme caution or use MCP tools only on systems and data you trust.
Features
- Infrastructure Monitoring: Query and monitor hosts, devices, and deployments
- Site Management: Access detailed information about UniFi sites
- Deployment Overview: Track deployment status and configuration
- Device Discovery: List and query all managed devices
- API Key Authentication: Secure X-API-KEY header-based authentication
- Stdio Transport: MCP protocol over standard input/output for seamless integration
- HTTP Transport: Optional HTTP API for remote connections and integration
- Rate Limit Awareness: Built-in support for API rate limiting (10,000 req/min)
Quick Start
Installation
# Clone and build
git clone https://github.com/surrealwolf/unifi-manager-mcp.git
cd unifi-manager-mcp
go build -o bin/unifi-manager-mcp ./cmd
Configuration
Create a .env file:
UNIFI_API_KEY=your-api-key-here
LOG_LEVEL=info
MCP_TRANSPORT=stdio
Obtaining API Key
- Sign in to the UniFi Site Manager at https://unifi.ui.com
- Navigate to the API section from the left navigation bar
- Select "Create API Key"
- Copy the generated key and store it securely (displayed only once)
- Use the key in the
UNIFI_API_KEYenvironment variable
Running the Server
Stdio Transport (Default):
UNIFI_API_KEY=your-key ./bin/unifi-manager-mcp
HTTP Transport:
MCP_TRANSPORT=http MCP_HTTP_ADDR=:8000 UNIFI_API_KEY=your-key ./bin/unifi-manager-mcp
Then access the endpoints:
# Health check
curl http://localhost:8000/health
# MCP endpoint
curl -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/list"}'
Environment Variables:
UNIFI_API_KEY- API key from Site Manager (Required)MCP_TRANSPORT- Transport mode:stdio(default) orhttpMCP_HTTP_ADDR- HTTP server address (default::8000)LOG_LEVEL- Logging level: debug, info, warn, error (default: info)
Available Tools
Sites Management (3 tools)
list_sites- List all UniFi sitesget_site_details- Get detailed site informationget_site_overview- Get site overview and statistics
Hosts Management (3 tools)
list_hosts- List all hosts in the infrastructureget_host_details- Get detailed host informationget_host_by_site- Get hosts filtered by site
Devices Management (3 tools)
list_devices- List all managed devicesget_device_details- Get detailed device informationget_devices_by_site- Get devices filtered by site
Deployments Management (2 tools)
list_deployments- List all deploymentsget_deployment_details- Get detailed deployment information
Environment Variables
| Variable | Description | Default |
|---|---|---|
UNIFI_API_KEY | API key from Site Manager | Required |
MCP_TRANSPORT | Transport protocol (stdio/http) | stdio |
MCP_HTTP_ADDR | HTTP server address | :8000 |
LOG_LEVEL | Logging level | info |
Skills & Capabilities
This MCP implements the following domain-specific skills:
- Site Management - Manage and monitor UniFi sites across your account
- Infrastructure Management - Manage hosts and devices across all sites
- Deployment Management - Track and manage deployments across infrastructure
See .github/skills for detailed skill documentation.
API Reference
For detailed UniFi Site Manager API documentation, see:
- Official Documentation: https://developer.ui.com/site-manager-api/gettingstarted
- API Base URL: https://api.ui.com/v1
- Rate Limit: 10,000 requests per minute (v1 stable)
Development
Build
make build
Run Tests
make test
Run with Docker
make docker-build
make docker-run
License
MIT License - See LICENSE file for details
Support
For issues and questions:
- Check the UniFi Site Manager API Documentation
- Review tool examples in
docs/examples/
Built with Claude Haiku 4.5 - Crafted by AI to extend your infrastructure possibilities. 🤖✨