UniFi Internal API MCP Server

UniFi Internal API MCP Server

Provides 170+ tools to manage UniFi networks via the internal controller API, enabling AI assistants to perform full network management including clients, devices, WLANs, firewall, and more.

Category
Visit Server

README

UniFi Internal API MCP Server

An MCP (Model Context Protocol) server that exposes the internal UniFi Controller API — the same API the web UI uses — as tools for AI assistants.

This wraps the cookie-authenticated controller endpoints documented in the Art-of-WiFi/UniFi-API-client PHP library, providing ~170 tools for managing UniFi networks.

Features

  • Full controller access: Clients, devices, WLANs, networks, firewall, statistics, events, admins, firmware, backups, DNS, RADIUS, DPI, hotspot/vouchers, and more
  • Cookie-based authentication: Uses the same session auth as the UniFi web UI
  • UniFi OS support: Works with UDM, UDR, UCG, and legacy standalone controllers
  • Readonly safety mode: Write operations blocked by default — enable explicitly
  • 170+ tools across 19 categories

Quick Start

  1. Clone this repository
  2. Copy .env.example to .env and fill in your controller details
  3. Run: uv run unifi-internal-api-mcp

Configuration

Variable Description Default
UNIFI_HOST Controller URL (e.g. https://192.168.1.1) required
UNIFI_USERNAME Controller username
UNIFI_PASSWORD Controller password
UNIFI_TOKEN Pre-authenticated TOKEN cookie (alternative to username/password)
UNIFI_SITE Site name default
UNIFI_IS_UNIFI_OS UniFi OS controller (UDM/UDR/UCG) true
UNIFI_READONLY Block all write operations true
UNIFI_SSL_VERIFY Verify SSL certificates false

Authentication

Option 1: Username/password — for self-hosted controllers without 2FA:

UNIFI_USERNAME=admin
UNIFI_PASSWORD=your-password

Option 2: Browser token — for cloud-hosted (ui.com) or 2FA-enabled controllers:

  1. Log into your controller in a browser
  2. Open DevTools (Cmd+Option+I) > Application > Cookies
  3. Copy the TOKEN cookie value
UNIFI_TOKEN=eyJhbGciOiJIUzI1NiIs...

The token expires after ~30 days. When using a token, the server won't log out (so your browser session stays valid).

Tool Categories

Module Tools Description
system 15 Sysinfo, health, dashboard, settings, device states
sites 13 Site management, settings (country, SNMP, NTP, etc.)
clients 20 Client management, guest auth, block/unblock
devices 23 Device adoption, restart, locate, radio settings
hotspot 9 Vouchers, hotspot operators, guest login
wlans 8 WLAN configuration, MAC filters
networks 4 Network CRUD
firewall 5 Firewall groups and rules
statistics 22 5min/hourly/daily/monthly stats, speedtest, IPS
events 4 Events and alarms
admins 8 Admin management and permissions
firmware 10 Firmware updates, rolling upgrades
backups 3 Backup generation and export
dns 3 DNS records (v2 API)
radius 5 RADIUS profiles and accounts
tags 5 Device tags
dpi 5 DPI stats, port forwarding, system log
user_groups 4 User groups (bandwidth profiles)
ap_groups 4 AP groups (v2 API)

MCP Client Configuration

Add to your MCP client config (e.g. Claude Desktop):

{
  "mcpServers": {
    "unifi-internal": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/unifi_internal_api_mcp", "unifi-internal-api-mcp"],
      "env": {
        "UNIFI_HOST": "https://your-controller-url",
        "UNIFI_TOKEN": "eyJhbGciOiJIUzI1NiIs...",
        "UNIFI_SITE": "default",
        "UNIFI_READONLY": "true"
      }
    }
  }
}

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured