UniFi Gateway
listing.by
Manage self-hosted UniFi Network, Protect and Access with dry-run previews, multi-site support and an audit log.
listing.install
listing.local.explain
listing.local.needs listing.local.note
STUB_MODElisting.env.optional When true, the server returns realistic mock data and requires no UniFi hardware. Defaults to true so the image is functional out of the…UNIFI_HOSTlisting.env.optional IP address or hostname of the UniFi OS gateway (UCG-Fiber, UDM Pro, etc). Required when STUB_MODE=false and MCP_UNIFI_CONTROLLERS_FILE is…UNIFI_API_KEYlisting.env.secret listing.env.optional Local API key generated under Settings -> Control Plane -> Integrations on the gateway. Required when STUB_MODE=false and…UNIFI_SITElisting.env.optional UniFi controller site name. Defaults to 'default'.UNIFI_VERIFY_SSLlisting.env.optional Whether to verify the gateway's TLS certificate. Defaults to false because most home gateways use a self-signed cert.MCP_UNIFI_CONTROLLERS_FILElisting.env.optional Path to a YAML file describing multiple named controllers for multi-site management. When set, the legacy UNIFI_HOST / UNIFI_API_KEY env…
listing.share.h
listing.share.p_local
mcp.tc/i/unifi-gatewaylisting.about
Community server for self-hosted UniFi gateways. It covers UniFi Network (devices, VLANs, WLANs, firewall, switch ports, port forwards, DHCP reservations, observability), opt-in UniFi Protect (cameras, motion events, smart detections) and read-only UniFi Access (doors, credentials, visitors, badge events). Destructive tools accept a dry-run flag, and every call is written to a JSONL audit log with secrets scrubbed.
It runs locally as a Docker image (stdio or Streamable HTTP), a Claude Desktop bundle, a Helm chart or uvx. A local UniFi API key from the gateway is needed; no cloud account is required. A stub mode returns mock data so you can try it without hardware. One instance can manage several controllers via a YAML file.
listing.can
- Manage VLANs, WLANs, firewall rules, DHCP reservations and port forwards
- Preview destructive changes with dry-run before applying
- Inspect devices, clients and AP radio settings
- Read UniFi Protect cameras, motion events and smart detections
- Read UniFi Access doors, credentials and badge events
- Manage multiple UniFi sites from one server
- Review a JSONL audit log of every tool call
- Try the tool surface in stub mode without hardware
listing.tools
listing.notools.key
listing.prompts
List all VLANs and WLANs on my UniFi gateway.
Preview creating an IoT network with dry run before applying it.
Audit open ports across my firewall rules and zone policies.
Show recent motion events from my Protect cameras.
listing.setup.h
listing.setup.local
Claude Code
- Run this in a terminal, in your project folder:
claude mcp add --transport stdio unifi-gateway --env "UNIFI_API_KEY=<YOUR_UNIFI_API_KEY>" --env "UNIFI_ACCESS_API_KEY=<YOUR_UNIFI_ACCESS_API_KEY>" -- docker run -i --rm ghcr.io/pete-builds/mcp-unifi:0.25.0- Start Claude Code and type
/mcp. unifi-gateway should show as connected.
Add --scope user to make it available in every project. Replace the placeholders with your own values.
Claude Desktop
- Open Settings → Developer → Edit Config. It opens
claude_desktop_config.json. Add:
{
"mcpServers": {
"unifi-gateway": {
"command": "docker",
"args": [
"run",
"-e",
"UNIFI_API_KEY",
"-e",
"UNIFI_ACCESS_API_KEY",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.25.0"
],
"env": {
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>",
"UNIFI_ACCESS_API_KEY": "<YOUR_UNIFI_ACCESS_API_KEY>"
}
}
}
}- Save the file and restart Claude Desktop. Replace the placeholders with your own values.
Needs Docker on your computer. The file lives in ~/Library/Application Support/Claude/ on macOS and %APPDATA%\Claude\ on Windows.
Cursor
Or add it by hand to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project):
{
"mcpServers": {
"unifi-gateway": {
"command": "docker",
"args": [
"run",
"-e",
"UNIFI_API_KEY",
"-e",
"UNIFI_ACCESS_API_KEY",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.25.0"
],
"env": {
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>",
"UNIFI_ACCESS_API_KEY": "<YOUR_UNIFI_ACCESS_API_KEY>"
}
}
}
}Needs Docker on your computer. Replace the placeholders with your own values.
VS Code
Add it to .vscode/mcp.json. VS Code asks for the secret the first time and stores it securely:
{
"servers": {
"unifi-gateway": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-e",
"UNIFI_API_KEY",
"-e",
"UNIFI_ACCESS_API_KEY",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.25.0"
],
"env": {
"UNIFI_API_KEY": "${input:unifi-api-key}",
"UNIFI_ACCESS_API_KEY": "${input:unifi-access-api-key}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "unifi-api-key",
"description": "UNIFI_API_KEY",
"password": true
},
{
"type": "promptString",
"id": "unifi-access-api-key",
"description": "UNIFI_ACCESS_API_KEY",
"password": true
}
]
}Needs Docker on your computer.
Devin Desktop
- Add it to
~/.config/devin/mcp_config.json(macOS and Linux) or%APPDATA%\devin\mcp_config.json(Windows):
{
"mcpServers": {
"unifi-gateway": {
"command": "docker",
"args": [
"run",
"-e",
"UNIFI_API_KEY",
"-e",
"UNIFI_ACCESS_API_KEY",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.25.0"
],
"env": {
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>",
"UNIFI_ACCESS_API_KEY": "<YOUR_UNIFI_ACCESS_API_KEY>"
}
}
}
}- Refresh the MCP server list in Cascade. Replace the placeholders with your own values.
Devin Desktop is the new name for Windsurf.
Codex
codex mcp add unifi-gateway --env "UNIFI_API_KEY=<YOUR_UNIFI_API_KEY>" --env "UNIFI_ACCESS_API_KEY=<YOUR_UNIFI_ACCESS_API_KEY>" -- docker run -i --rm ghcr.io/pete-builds/mcp-unifi:0.25.0Or edit ~/.codex/config.toml directly:
[mcp_servers.unifi-gateway]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/pete-builds/mcp-unifi:0.25.0"]
env = { UNIFI_API_KEY = "<YOUR_UNIFI_API_KEY>", UNIFI_ACCESS_API_KEY = "<YOUR_UNIFI_ACCESS_API_KEY>" }Needs Docker on your computer. Replace the placeholders with your own values.
Gemini CLI
gemini mcp add -e "UNIFI_API_KEY=<YOUR_UNIFI_API_KEY>" -e "UNIFI_ACCESS_API_KEY=<YOUR_UNIFI_ACCESS_API_KEY>" unifi-gateway docker -- run -i --rm ghcr.io/pete-builds/mcp-unifi:0.25.0This adds it to the current project. Add -s user to use it everywhere.
Any client
Most clients that start local servers accept this shape:
{
"mcpServers": {
"unifi-gateway": {
"command": "docker",
"args": [
"run",
"-e",
"UNIFI_API_KEY",
"-e",
"UNIFI_ACCESS_API_KEY",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.25.0"
],
"env": {
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>",
"UNIFI_ACCESS_API_KEY": "<YOUR_UNIFI_ACCESS_API_KEY>"
}
}
}
}Zed puts servers under context_servers in its settings, with the same command, args and env fields.
Needs Docker on your computer. Replace the placeholders with your own values.
listing.faq
Can I paste mcp.tc/i/unifi-gateway into my MCP client?
No. UniFi Gateway runs on your own computer, started by your client, so it has no web address to connect to. The quick link is the page to share; the install command is docker run -i --rm ghcr.io/pete-builds/mcp-unifi:0.25.0.
Does UniFi Gateway need an API key?
Yes. It reads UNIFI_API_KEY and UNIFI_ACCESS_API_KEY from its environment, and UNIFI_API_KEY and UNIFI_ACCESS_API_KEY are secrets. Put the value in your client's config on your own machine, never in a shared file.
Is UniFi Gateway a remote or a local server?
Local. Your client starts it as a process on your computer with docker run -i --rm ghcr.io/pete-builds/mcp-unifi:0.25.0, which needs Docker.
What can UniFi Gateway do?
You can manage VLANs, WLANs, firewall rules, DHCP reservations and port forwards, preview destructive changes with dry-run before applying and inspect devices, clients and AP radio settings.
Which clients can use it?
Any client that starts local servers: Claude Code, Claude Desktop, Cursor, VS Code, Devin Desktop, Codex, Gemini CLI, Zed and others. claude.ai and ChatGPT only connect to remote servers.
Who wrote this page?
mcp.tc's robot read UniFi Gateway's public metadata (its package and repository pages), and an AI model drafted the text from it. A person reviews anything the checks can't confirm. The text can still be wrong, so if you spot a mistake, use Report this listing on this page.
listing.em.h
listing.em.lead_local listing.em.how
listing.em.badge
[](https://mcp.tc/i/unifi-gateway)<a href="https://mcp.tc/i/unifi-gateway"><img src="https://mcp.tc/i/unifi-gateway/badge.svg" alt="UniFi Gateway on mcp.tc" height="20"></a>listing.em.badge_note
listing.em.widget
<script src="https://mcp.tc/w/unifi-gateway.js" async></script>listing.em.widget_note
iframe
<iframe src="https://mcp.tc/embed/unifi-gateway" title="UniFi Gateway on mcp.tc" width="420" height="200" loading="lazy" allow="clipboard-write" style="border:0;border-radius:8px;max-width:100%"></iframe>listing.em.iframe_note
listing.disclaimer_checked