AgentHubAgentHub

UniFi Gateway

MCP ServerMCP Registry官方收录

io.github.pete-builds/unifi · v0.10.1

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

概览

UniFi Gateway 是一个MCP Server,收录自 官方 MCP Registry。支持 streamable-http 传输。本页提供 Cursor、Claude Code 等客户端的安装配置片段。

安装

选择你的平台查看安装方式

{
  "mcpServers": {
    "unifi": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/pete-builds/mcp-unifi:0.10.1"
      ]
    }
  }
}

环境变量

STUB_MODE可选

When 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_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.

UNIFI_SITE可选

UniFi controller site name. Defaults to 'default'.

UNIFI_VERIFY_SSL可选

Whether to verify the gateway's TLS certificate. Defaults to false because most home gateways use a self-signed cert.

MCP_UNIFI_CONTROLLERS_FILE可选

Path 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_ENABLED可选

Comma-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_HOST可选

UniFi 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_KEY可选secret

UniFi 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_PORT可选

HTTPS port for the Access hub. Defaults to 12445 (the direct Access app port).

MCP_UNIFI_AUDIT_SINK可选

Audit log sink. One of 'file' (default), 'stdout', or 'syslog'. Every tool call is recorded to a JSONL stream with secrets scrubbed.

MCP_UNIFI_AUDIT_PATH可选

Path for the audit log file when MCP_UNIFI_AUDIT_SINK=file. Defaults to audit.jsonl in the process CWD.

相关资源

统一 Manifest

{
  "id": "io.github.pete-builds/unifi",
  "type": "mcp-server",
  "version": "0.10.1",
  "displayName": "UniFi Gateway",
  "description": "Safe-by-default UniFi MCP: Network + Protect + Access, multi-site, dry-run, audit log.",
  "repository": {
    "url": "https://github.com/pete-builds/mcp-unifi",
    "source": "github"
  },
  "homepage": "https://pete-builds.github.io/mcp-unifi/",
  "distribution": {
    "packages": [
      {
        "registryType": "oci",
        "identifier": "ghcr.io/pete-builds/mcp-unifi:0.10.1",
        "runtimeHint": "docker",
        "transport": "streamable-http",
        "environmentVariables": [
          {
            "name": "STUB_MODE",
            "description": "When true, the server returns realistic mock data and requires no UniFi hardware. Defaults to true so the image is functional out of the box."
          },
          {
            "name": "UNIFI_HOST",
            "description": "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."
          },
          {
            "name": "UNIFI_API_KEY",
            "description": "Local API key generated under Settings -> Control Plane -> Integrations on the gateway. Required when STUB_MODE=false and MCP_UNIFI_CONTROLLERS_FILE is unset.",
            "isSecret": true
          },
          {
            "name": "UNIFI_SITE",
            "description": "UniFi controller site name. Defaults to 'default'."
          },
          {
            "name": "UNIFI_VERIFY_SSL",
            "description": "Whether to verify the gateway's TLS certificate. Defaults to false because most home gateways use a self-signed cert."
          },
          {
            "name": "MCP_UNIFI_CONTROLLERS_FILE",
            "description": "Path 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."
          },
          {
            "name": "MCP_UNIFI_MODULES_ENABLED",
            "description": "Comma-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."
          },
          {
            "name": "UNIFI_ACCESS_HOST",
            "description": "UniFi Access hub IP or hostname. Required when the access module is enabled and STUB_MODE=false. Often the same host as UNIFI_HOST."
          },
          {
            "name": "UNIFI_ACCESS_API_KEY",
            "description": "UniFi 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.",
            "isSecret": true
          },
          {
            "name": "UNIFI_ACCESS_PORT",
            "description": "HTTPS port for the Access hub. Defaults to 12445 (the direct Access app port)."
          },
          {
            "name": "MCP_UNIFI_AUDIT_SINK",
            "description": "Audit log sink. One of 'file' (default), 'stdout', or 'syslog'. Every tool call is recorded to a JSONL stream with secrets scrubbed."
          },
          {
            "name": "MCP_UNIFI_AUDIT_PATH",
            "description": "Path for the audit log file when MCP_UNIFI_AUDIT_SINK=file. Defaults to audit.jsonl in the process CWD."
          }
        ]
      }
    ],
    "remotes": []
  },
  "dependencies": [],
  "installTargets": [
    "claude-code",
    "claude-desktop",
    "cursor",
    "vscode"
  ],
  "keywords": [],
  "provenance": {
    "origin": "official-mcp-registry",
    "originalId": "io.github.pete-builds/unifi",
    "originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.pete-builds%2Funifi/versions/latest",
    "isOfficial": true,
    "status": "active"
  }
}
UniFi Gateway — MCP Server 安装与配置 · AgentHub