Skip to main content

UniFi Site Manager and Network (unofficial)

io.github.mguttmann/the-real-unifi-mcp

v0.4.0Updated Oct 27, 2026stdio · MCPBstdio · npm

Unofficial MCP server for the UniFi Site Manager and Network cloud APIs, with a write-confirm guard.

Install

Needs 1 secret. Replace 1 placeholder with your own values.

Run in your terminal. Replace 1 placeholder.

claude mcp add the-real-unifi-mcp -e 'UNIFI_API_KEY=<your-unifi-api-key>' -e UNIFI_CONFIRM_WRITES=true -e UNIFI_API_BASE=https://api.ui.com -e UNIFI_TIMEOUT_MS=30000 -e UNIFI_LOG_LEVEL=info -e UNIFI_READ_ONLY=false -e UNIFI_REDACT_SECRETS=false -e UNIFI_MAX_RESULT_BYTES=100000 -- npx -y [email protected]

Configuration

11 settings, 1 required secret. Snippets use placeholders; keep real values out of shared config.

  • UNIFI_API_KEY
    Env var· required· secret
    UniFi Site Manager API key with Network scope (unifi.ui.com, Settings > API). It controls your whole network: treat it like an admin password.
  • UNIFI_CONFIRM_WRITES
    Env var· optional
    Write confirmation: destructive tools return a preview and run only when called again with confirm "YES". Only false, 0, no or off turn it off.Default: true
  • UNIFI_API_BASE
    Env var· optional
    API base URL; this host receives the API key. https origin only (http only for loopback test stubs). Keep the default.Default: https://api.ui.com
  • UNIFI_TIMEOUT_MS
    Env var· optional
    Per-request timeout in milliseconds, covering response headers and body.Default: 30000
  • UNIFI_LOG_LEVEL
    Env var· optional
    Log level on stderr: debug, info, warn or error.Default: info
  • UNIFI_CONSOLE_ID
    Env var· optional
    Pins the UniFi console instead of discovering it (needed when the account has several consoles).
Show 5 more
  • UNIFI_NETWORK_SITE_ID
    Env var· optional
    Pins the Network site instead of discovering it.
  • UNIFI_SITE_MANAGER_SITE_ID
    Env var· optional
    Pins the Site Manager site instead of discovering it.
  • UNIFI_READ_ONLY
    Env var· optional
    Read-only mode: every write tool returns an error and sends no request; reads still work. Off by default.Default: false
  • UNIFI_REDACT_SECRETS
    Env var· optional
    Masks passwords, WiFi passphrases, pre-shared keys and other secret fields in every tool result with (redacted); write tools refuse a body that contains that placeholder. Off by default.Default: false
  • UNIFI_MAX_RESULT_BYTES
    Env var· optional
    Cuts tool results longer than this many bytes and marks them as truncated. Unset or empty: 100000. 0, off or none: no cap.Default: 100000

Listed in the official MCP Registry since Oct 27, 2026. Mirrored daily; last checked Nov 26, 2026.