UniFi Network MCP Server
This MCP server provides 74 tools to monitor and manage UniFi Network infrastructure, covering the following areas:
System: Get UniFi Network application version info (
unifi_get_info).Sites: List all sites accessible by the API key.
Devices: List, get details/statistics for adopted devices (gateways, switches, APs); list pending adoptions; adopt, remove, restart devices; power cycle PoE ports.
Clients: List and get connected clients (wired, wireless, VPN); authorize/unauthorize guest clients.
Networks/VLANs: List, get, create, update, delete networks; view subnet/DHCP config and network dependencies.
WiFi (SSIDs): List, get, create, update, delete WiFi networks (including security, band steering, MLO, device filters).
Hotspot Vouchers: List, get, create, delete, and bulk-delete guest portal vouchers.
Firewall: List, get, create, update, patch, delete firewall zones and policies; manage policy evaluation order.
ACL Rules: List, get, create, update, delete ACL rules; manage evaluation order.
Switching: List and get Switch Stacks, MC-LAG Domains, and Link Aggregation Groups (LAGs).
DNS Policies: List, get, create, update, delete local DNS records and forward rules.
Traffic Matching Lists: List, get, create, update, delete named port/IP groups used in firewall and ACL rules.
Supporting Elements: List WANs, VPN tunnels, VPN servers, RADIUS profiles, device tags, DPI categories/applications, and countries for geo-based rules.
Safety features:
All tools are read-only by default — write operations require setting
UNIFI_NETWORK_READ_ONLY=false.10 destructive tools require an explicit
confirm: trueparameter.All 33 write tools support a dry-run mode to preview changes without applying them.
Tools declare
readOnlyHintanddestructiveHintannotations for MCP client awareness.58 of 74 tools provide structured, typed output for easier parsing and integration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UniFi Network MCP Serverlist all adopted devices at the default site"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
UniFi Network MCP Server
An MCP (Model Context Protocol) server that exposes the UniFi Network Integration API as tools for Claude Code and other MCP clients. Provides 74 tools for managing sites, devices, clients, networks, WiFi, firewalls, ACLs, switching, DNS policies, hotspot vouchers, VPNs, and more.
Prerequisites
Node.js 22.13+ or 24 (see
enginesinpackage.json)A UniFi Network console with the Integration API enabled
An API key generated from your UniFi Network console
Related MCP server: UniFi Network MCP Server
Setup
Quick start (npx)
Add to Claude Code with a single command — no clone or build needed:
claude mcp add-json unifi-network '{"command":"npx","args":["-y","@owine/unifi-network-mcp@latest"],"env":{"UNIFI_NETWORK_HOST":"192.168.1.1","UNIFI_NETWORK_API_KEY":"your-api-key","UNIFI_NETWORK_VERIFY_SSL":"false"}}' -s userUse -s user for global availability across all projects, or -s project for the current project only.
From source
If you prefer to build locally, this project uses pnpm via Corepack — use pnpm install, not npm install, which ignores pnpm-lock.yaml and resolves different dependency versions:
git clone https://github.com/owine/unifi-network-mcp.git
cd unifi-network-mcp
corepack enable
pnpm install
pnpm run buildThen add to Claude Code:
claude mcp add-json unifi-network '{"command":"node","args":["/path/to/unifi-network-mcp/dist/index.js"],"env":{"UNIFI_NETWORK_HOST":"192.168.1.1","UNIFI_NETWORK_API_KEY":"your-api-key","UNIFI_NETWORK_VERIFY_SSL":"false"}}' -s userEnvironment Variables
Variable | Required | Default | Description |
| Yes | — | IP or hostname of your UniFi Network console |
| Yes | — | API key from Network integration settings |
| No |
| Set to |
| No |
| Set to |
Manual Configuration
Alternatively, add to your ~/.claude.json under the top-level "mcpServers" key:
{
"mcpServers": {
"unifi-network": {
"command": "npx",
"args": ["-y", "@owine/unifi-network-mcp@latest"],
"env": {
"UNIFI_NETWORK_HOST": "192.168.1.1",
"UNIFI_NETWORK_API_KEY": "your-api-key",
"UNIFI_NETWORK_VERIFY_SSL": "false"
}
}
}
}Safety Features
This server provides layered safety controls for responsible operation:
Tool annotations — Every tool declares
readOnlyHint,destructiveHint, andidempotentHintso MCP clients (like Claude Code) can make informed confirmation decisionsRead-only mode — Enabled by default. Only read operations (list, get) are registered. Set
UNIFI_NETWORK_READ_ONLY=falseto enable write/mutating toolsDestructive tool warnings — Tools that delete or irreversibly modify resources have descriptions prefixed with
DESTRUCTIVE:to clearly signal riskConfirmation parameter — Every tool marked
DESTRUCTIVE:(all 10 of them, includingunifi_remove_deviceandunifi_bulk_delete_vouchers) requires an explicitconfirm: trueparameter for the call to succeedDry-run support — All 33 write tools accept an optional
dryRun: trueparameter that returns a preview of the HTTP request (method, path, body) without making any changes
Structured Output
58 of the 74 tools (all 41 read tools, plus the 17 write tools whose API responses return the affected resource) declare an MCP outputSchema and return structuredContent alongside the usual text content. Clients that understand structured output get typed, machine-readable results instead of parsing JSON out of a text blob.
The schemas live in src/utils/output-schemas.ts and are verified against UniFi Network API 10.5.43. They deliberately use a loose strategy: every non-key field is optional and nested objects use .passthrough(), so firmware- and hardware-specific fields flow through unchanged rather than being stripped or triggering a validation error. This keeps the contract stable across console versions and hardware models.
Tools (74 total)
System (1)
Tool | Description |
| Get UniFi Network application info — returns |
Sites (1)
Tool | Description |
| List all sites available to the API key |
Devices (8)
Tool | Description |
| List all adopted devices at a site |
| Get a specific device by ID |
| Get latest statistics for a device |
| List devices pending adoption (global) |
| Adopt a pending device |
| DESTRUCTIVE: Remove (unadopt) a device — may factory reset |
| Restart a device |
| Power cycle a specific port (PoE restart) |
Clients (4)
Tool | Description |
| List all connected clients (wired, wireless, VPN) at a site |
| Get a specific client by ID |
| Authorize a guest client on a hotspot network |
| Unauthorize a guest client |
Networks (6)
Tool | Description |
| List all networks at a site |
| Get a specific network by ID |
| Get references to a network (WiFi, firewall zones, etc.) |
| Create a new network |
| Update an existing network |
| DESTRUCTIVE: Delete a network — disconnects all clients |
WiFi (5)
Tool | Description |
| List all WiFi broadcasts (SSIDs) at a site |
| Get a specific WiFi network by ID |
| Create a new WiFi network (SSID) |
| Update an existing WiFi network |
| DESTRUCTIVE: Delete a WiFi network — disconnects all clients |
Hotspot Vouchers (5)
Tool | Description |
| List all hotspot vouchers at a site |
| Get a specific hotspot voucher by ID |
| Create hotspot vouchers |
| DESTRUCTIVE: Delete a hotspot voucher |
| DESTRUCTIVE: Bulk delete vouchers matching a filter |
Firewall Zones & Policies (13)
Tool | Description |
| List all firewall zones at a site |
| Get a specific firewall zone by ID |
| Create a new custom firewall zone |
| Update a firewall zone |
| DESTRUCTIVE: Delete a custom firewall zone |
| List all firewall policies at a site |
| Get a specific firewall policy by ID |
| Create a new firewall policy |
| Update a firewall policy |
| Partially update a firewall policy (e.g. toggle logging) |
| DESTRUCTIVE: Delete a firewall policy |
| Get user-defined firewall policy ordering for a zone pair |
| Reorder user-defined firewall policies for a zone pair |
ACL Rules (7)
Tool | Description |
| List all ACL rules at a site |
| Get a specific ACL rule by ID |
| Get user-defined ACL rule ordering |
| Create a new ACL rule |
| Update an ACL rule |
| DESTRUCTIVE: Delete an ACL rule |
| Reorder user-defined ACL rules |
Switching (6)
Tool | Description |
| List all Switch Stacks at a site |
| Get details of a specific Switch Stack |
| List all MC-LAG (Multi-Chassis LAG) Domains at a site |
| Get details of a specific MC-LAG Domain |
| List all LAGs (Link Aggregation Groups) at a site |
| Get details of a specific LAG |
DNS Policies (5)
Tool | Description |
| List all DNS policies at a site |
| Get a specific DNS policy by ID |
| Create a new DNS policy |
| Update a DNS policy |
| DESTRUCTIVE: Delete a DNS policy |
Traffic Matching (5)
Tool | Description |
| List all traffic matching lists (port groups, IP groups) |
| Get a specific traffic matching list by ID |
| Create a new traffic matching list |
| Update a traffic matching list |
| DESTRUCTIVE: Delete a traffic matching list |
Supporting (8)
Tool | Description |
| List all WAN interfaces at a site |
| List all site-to-site VPN tunnels at a site |
| List all VPN servers at a site |
| List all RADIUS profiles at a site |
| List all device tags at a site |
| List all DPI categories for traffic identification |
| List all DPI applications for traffic identification |
| List all countries/regions for geo-based rules |
Development
pnpm install # Install dependencies
pnpm run build # Compile TypeScript
pnpm start # Run the server
pnpm run typecheck # Type-check without emitting
pnpm run lint # ESLint
pnpm run lint:fix # ESLint with auto-fix
pnpm test # Run all tests (vitest)
pnpm run test:watch # Run tests in watch mode
pnpm run test:coverage # Run tests with coverageCommit conventions
This project uses conventional commits and release-please for automated releases:
feat: ...— new feature (minor version bump)fix: ...— bug fix (patch version bump)feat!: ...orBREAKING CHANGE:footer — breaking change (major version bump)chore:,docs:,ci:, etc. — no version bump
On push to main, release-please opens a Release PR that bumps the version and updates CHANGELOG.md. Merging that PR publishes to npm automatically.
To override the version number, add Release-As: x.x.x in the commit body:
git commit --allow-empty -m "chore: release 2.0.0" -m "Release-As: 2.0.0"License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to interact with Ubiquiti UniFi network infrastructure for monitoring devices, managing clients, and performing configuration tasks like blocking/unblocking devices and viewing network health.Last updated101GPL 3.0
- AlicenseBqualityDmaintenanceEnables AI assistants to manage UniFi network infrastructure through 50+ tools covering devices, clients, networks, WiFi, firewall rules, and guest access using the official UniFi Network API.Last updated52754MIT
- Alicense-qualityDmaintenanceEnables comprehensive management of UniFi Network infrastructure through 24 tools for monitoring and controlling devices, clients, wireless networks, security, and guest access. Supports network administration tasks like device restarts, client blocking, WLAN configuration, and backup creation.Last updated61MIT
- Alicense-qualityAmaintenanceEnables management of a local UniFi controller, including devices, clients, network configuration, and monitoring through a single action tool.Last updated13MIT
Related MCP Connectors
Universal AI API Orchestrator — 1,554 tools, 96 services. One install.
Interact with a global network measurement platform.Run network commands from any point in the world
Create and manage short links, track clicks, and automate URL management
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/owine/unifi-network-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server