Install
$ agentstack add mcp-dataknifeai-unifi-network-mcp ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
UniFi Network MCP
Model Context Protocol (MCP) server for Ubiquiti UniFi Network management. Control and monitor your UniFi network infrastructure through an AI-powered interface.
Focused on: WiFi networks, clients, firewall, VPN, DPI, ACL rules, traffic shaping, and hotspot management.
⚠️ Early Development Warning: This project is in early development and may contain bugs that could cause unexpected behavior. Use with caution in production environments.
⚠️ 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
- 27 management tools for complete network control
- WiFi Network Management: Create, update, and monitor WiFi networks with detailed queries
- Firewall & Security: Manage firewall zones, ACL rules with detailed access control
- Traffic Control: Configure traffic rules and rate limiting
- VPN Management: Establish site-to-site tunnels with server management
- Hotspot Services: Manage guest WiFi vouchers with detailed tracking
- Deep Packet Inspection: Analyze DPI applications and categories
- Device Management: Monitor sites, devices, and client connections with health checks
- Network Configuration: Manage WAN config, device tags, and RADIUS profiles
- Stdio Transport: MCP protocol over standard input/output for seamless integration
- HTTP Transport: Optional HTTP API for remote connections and integration
Quick Start
Installation
# Clone and build
git clone https://github.com/surrealwolf/unifi-network-mcp.git
cd unifi-network-mcp
go build -o bin/unifi-network-mcp ./cmd
Configuration
Create a .env file:
UNIFI_BASE_URL=https://your-unifi-controller.com:8443
UNIFI_API_KEY=your-api-key-here
UNIFI_SKIP_SSL_VERIFY=false
LOG_LEVEL=info
Running the Server
### Running the Server
**Stdio Transport (Default):**
```bash
./bin/unifi-network-mcp
HTTP Transport:
MCP_TRANSPORT=http MCP_HTTP_ADDR=:8000 ./bin/unifi-network-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:
MCP_TRANSPORT: Set to"http"for HTTP transport (default:"stdio")MCP_HTTP_ADDR: HTTP server address (default::8000)
Available Tools (27 Total)
Network Site & Device Management (5 tools)
get_network_sites- List all network sitesget_site_details- Get detailed site informationget_site_devices- List devices in a specific siteget_device_details- Get detailed device informationget_connected_clients- List connected clients in a site
WiFi Networks (5 tools)
create_wifi_network- Create a new WiFi networkget_wifi_networks- List all WiFi networksget_wifi_network_detailed- Get detailed WiFi network informationupdate_wifi_network- Update WiFi network settingspatch_wifi_network- Patch specific WiFi network properties
Firewall & Security (6 tools)
get_firewall_zones- List firewall zonescreate_firewall_zone- Create a new firewall zonepatch_firewall_zone- Update firewall zone settingsget_acl_rules- List ACL rulescreate_acl_rule- Create an ACL rulepatch_acl_rule- Update ACL rule settings
Traffic & Performance (3 tools)
get_traffic_rules- List traffic matching rulescreate_traffic_rule- Create a traffic rulepatch_traffic_rule- Update traffic rule settings
Guest WiFi & Hotspot (2 tools)
get_hotspot_vouchers- List hotspot voucherscreate_hotspot_voucher- Generate guest access voucherspatch_hotspot_voucher- Update voucher settings
VPN & Remote Access (2 tools)
get_vpn_servers- List VPN serversget_vpn_tunnels- List site-to-site tunnels
Deep Packet Inspection (2 tools)
get_dpi_categories- List DPI categoriesget_dpi_applications- List monitored applications
Environment Variables
| Variable | Description | Default | |----------|-------------|---------| | UNIFI_BASE_URL | UniFi controller URL | Required | | UNIFI_API_KEY | API key from UniFi controller | Required | | UNIFI_SKIP_SSL_VERIFY | Skip SSL certificate verification | false | | LOG_LEVEL | Logging level (debug, info, warn, error) | info |
Usage with Claude/Copilot
When using this MCP with Claude or GitHub Copilot:
unifi-network-mcp
./path/to/bin/unifi-network-mcp
Then request network management tasks:
- "Create a guest WiFi network with 24-hour vouchers"
- "List all clients connected to the main WiFi network"
- "Set up a firewall rule blocking port 8080"
- "Get traffic statistics for my network"
For detailed AI assistant guidance, see [.github/copilot-instructions.md](.github/copilot-instructions.md).
Docker Support
This project uses Harbor (harbor.dataknife.net) as the container registry.
Build Docker Image
# Build image for Harbor
make docker-build
# Or manually
docker build -t harbor.dataknife.net/library/unifi-network-mcp:latest .
Push to Harbor
# Login to Harbor (robot account)
docker login harbor.dataknife.net \
-u '' \
-p ''
# Push image
make docker-push
# Or manually
docker push harbor.dataknife.net/library/unifi-network-mcp:latest
Run with Docker
# Pull from Harbor first
docker pull harbor.dataknife.net/library/unifi-network-mcp:latest
# Run container
docker run -e UNIFI_API_KEY=your-key -e UNIFI_BASE_URL=https://your-url \
harbor.dataknife.net/library/unifi-network-mcp:latest
Docker Compose
# Create .env file with your configuration
cp .env.example .env
# Edit .env with your UniFi credentials
# Login to Harbor (if not already logged in)
# Replace and with your actual credentials
docker login harbor.dataknife.net \
-u '' \
-p ''
# Start the service (pulls from Harbor)
docker-compose up -d
# View logs
docker-compose logs -f
GitHub Actions & CI/CD
This project includes automated workflows:
- Tests: Runs on every push and pull request
- Docker Build: Validates Dockerfile builds
- Release: Creates multi-platform binaries (Linux, macOS, Windows)
- Auto-assign: Assigns PRs to authors
See [.github/workflows](.github/workflows) for details.
Skills & Capabilities
This MCP implements the following domain-specific skills:
- Device Management: Device adoption, inventory, and monitoring
- Infrastructure Reporting: Health reports, performance analysis, capacity planning
- Network Monitoring: Site health, device status, diagnostics
- Security Management: Firewall zones, ACL rules, hotspot management
- Traffic Analysis: DPI classification, bandwidth analysis, QoS optimization
- WiFi Management: Network optimization, client analysis, band distribution
See [.github/skills](.github/skills) for detailed skill documentation.
Development
Building from Source
make build
Running Tests
make test
Cleaning Build Artifacts
make clean
API Reference
For detailed API documentation, see [docs/APIREFERENCE.md](docs/APIREFERENCE.md).
Project Structure
unifi-network-mcp/
├── cmd/
│ └── main.go # Entry point and signal handling
├── internal/
│ ├── mcp/
│ │ └── server.go # 27 MCP tool definitions and handlers
│ └── unifi/
│ ├── network.go # Network API client
│ ├── protect.go # Protect API client (shared package)
│ ├── doc.go # Package documentation
│ └── client_test.go # Integration tests
├── docs/
│ ├── API_REFERENCE.md # Detailed API documentation
│ ├── GETTING_STARTED.md # Setup guide
│ └── EXAMPLES.md # Tool usage examples
├── bin/
│ └── unifi-network-mcp # Compiled binary
├── go.mod # Go module definition
├── go.sum # Dependency lock file
├── Makefile # Build and development tasks
└── .env.example # Configuration template
Development
Building from Source
make build
Running Tests
make test
Cleaning Build Artifacts
make clean
API Reference
For detailed API documentation, see [docs/APIREFERENCE.md](docs/APIREFERENCE.md).
For usage examples with specific tools, see [docs/EXAMPLES.md](docs/EXAMPLES.md).
Troubleshooting
See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for common issues and solutions.
Requirements
- Go 1.23.2 or later
- UniFi Controller 7.x or later with API access enabled
License
MIT License - see LICENSE file for details
Contributing
Contributions welcome! Please ensure:
- Code follows Go conventions
- All tests pass (
make test) - Changes are documented
Related Projects
- unifi-protect-mcp: MCP server for UniFi Protect (cameras, sensors, events)
- UniFi Controller: Official UniFi management software
Built with Claude Haiku 4.5 - Crafted by AI to extend your infrastructure possibilities. 🤖✨
Version: 0.1.0 | Last Updated: December 2025
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: DataKnifeAI
- Source: DataKnifeAI/unifi-network-mcp
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.