AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified Apache-2.0 Self-run

Unifi Network Mcp

mcp-dataknifeai-unifi-network-mcp · by DataKnifeAI

MCP server for UniFi Network management - network devices, WiFi, and firewall management

No reviews yet
0 installs
39 views
0.0% view→install

Install

$ agentstack add mcp-dataknifeai-unifi-network-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

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

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-dataknifeai-unifi-network-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

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 →
Are you the author of Unifi Network Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

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 sites
  • get_site_details - Get detailed site information
  • get_site_devices - List devices in a specific site
  • get_device_details - Get detailed device information
  • get_connected_clients - List connected clients in a site

WiFi Networks (5 tools)

  • create_wifi_network - Create a new WiFi network
  • get_wifi_networks - List all WiFi networks
  • get_wifi_network_detailed - Get detailed WiFi network information
  • update_wifi_network - Update WiFi network settings
  • patch_wifi_network - Patch specific WiFi network properties

Firewall & Security (6 tools)

  • get_firewall_zones - List firewall zones
  • create_firewall_zone - Create a new firewall zone
  • patch_firewall_zone - Update firewall zone settings
  • get_acl_rules - List ACL rules
  • create_acl_rule - Create an ACL rule
  • patch_acl_rule - Update ACL rule settings

Traffic & Performance (3 tools)

  • get_traffic_rules - List traffic matching rules
  • create_traffic_rule - Create a traffic rule
  • patch_traffic_rule - Update traffic rule settings

Guest WiFi & Hotspot (2 tools)

  • get_hotspot_vouchers - List hotspot vouchers
  • create_hotspot_voucher - Generate guest access vouchers
  • patch_hotspot_voucher - Update voucher settings

VPN & Remote Access (2 tools)

  • get_vpn_servers - List VPN servers
  • get_vpn_tunnels - List site-to-site tunnels

Deep Packet Inspection (2 tools)

  • get_dpi_categories - List DPI categories
  • get_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.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.