T

The Real Unifi MCP

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

the-real-unifi-mcp License: MIT Node MCP SDK [![CI](https://github.com/mguttmann/the-real-unifi-mcp/actions

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-mguttmann-the-real-unifi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-unifi-mcp"
      ],
      "env": {
        "UNIFI_API_KEY": "<YOUR_VALUE>",
        "UNIFI_CONFIRM_WRITES": "true",
        "UNIFI_API_BASE": "https://api.ui.com",
        "UNIFI_TIMEOUT_MS": "30000",
        "UNIFI_LOG_LEVEL": "info",
        "UNIFI_CONSOLE_ID": "<VALUE>",
        "UNIFI_NETWORK_SITE_ID": "<VALUE>",
        "UNIFI_SITE_MANAGER_SITE_ID": "<VALUE>",
        "UNIFI_READ_ONLY": "false",
        "UNIFI_REDACT_SECRETS": "false",
        "UNIFI_MAX_RESULT_BYTES": "100000"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-mguttmann-the-real-unifi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-unifi-mcp"
      ],
      "env": {
        "UNIFI_API_KEY": "<YOUR_VALUE>",
        "UNIFI_CONFIRM_WRITES": "true",
        "UNIFI_API_BASE": "https://api.ui.com",
        "UNIFI_TIMEOUT_MS": "30000",
        "UNIFI_LOG_LEVEL": "info",
        "UNIFI_CONSOLE_ID": "<VALUE>",
        "UNIFI_NETWORK_SITE_ID": "<VALUE>",
        "UNIFI_SITE_MANAGER_SITE_ID": "<VALUE>",
        "UNIFI_READ_ONLY": "false",
        "UNIFI_REDACT_SECRETS": "false",
        "UNIFI_MAX_RESULT_BYTES": "100000"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-mguttmann-the-real-unifi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-unifi-mcp"
      ],
      "env": {
        "UNIFI_API_KEY": "<YOUR_VALUE>",
        "UNIFI_CONFIRM_WRITES": "true",
        "UNIFI_API_BASE": "https://api.ui.com",
        "UNIFI_TIMEOUT_MS": "30000",
        "UNIFI_LOG_LEVEL": "info",
        "UNIFI_CONSOLE_ID": "<VALUE>",
        "UNIFI_NETWORK_SITE_ID": "<VALUE>",
        "UNIFI_SITE_MANAGER_SITE_ID": "<VALUE>",
        "UNIFI_READ_ONLY": "false",
        "UNIFI_REDACT_SECRETS": "false",
        "UNIFI_MAX_RESULT_BYTES": "100000"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-mguttmann-the-real-unifi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-unifi-mcp"
      ],
      "env": {
        "UNIFI_API_KEY": "<YOUR_VALUE>",
        "UNIFI_CONFIRM_WRITES": "true",
        "UNIFI_API_BASE": "https://api.ui.com",
        "UNIFI_TIMEOUT_MS": "30000",
        "UNIFI_LOG_LEVEL": "info",
        "UNIFI_CONSOLE_ID": "<VALUE>",
        "UNIFI_NETWORK_SITE_ID": "<VALUE>",
        "UNIFI_SITE_MANAGER_SITE_ID": "<VALUE>",
        "UNIFI_READ_ONLY": "false",
        "UNIFI_REDACT_SECRETS": "false",
        "UNIFI_MAX_RESULT_BYTES": "100000"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-mguttmann-the-real-unifi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-unifi-mcp"
      ],
      "env": {
        "UNIFI_API_KEY": "<YOUR_VALUE>",
        "UNIFI_CONFIRM_WRITES": "true",
        "UNIFI_API_BASE": "https://api.ui.com",
        "UNIFI_TIMEOUT_MS": "30000",
        "UNIFI_LOG_LEVEL": "info",
        "UNIFI_CONSOLE_ID": "<VALUE>",
        "UNIFI_NETWORK_SITE_ID": "<VALUE>",
        "UNIFI_SITE_MANAGER_SITE_ID": "<VALUE>",
        "UNIFI_READ_ONLY": "false",
        "UNIFI_REDACT_SECRETS": "false",
        "UNIFI_MAX_RESULT_BYTES": "100000"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-mguttmann-the-real-unifi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-unifi-mcp"
      ],
      "env": {
        "UNIFI_API_KEY": "<YOUR_VALUE>",
        "UNIFI_CONFIRM_WRITES": "true",
        "UNIFI_API_BASE": "https://api.ui.com",
        "UNIFI_TIMEOUT_MS": "30000",
        "UNIFI_LOG_LEVEL": "info",
        "UNIFI_CONSOLE_ID": "<VALUE>",
        "UNIFI_NETWORK_SITE_ID": "<VALUE>",
        "UNIFI_SITE_MANAGER_SITE_ID": "<VALUE>",
        "UNIFI_READ_ONLY": "false",
        "UNIFI_REDACT_SECRETS": "false",
        "UNIFI_MAX_RESULT_BYTES": "100000"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
UNIFI_API_KEY secret Yes Site Manager API key with Network scope. Create one at unifi.ui.com under Settings → API.
UNIFI_CONFIRM_WRITES No If on, destructive tools require confirm: "YES". Only false, 0, no or off (any case) turn it off. Unset, empty, true, 1, yes and on keep it on; an unknown value keeps it on and logs a warning. Default: true
UNIFI_API_BASE No API base URL. This host receives the API key. Must be https:// (plain http:// only for 127.0.0.1, [::1] or localhost) and an origin without path, query or fragment. Default: https://api.ui.com
UNIFI_TIMEOUT_MS No Per-request timeout in milliseconds, covering the response headers and the body. Default: 30000
UNIFI_LOG_LEVEL No Log level: debug | info | warn | error. Default: info
UNIFI_CONSOLE_ID No Override discovery by pinning to a specific UniFi console.
UNIFI_NETWORK_SITE_ID No Override discovery by pinning to a specific Network site.
UNIFI_SITE_MANAGER_SITE_ID No Override discovery by pinning to a specific Site Manager site.
UNIFI_READ_ONLY No Read-only mode: every write tool returns an error and sends no request; reads still work. Off by default. Default: false
UNIFI_REDACT_SECRETS No 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 No 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

Similar servers