Skip to content
MCP server

UniFi Network

Read-only diagnostics and approved changes for a UniFi Network console, via MCP

UniFi Network is an open-source MCP server for cloud and infrastructure. It runs as a hosted remote server, so there is nothing to install locally.

Pricing
Open source
Platforms
CLI, API, Self-hosted
Runs
Remotely
Access
Needs a secret key or token
Version
0.13.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add unifi-mcp --env UNIFI_URL='<UNIFI_URL>' --env UNIFI_API_KEY='<UNIFI_API_KEY>' --env MCP_LAN_ACCESS_TOKEN='<MCP_LAN_ACCESS_TOKEN>' -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e MCP_LAN_ACCESS_TOKEN ghcr.io/graf3x/unifi-mcp:0.13.0

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "MCP_LAN_ACCESS_TOKEN",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "MCP_LAN_ACCESS_TOKEN",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "MCP_LAN_ACCESS_TOKEN",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "unifi-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "MCP_LAN_ACCESS_TOKEN",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add unifi-mcp --env UNIFI_URL='<UNIFI_URL>' --env UNIFI_API_KEY='<UNIFI_API_KEY>' --env MCP_LAN_ACCESS_TOKEN='<MCP_LAN_ACCESS_TOKEN>' -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e MCP_LAN_ACCESS_TOKEN ghcr.io/graf3x/unifi-mcp:0.13.0

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.unifi-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "UNIFI_URL", "-e", "UNIFI_API_KEY", "-e", "MCP_LAN_ACCESS_TOKEN", "ghcr.io/graf3x/unifi-mcp:0.13.0"]
env = { UNIFI_URL = "<UNIFI_URL>", UNIFI_API_KEY = "<UNIFI_API_KEY>", MCP_LAN_ACCESS_TOKEN = "<MCP_LAN_ACCESS_TOKEN>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "unifi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "MCP_LAN_ACCESS_TOKEN",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "<UNIFI_URL>",
        "UNIFI_API_KEY": "<UNIFI_API_KEY>",
        "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "unifi-mcp": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "UNIFI_URL",
            "-e",
            "UNIFI_API_KEY",
            "-e",
            "MCP_LAN_ACCESS_TOKEN",
            "ghcr.io/graf3x/unifi-mcp:0.13.0"
          ],
          "env": {
            "UNIFI_URL": "<UNIFI_URL>",
            "UNIFI_API_KEY": "<UNIFI_API_KEY>",
            "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e UNIFI_URL='<UNIFI_URL>' -e UNIFI_API_KEY='<UNIFI_API_KEY>' -e MCP_LAN_ACCESS_TOKEN='<MCP_LAN_ACCESS_TOKEN>' unifi-mcp docker -- run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e MCP_LAN_ACCESS_TOKEN ghcr.io/graf3x/unifi-mcp:0.13.0

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "unifi-mcp": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "UNIFI_URL",
            "-e",
            "UNIFI_API_KEY",
            "-e",
            "MCP_LAN_ACCESS_TOKEN",
            "ghcr.io/graf3x/unifi-mcp:0.13.0"
          ],
          "env": {
            "UNIFI_URL": "<UNIFI_URL>",
            "UNIFI_API_KEY": "<UNIFI_API_KEY>",
            "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "unifi-mcp": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "UNIFI_URL",
            "-e",
            "UNIFI_API_KEY",
            "-e",
            "MCP_LAN_ACCESS_TOKEN",
            "ghcr.io/graf3x/unifi-mcp:0.13.0"
          ],
          "env": {
            "UNIFI_URL": "<UNIFI_URL>",
            "UNIFI_API_KEY": "<UNIFI_API_KEY>",
            "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "unifi-mcp": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "UNIFI_URL",
            "-e",
            "UNIFI_API_KEY",
            "-e",
            "MCP_LAN_ACCESS_TOKEN",
            "ghcr.io/graf3x/unifi-mcp:0.13.0"
          ],
          "env": {
            "UNIFI_URL": "<UNIFI_URL>",
            "UNIFI_API_KEY": "<UNIFI_API_KEY>",
            "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "unifi-mcp": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "UNIFI_URL",
            "-e",
            "UNIFI_API_KEY",
            "-e",
            "MCP_LAN_ACCESS_TOKEN",
            "ghcr.io/graf3x/unifi-mcp:0.13.0"
          ],
          "env": {
            "UNIFI_URL": "<UNIFI_URL>",
            "UNIFI_API_KEY": "<UNIFI_API_KEY>",
            "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "unifi-mcp": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "UNIFI_URL",
            "-e",
            "UNIFI_API_KEY",
            "-e",
            "MCP_LAN_ACCESS_TOKEN",
            "ghcr.io/graf3x/unifi-mcp:0.13.0"
          ],
          "env": {
            "UNIFI_URL": "<UNIFI_URL>",
            "UNIFI_API_KEY": "<UNIFI_API_KEY>",
            "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "unifi-mcp": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "UNIFI_URL",
            "-e",
            "UNIFI_API_KEY",
            "-e",
            "MCP_LAN_ACCESS_TOKEN",
            "ghcr.io/graf3x/unifi-mcp:0.13.0"
          ],
          "env": {
            "UNIFI_URL": "<UNIFI_URL>",
            "UNIFI_API_KEY": "<UNIFI_API_KEY>",
            "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "unifi-mcp": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "UNIFI_URL",
            "-e",
            "UNIFI_API_KEY",
            "-e",
            "MCP_LAN_ACCESS_TOKEN",
            "ghcr.io/graf3x/unifi-mcp:0.13.0"
          ],
          "env": {
            "UNIFI_URL": "<UNIFI_URL>",
            "UNIFI_API_KEY": "<UNIFI_API_KEY>",
            "MCP_LAN_ACCESS_TOKEN": "<MCP_LAN_ACCESS_TOKEN>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • UNIFI_URLThe console's address as the container reaches it, e.g. https://192.168.1.1.Required
  • UNIFI_API_KEYAn API key from UniFi Network, Settings, Control Plane, Integrations. It is console-wide.Required
  • UNIFI_CERT_SHA256The console's public key SHA-256: empty at first, then the value the README's Before you start shows how to confirm.
  • MCP_LAN_LISTENThe token-only listener inside the container. The -p argument decides who reaches it.
  • MCP_LAN_ACCESS_TOKENThe listener's token, at least 32 characters, e.g. from openssl rand -hex 32.Required

About UniFi Network

Ask an AI assistant plain questions about a UniFi network and get finished answers: which clients are on the guest network, which switch port a device uses, whether the connection dropped, and which access points sit on a busy channel. The server runs on your own network next to one console and talks to its local API, so no UI.com account or cloud service is involved.

Reads are the default. When writes are enabled, every change is shown in full on a form that you accept or decline, and the model cannot approve it on your behalf. Wi-Fi passphrases, per-network keys and voucher codes are replaced with placeholders before the assistant sees them, and TLS to the console is pinned to its certificate or public key.

It suits people who run a UniFi Network console at home or in a small office and use an MCP-capable client such as Claude. Remote access is possible through a Cloudflare tunnel or a token-protected LAN listener, and setup is handled by a local page that tests each setting.

Tools this server provides (14)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 5 of 14 tools read data; 9 names don't say.

From the server's own tool labels and tool names; not verified by us.

who_is_on_network_faq
Lists who is on the network right now.
client_path_faq
Shows which switch port a client is connected to.
dhcp_reservation_faq
Checks whether a device gets its reserved fixed IP.
internet_health_faq
Reports recent internet drops and packet loss.
wifi_health_faq
Finds access points on busy or noisy channels.
device_diagnostics_faq
Reports switch port errors, drops and flapping links.
system_log
Reads console system log entries.
network_health_faq
Lists offline devices and pending firmware updates.
list_port_forwardsName suggests: reads
Lists ports forwarded to the internet.
getting_started
Explains setup and configuration status.
unifi_statusName suggests: reads
Reports the server's connection status to the console.
search_operationsName suggests: reads
Finds an available API operation by name.
describe_operationName suggests: reads
Shows the schema for an API operation.
call_read_operationName suggests: reads
Runs a read-only API operation.

What it does

Question-based diagnostics
Composite tools answer everyday network questions such as client location, DHCP reservations and recent internet health.
Read-only by default
Write tools are hidden unless writes are explicitly enabled, and each change needs approval on a confirmation form.
Credential redaction
Wi-Fi passphrases, per-network keys and voucher codes are masked before answers reach the assistant.
Pinned console TLS
The connection to the console is pinned to its certificate or public key, or checked against a trusted CA.
Throttled console access
Reads are rate-limited and cached to avoid overloading the console's internal API.
Setup and tunnel checks
A local setup page tests the console, certificate, API key and tunnel, and explains what to fix.

Good for

  • Find which switch port a device is connected to when troubleshooting
  • Check whether an access point is on a noisy or busy Wi-Fi channel
  • Review recent internet drops and packet loss over the past days
  • List devices that are offline or have firmware updates waiting
  • Add a DNS record for a local host with explicit approval for each change

Pricing

Open source

UniFi Network FAQ

Does UniFi Network need a UI.com account or cloud access?

No. The server talks to the console over your network with a local API key and sends nothing to Ubiquiti's cloud.

Can the assistant change my network without asking?

Only if writes are turned on. Each change is then shown in full on a form that you accept or decline yourself.

Is UniFi Network free?

Yes. UniFi Network is open source, so you can use and self-host it for free.

How do I add UniFi Network to Claude Code?

Run this command in your terminal: claude mcp add unifi-mcp --env UNIFI_URL='<UNIFI_URL>' --env UNIFI_API_KEY='<UNIFI_API_KEY>' --env MCP_LAN_ACCESS_TOKEN='<MCP_LAN_ACCESS_TOKEN>' -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e MCP_LAN_ACCESS_TOKEN ghcr.io/graf3x/unifi-mcp:0.13.0

What are the best alternatives to UniFi Network?

The closest alternatives to UniFi Network are UniFi, Unifi, UniFi Network MCP, UniFi Site Manager and Network (unofficial) and UniFi RMCP.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers