U

UniFi Gateway

MCP server · by pete-builds

Developer Tools Docker v0.28.0

Safe-by-default UniFi MCP: Network + Protect + Access, multi-site, dry-run, audit log.

View source ↗ Website ↗ Generate config for multiple servers More servers

Install

unavailable — the image reference already carries a tag

Docker
docker run -i --rm ghcr.io/pete-builds/mcp-unifi:0.28.0

Setup by client

Pick your client — the config below is generated for this server (local stdio). Copy respects the “Pin version” switch above.

claude_desktop_config.json

{
  "mcpServers": {
    "unifi": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/pete-builds/mcp-unifi:0.28.0"
      ],
      "env": {
        "MCP_UNIFI_AUTH_TOKENS": "<YOUR_MCP_UNIFI_AUTH_TOKENS>",
        "UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>"
      }
    }
  }
}

Format verified against the official Claude Desktop docs ↗.

Environment variables

Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.

  • STUB_MODE — When true, the server returns realistic mock data and requires no UniFi hardware. Defaults to true. Set to false to manage a real gateway, which then needs UNIFI_HOST plus UNIFI_API_KEY (or UNIFI_API_KEY_FILE), or MCP_UN
  • MCP_UNIFI_AUTH_TOKENS required secret — Bearer tokens that HTTP clients must present. Required: the streamable-http transport exits at startup with 'HTTP transport requires MCP_UNIFI_AUTH_TOKENS' when it is empty. Comma-separated; each entry is a bare token (n
  • MCP_UNIFI_READONLY — When true, every tool that changes state is hidden from tools/list and refused on tools/call; read tools are unaffected. Defense in depth on top of a read-only UniFi API key. Defaults to false.
  • UNIFI_HOST — 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 unset.
  • UNIFI_API_KEY secret — Local API key generated under Settings -> Control Plane -> Integrations on the gateway. Required when STUB_MODE=false and MCP_UNIFI_CONTROLLERS_FILE is unset, unless UNIFI_API_KEY_FILE is used instead.
  • UNIFI_API_KEY_FILE — Path to a file inside the container that holds the local API key, for a Docker or Kubernetes secret mount. Wins over UNIFI_API_KEY when both are set. A controller configured this way verifies the gateway's TLS certificat
  • UNIFI_PINNED_CERT — Path to a file inside the container that holds the gateway's own certificate in PEM, recorded with mcp-unifi-pin-cert. When set, that certificate is the only one the server accepts from the gateway, and a mismatch fails
  • UNIFI_SITE — UniFi controller site name. Defaults to 'default'.

GitHub

⭐ 24 stars · 最近更新于 37 天前 · MIT license

About this server

Distributed as Docker, listed under Developer Tools. Review our MCP security guide before granting access to real data.

Frequently asked questions

How do I install UniFi Gateway?

Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.

Is UniFi Gateway free to use?

The MCP server itself is free to install. The source is public on https://github.com/pete-builds/mcp-unifi. Any third-party service it calls may require its own API key and account.

Which clients support UniFi Gateway?

Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.

Add this badge

Publish this server? Link back with a badge on your README or site — copy either snippet.

Listed on MCPNav

Markdown

[![Listed on MCPNav](https://mcpnav.net/badge/unifi.svg)](https://mcpnav.net/server/unifi/)

HTML

<a href="https://mcpnav.net/server/unifi/"><img src="https://mcpnav.net/badge/unifi.svg" alt="Listed on MCPNav" height="20"></a>