What is the UniFi Gateway MCP server?
Safe-by-default UniFi MCP: Network + Protect + Access, multi-site, dry-run, audit log.
How to install UniFi Gateway
Copy-paste configuration for popular MCP clients.
STUB_MODEWhen true, the server returns realistic mock data and requires no UniFi hardware. Defaults to true so the image is functional out of the box.
UNIFI_HOSTIP address or hostname of the UniFi OS gateway (UCG-Fiber, UDM Pro, etc). Required when STUB_MODE=false and MCP_UNIFI_CONTROLLERS_FILE is unset.
UNIFI_API_KEYsecretLocal API key generated under Settings -> Control Plane -> Integrations on the gateway. Required when STUB_MODE=false and MCP_UNIFI_CONTROLLERS_FILE is unset.
UNIFI_SITEUniFi controller site name. Defaults to 'default'.
UNIFI_VERIFY_SSLWhether to verify the gateway's TLS certificate. Defaults to false because most home gateways use a self-signed cert.
MCP_UNIFI_CONTROLLERS_FILEPath to a YAML file describing multiple named controllers for multi-site management. When set, the legacy UNIFI_HOST / UNIFI_API_KEY env vars are ignored. Each entry needs name, host, api_key, and optionally port, site, verify_ssl.
MCP_UNIFI_MODULES_ENABLEDComma-separated list of modules to load. Known values: 'network', 'protect', 'access'. Defaults to 'network'. Set to 'network,protect,access' to enable Protect and Access tools alongside Network. Access is read-only in v0.10.
UNIFI_ACCESS_HOSTUniFi Access hub IP or hostname. Required when the access module is enabled and STUB_MODE=false. Often the same host as UNIFI_HOST.
UNIFI_ACCESS_API_KEYsecretUniFi Access API key. Separate from the Network API key; generated on the Access controller's developer settings. Required when the access module is enabled and STUB_MODE=false.
UNIFI_ACCESS_PORTHTTPS port for the Access hub. Defaults to 12445 (the direct Access app port).
MCP_UNIFI_AUDIT_SINKAudit log sink. One of 'file' (default), 'stdout', or 'syslog'. Every tool call is recorded to a JSONL stream with secrets scrubbed.
MCP_UNIFI_AUDIT_PATHPath for the audit log file when MCP_UNIFI_AUDIT_SINK=file. Defaults to audit.jsonl in the process CWD.
{
"mcpServers": {
"unifi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.15.3"
],
"env": {
"STUB_MODE": "<YOUR_STUB_MODE>",
"UNIFI_HOST": "<YOUR_UNIFI_HOST>",
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>",
"UNIFI_SITE": "<YOUR_UNIFI_SITE>",
"UNIFI_VERIFY_SSL": "<YOUR_UNIFI_VERIFY_SSL>",
"MCP_UNIFI_CONTROLLERS_FILE": "<YOUR_MCP_UNIFI_CONTROLLERS_FILE>",
"MCP_UNIFI_MODULES_ENABLED": "<YOUR_MCP_UNIFI_MODULES_ENABLED>",
"UNIFI_ACCESS_HOST": "<YOUR_UNIFI_ACCESS_HOST>",
"UNIFI_ACCESS_API_KEY": "<YOUR_UNIFI_ACCESS_API_KEY>",
"UNIFI_ACCESS_PORT": "<YOUR_UNIFI_ACCESS_PORT>",
"MCP_UNIFI_AUDIT_SINK": "<YOUR_MCP_UNIFI_AUDIT_SINK>",
"MCP_UNIFI_AUDIT_PATH": "<YOUR_MCP_UNIFI_AUDIT_PATH>"
}
}
}
}{
"mcpServers": {
"unifi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.15.3"
],
"env": {
"STUB_MODE": "<YOUR_STUB_MODE>",
"UNIFI_HOST": "<YOUR_UNIFI_HOST>",
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>",
"UNIFI_SITE": "<YOUR_UNIFI_SITE>",
"UNIFI_VERIFY_SSL": "<YOUR_UNIFI_VERIFY_SSL>",
"MCP_UNIFI_CONTROLLERS_FILE": "<YOUR_MCP_UNIFI_CONTROLLERS_FILE>",
"MCP_UNIFI_MODULES_ENABLED": "<YOUR_MCP_UNIFI_MODULES_ENABLED>",
"UNIFI_ACCESS_HOST": "<YOUR_UNIFI_ACCESS_HOST>",
"UNIFI_ACCESS_API_KEY": "<YOUR_UNIFI_ACCESS_API_KEY>",
"UNIFI_ACCESS_PORT": "<YOUR_UNIFI_ACCESS_PORT>",
"MCP_UNIFI_AUDIT_SINK": "<YOUR_MCP_UNIFI_AUDIT_SINK>",
"MCP_UNIFI_AUDIT_PATH": "<YOUR_MCP_UNIFI_AUDIT_PATH>"
}
}
}
}{
"mcpServers": {
"unifi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.15.3"
],
"env": {
"STUB_MODE": "<YOUR_STUB_MODE>",
"UNIFI_HOST": "<YOUR_UNIFI_HOST>",
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>",
"UNIFI_SITE": "<YOUR_UNIFI_SITE>",
"UNIFI_VERIFY_SSL": "<YOUR_UNIFI_VERIFY_SSL>",
"MCP_UNIFI_CONTROLLERS_FILE": "<YOUR_MCP_UNIFI_CONTROLLERS_FILE>",
"MCP_UNIFI_MODULES_ENABLED": "<YOUR_MCP_UNIFI_MODULES_ENABLED>",
"UNIFI_ACCESS_HOST": "<YOUR_UNIFI_ACCESS_HOST>",
"UNIFI_ACCESS_API_KEY": "<YOUR_UNIFI_ACCESS_API_KEY>",
"UNIFI_ACCESS_PORT": "<YOUR_UNIFI_ACCESS_PORT>",
"MCP_UNIFI_AUDIT_SINK": "<YOUR_MCP_UNIFI_AUDIT_SINK>",
"MCP_UNIFI_AUDIT_PATH": "<YOUR_MCP_UNIFI_AUDIT_PATH>"
}
}
}
}{
"servers": {
"unifi": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.15.3"
],
"env": {
"STUB_MODE": "<YOUR_STUB_MODE>",
"UNIFI_HOST": "<YOUR_UNIFI_HOST>",
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>",
"UNIFI_SITE": "<YOUR_UNIFI_SITE>",
"UNIFI_VERIFY_SSL": "<YOUR_UNIFI_VERIFY_SSL>",
"MCP_UNIFI_CONTROLLERS_FILE": "<YOUR_MCP_UNIFI_CONTROLLERS_FILE>",
"MCP_UNIFI_MODULES_ENABLED": "<YOUR_MCP_UNIFI_MODULES_ENABLED>",
"UNIFI_ACCESS_HOST": "<YOUR_UNIFI_ACCESS_HOST>",
"UNIFI_ACCESS_API_KEY": "<YOUR_UNIFI_ACCESS_API_KEY>",
"UNIFI_ACCESS_PORT": "<YOUR_UNIFI_ACCESS_PORT>",
"MCP_UNIFI_AUDIT_SINK": "<YOUR_MCP_UNIFI_AUDIT_SINK>",
"MCP_UNIFI_AUDIT_PATH": "<YOUR_MCP_UNIFI_AUDIT_PATH>"
}
}
}
}claude mcp add unifi --env STUB_MODE=<YOUR_STUB_MODE> --env UNIFI_HOST=<YOUR_UNIFI_HOST> --env UNIFI_API_KEY=<YOUR_UNIFI_API_KEY> --env UNIFI_SITE=<YOUR_UNIFI_SITE> --env UNIFI_VERIFY_SSL=<YOUR_UNIFI_VERIFY_SSL> --env MCP_UNIFI_CONTROLLERS_FILE=<YOUR_MCP_UNIFI_CONTROLLERS_FILE> --env MCP_UNIFI_MODULES_ENABLED=<YOUR_MCP_UNIFI_MODULES_ENABLED> --env UNIFI_ACCESS_HOST=<YOUR_UNIFI_ACCESS_HOST> --env UNIFI_ACCESS_API_KEY=<YOUR_UNIFI_ACCESS_API_KEY> --env UNIFI_ACCESS_PORT=<YOUR_UNIFI_ACCESS_PORT> --env MCP_UNIFI_AUDIT_SINK=<YOUR_MCP_UNIFI_AUDIT_SINK> --env MCP_UNIFI_AUDIT_PATH=<YOUR_MCP_UNIFI_AUDIT_PATH> -- docker run -i --rm ghcr.io/pete-builds/mcp-unifi:0.15.3Related MCP servers
Scrapling MCP Server
Give your AI agent stealth web scraping with Cloudflare bypass and CSS selection, powered by Scrapling.
Chrome DevTools MCP
Give your AI coding agent full control of a live Chrome browser for automation, debugging, and performance analysis.
com.puter/mcp-server
Let AI agents manage your Puter files, websites, and serverless workers over MCP.
Browser automation for AI agents via MCP, powering ByteDance's Agent TARS hybrid GUI/DOM browser control.
Run arbitrary shell commands from an MCP-connected AI agent.
Filesystem access MCP server from ByteDance's UI-TARS/Agent TARS ecosystem.