
UniFi Gateway
Local API access to a UniFi gateway for Network and Protect, with dry-run-first router changes.
- tools
- 11
- auth
- Secret needed
- transport
- STDIO
- env vars
- 4
- last updated
- Nov 20, 2026
What it does
- Reads data with
unifi_info,unifi_list_port_forwards,unifi_health,unifi_list_devices, andunifi_list_clients, plusunifi_callfor any read operation - Writes changes with
unifi_set_port_forward,unifi_write, andunifi_delete; each is a dry run unlessdry_run=falseandconfirm=trueare both set - Requires a gateway API key set up once through
setup, with a pinned certificate fingerprint, and runs locally over stdio - Designed for network health checks, port-forward management, and device or client inventory on a home or small-office gateway
Tools
11 toolsPublic tool metadata for what this MCP can expose to an agent.
unifi_infoNetwork and Protect versions, sites, the loaded spec versions, and `specDrift` (apps whose spec differs from the gateway)
Network and Protect versions, sites, the loaded spec versions, and `specDrift` (apps whose spec differs from the gateway)
No parameter schema in public metadata yet.
unifi_list_port_forwardsevery port-forward rule (id, name, enabled, WAN address and port, LAN target, protocol)
every port-forward rule (id, name, enabled, WAN address and port, LAN target, protocol)
No parameter schema in public metadata yet.
unifi_healthsite health by subsystem
site health by subsystem
No parameter schema in public metadata yet.
unifi_list_devicesadopted devices (name, model, firmware, state)
adopted devices (name, model, firmware, state)
No parameter schema in public metadata yet.
unifi_list_clientsconnected clients
connected clients
No parameter schema in public metadata yet.
unifi_set_port_forwardenable or disable a rule, or change its LAN target (`fwd`, `fwd_port`) or WAN port (`dst_port`)
enable or disable a rule, or change its LAN target (`fwd`, `fwd_port`) or WAN port (`dst_port`)
No parameter schema in public metadata yet.
unifi_search_apifind operations by words, tag, risk or api
find operations by words, tag, risk or api
No parameter schema in public metadata yet.
unifi_describe_operationparameters and full request-body schema of one operation
parameters and full request-body schema of one operation
No parameter schema in public metadata yet.
unifi_callrun a **read** operation
run a **read** operation
No parameter schema in public metadata yet.
unifi_writerun a create or update operation; dry run by default
run a create or update operation; dry run by default
No parameter schema in public metadata yet.
unifi_deleterun a delete operation; dry run by default
run a delete operation; dry run by default
No parameter schema in public metadata yet.
Configuration
UNIFI_URLGateway address, e.g. https://192.168.1.1. Not needed after running `unifi-mcp setup` once.
UNIFI_API_KEYsecretUniFi API key (Settings > Control Plane > Integrations). Not needed after `unifi-mcp setup`.
UNIFI_CERT_SHA256SHA-256 fingerprint of the gateway's certificate, to pin it. `unifi-mcp setup` sets this for you.
UNIFI_READ_ONLYSet to 1 to refuse every change to the gateway.
Readme
unifi-mcp
Unofficial. Not affiliated with or endorsed by Ubiquiti Inc. UniFi and UniFi Protect are trademarks of Ubiquiti Inc. This server can change your network: changes are a dry run unless you confirm them, many write operations have not been tried on real gateways, and you use it at your own risk (MIT licence, no warranty). Report security problems as described in
SECURITY.md.
A small MCP server for a UniFi gateway's local API (a UDM, UDM Pro, UCG and so on, Network 9+), written so that one person can read all of it. Nothing leaves your network.
Install and sign in
Needs Node 24 or newer. First sign in once, in a terminal:
npx -y @mmoonport-labs/unifi-mcp setup
Details
- Repository
- github.com/mmoonport-labs/unifi-mcp
- Categories
- DevOps & Cloud, Monitoring & Observability
- Package
@mmoonport-labs/unifi-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active
Similar to UniFi Gateway
More DevOps & Cloud
UniFi GatewayMCP serverpete-builds32 starsSafe-by-default access to a self-hosted UniFi gateway: network, Protect, and Access data with audit logs.
uniflySkillhyperb1iss/unifly164 installsCommand-line management of UniFi Network infrastructure covering devices, clients, VLANs, firewall, and VPN.
UniFi Network MCPMCP serversirkirby1.1K starsManages UniFi Network controllers through devices, clients, firewall, VLANs, VPNs, and statistics tools.
Go Unifi McpMCP serverclaytono7 starsRead and write access to a UniFi Network Controller: sites, devices, clients, networks, firewall, and DNS.
unifi-networkPluginsirkirby/unifi-mcp1.1K starsUniFi Network MCP server — manage network devices, clients, firewall, VPN, and more
LibreNMS MCPMCP servermhajder44 starsRead and write access to LibreNMS devices, ports, device groups, and locations for monitoring data.