Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Go Unifi MCP

by claytonoversion 0.3.1i★ 6iRuns on your computerRepository ↗
Registry nameio.github.claytono/go-unifi-mcp

How to install

What it does

Manage UniFi sites, devices, clients, networks, port forwarding, DNS, and firewall

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Cybersecurity

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity10/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score22/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Go Unifi MCP. Follow https://mcp.popnx.com/i/claytono-go-unifi-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 13, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Go Unifi MCP for Claude on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "go-unifi": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/claytono/go-unifi-mcp:v0.3.1" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Go Unifi MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "go-unifi": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "ghcr.io/claytono/go-unifi-mcp:v0.3.1"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Go Unifi MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Go Unifi MCP or shows a Go Unifi MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Go Unifi MCP yet

Go Unifi MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Go Unifi MCP

  • Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Docker on your computer first (one time)
  • Install Docker on your computer first (one time)
  • Install Docker on your computer first (one time)

B · Others in Cybersecurity that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Go Unifi MCP for Claude Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user go-unifi -- docker run -i --rm ghcr.io/claytono/go-unifi-mcp:v0.3.1 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Go Unifi MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user go-unifi -- docker run -i --rm ghcr.io/claytono/go-unifi-mcp:v0.3.1
  4. Type /mcp in Claude Code

    You should see Go Unifi MCP listed as connected

  5. Try it

    Use Go Unifi MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Go Unifi MCP or shows a Go Unifi MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Go Unifi MCP for Cursor on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "go-unifi": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/claytono/go-unifi-mcp:v0.3.1" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Go Unifi MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Go Unifi MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Go Unifi MCP or shows a Go Unifi MCP tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Go Unifi MCP for VS Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "go-unifi": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/claytono/go-unifi-mcp:v0.3.1" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Go Unifi MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Go Unifi MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Go Unifi MCP or shows a Go Unifi MCP tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Go Unifi MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user go-unifi -- docker run -i --rm ghcr.io/claytono/go-unifi-mcp:v0.3.1

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "go-unifi": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/claytono/go-unifi-mcp:v0.3.1"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "go-unifi": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/claytono/go-unifi-mcp:v0.3.1"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "go-unifi": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/claytono/go-unifi-mcp:v0.3.1"
      ]
    }
  }
}

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
Not on npm/PyPI
Licencei
MPL-2.0
Connection
Runs on your computer
Latest versioni
0.3.1
Published to registryi
Jul 25, 2026
Code last changedi
Nov 16, 2026
Maker
claytono
Packages
oci: ghcr.io/claytono/go-unifi-mcp:v0.3.1
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 20, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account claytono, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 4 days ago

  • ✓ Pass

    Has a licence

    Uses MPL-2.0

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked: only npm and PyPI packages with a version can be checked

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/claytono-go-unifi-mcp.svg)](https://mcp.popnx.com/en/servers/claytono-go-unifi-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Cybersecurityi

  • More stars than 90% of the other 1120 servers in this category
  • Published to the registry more recently than 24% of the other 1120 servers in this category
  • Basic checks equal to or better than 99% of the other 1120 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Go Unifi MCP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 4 days ago, and the latest version (0.3.1) reached the registry 4 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Docker on your computer.

What can I use instead?

In the same category: GitHits, Dependency Management MCP Server, Snyk MCP, TokenSafe, Draugr

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

GitHits

Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.

by githits-comGrowing↓ 3.8K/wk★ 138Updated yesterday

Computer or cloud✓ service owner · githits.com

Snyk MCP

Easily find and fix security issues in your applications leveraging Snyk platform capabilities.

by snykWidely used↓ 762.1K/wk★ 61Updated 7 months ago

Runs on your computer✓ service owner · snyk.io

TokenSafe

Your AI agent is smart enough to code all day. Local firewall & zero-loss runtime.

by tokensafe-devWidely used↓ 6.8K/wk★ 47Updated yesterday

Computer or cloud✓ service owner · tokensafe.dev

Draugr

Security scanning for AI agents: SAST, SCA, secrets, IaC, DAST, ranked by real risk.

by draugr-devEarly★ 30Updated 3 days ago

Runs on your computer✓ service owner · draugr.dev
Compared with similar ones
This one
Go Unifi MCP
GitHitsDependency Management MCP ServerSnyk MCPTokenSafeDraugr
Runs whereInstalls on your computerCloud or install on your computerRuns in the cloud, nothing to installInstalls on your computerCloud or install on your computerInstalls on your computer
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/35/53/43/35/53/3
LicenseMPL-2.0Apache-2.0–Apache-2.0MITApache-2.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

go-unifi-mcp

A Model Context Protocol (MCP) server for UniFi Network Controller, written in Go.

Overview

go-unifi-mcp provides an MCP interface to UniFi Network Controller, enabling AI assistants and other MCP clients to interact with your UniFi infrastructure.

Why this exists

I couldn’t find an MCP server that supported both v1 and v2 firewall rules and IPv6, so I built one. This wraps the go-unifi library (which I trust from my Terraform provider experience) and leans on its generated API surface. The server is generated from the controller’s own API definitions, which makes it much easier to keep tool coverage up to date as UniFi evolves.

UniFi controller versioning

This project generates tools against the same UniFi Controller version pinned by go-unifi. When go-unifi updates its supported controller version, we regenerate our field definitions and tool metadata to match. We support the same controller range; see their controller support range.

Installation

Binary (GitHub Releases)

Download pre-built binaries from the Releases page. Binaries are available for macOS and Linux (amd64/arm64).

# macOS (Apple Silicon)

curl -L https://github.com/claytono/go-unifi-mcp/releases/latest/download/go-unifi-mcp_darwin_arm64.tar.gz | tar xz sudo mv go-unifi-mcp /usr/local/bin/

macOS (Intel)

curl -L https://github.com/claytono/go-unifi-mcp/releases/latest/download/go-unifi-mcp_darwin_amd64.tar.gz | tar xz sudo mv go-unifi-mcp /usr/local/bin/

Linux (amd64)

curl -L https://github.com/claytono/go-unifi-mcp/releases/latest/download/go-unifi-mcp_linux_amd64.tar.gz | tar xz sudo mv go-unifi-mcp /usr/local/bin/

Linux (arm64)

curl -L https://github.com/claytono/go-unifi-mcp/releases/latest/download/go-unifi-mcp_linux_arm64.tar.gz | tar xz sudo mv go-unifi-mcp /usr/local/bin/

Homebrew

Available from the claytono/homebrew-tap tap:

brew install claytono/tap/go-unifi-mcp
Nix
# Run without installing

nix run github:claytono/go-unifi-mcp

Install to your profile

nix profile install github:claytono/go-unifi-mcp

Docker

Multi-architecture images (amd64/arm64) are published to GitHub Container Registry.

# Latest (pinned to most recent release, rebuilt on base image updates)

docker pull ghcr.io/claytono/go-unifi-mcp:latest

Edge (built from main on every merge, unstable)

docker pull ghcr.io/claytono/go-unifi-mcp:edge

Go Install
go install github.com/claytono/go-unifi-mcp/cmd/go-unifi-mcp@latest

Configuration

UniFi Credentials

The server requires access to a UniFi Network Controller. Two authentication methods are supported:

  1. API Key (preferred): Create an API key in your UniFi controller under Settings > Control Plane > Integrations. Set UNIFI_HOST and UNIFI_API_KEY.
  1. Username/Password: Use a local admin account. Set UNIFI_HOST, UNIFI_USERNAME, and UNIFI_PASSWORD.
Claude Desktop

Add to your claude_desktop_config.json:

Using the binary:

{

"mcpServers": { "unifi": { "command": "/usr/local/bin/go-unifi-mcp", "env": { "UNIFI_HOST": "https://your-controller:443", "UNIFI_API_KEY": "your-api-key" } } } }

Using Docker:

{

"mcpServers": { "unifi": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "UNIFI_HOST", "-e", "UNIFI_API_KEY", "ghcr.io/claytono/go-unifi-mcp:latest" ], "env": { "UNIFI_HOST": "https://your-controller:443", "UNIFI_API_KEY": "your-api-key" } } } }

Claude Code
claude mcp add unifi -- go-unifi-mcp

Then set the required environment variables in your shell before running claude.

Environment Variables
VariableRequiredDefaultDescription
UNIFI_HOSTYes—UniFi controller URL
UNIFI_API_KEY\*—API key (preferred auth method)
UNIFI_USERNAME\*—Username for password auth
UNIFI_PASSWORD\*—Password for password auth
UNIFI_SITENodefaultUniFi site name
UNIFI_VERIFY_SSLNotrueWhether to verify SSL certs
UNIFI_LOG_LEVELNoerrorgo-unifi client log level
UNIFI_TOOL_MODENolazyTool registration mode

\* Either UNIFI_API_KEY or both UNIFI_USERNAME and UNIFI_PASSWORD must be set.

Log Levels

The UNIFI_LOG_LEVEL variable controls logging from the underlying go-unifi client library. The default is error because the client otherwise emits INFO messages to stderr, which can interfere with tools like mcp-cli that parse JSON on stdout/stderr.

LevelDescription
disabledNo logging
traceMost verbose, including wire details
debugDebug messages
infoInformational messages
warnWarnings only
errorErrors only (default)
Tool Modes

The server supports two tool registration modes, following the pattern established by unifi-network-mcp:

ModeToolsContext SizeDescription
lazy3~200 tokensMeta-tools only (default, recommended for LLMs)
eager252~55K tokensAll tools registered directly

Lazy mode (default) registers only 3 meta-tools that provide access to 252 UniFi operations (generated from the controller API):

  • tool_index - Search/filter the tool catalog by category or resource
  • execute - Execute any tool by name with arguments
  • batch - Execute multiple tools in parallel

This dramatically reduces context window usage while preserving full functionality. The LLM first queries the index to find relevant tools, then executes them via the dispatcher.

Eager mode registers all 252 tools directly, which may be useful for non-LLM clients or debugging but consumes significant context.

Update semantics: Updates use a read-modify-write flow against the controller API. We fetch the current resource, merge your fields, and submit the full object. This avoids clearing unspecified fields, but it is not atomic and concurrent updates can race (last write wins) because the UniFi API does not expose etags or revision IDs. In practice this is unlikely to be an issue, but it's something to be aware of.

ID Resolution

Responses from the UniFi API contain opaque ID references (e.g. network_id, usergroup_id, networkconf_id). By default, the server resolves these to human-readable names by looking up the referenced resource and injecting a sibling _name field:

{

"src_networkconf_id": "609fbf24e3ae433962e000de", "src_networkconf_name": "IOT" }

Resolution uses a per-request cache, so listing 100 firewall rules that reference networks only makes one additional ListNetwork API call. Typical overhead is 10-40ms depending on how many distinct resource types are referenced.

To disable resolution for a specific call, pass "resolve": false in the tool arguments.

Query Parameters

All list operations support optional post-processing parameters for filtering and projecting results.

filter — Match items by field values. Supports three operators:

// Exact match

{"filter": {"type": "usw"}}

// Substring match (case-insensitive) {"filter": {"name": {"contains": "office"}}}

// Regular expression (RE2 syntax: https://github.com/google/re2/wiki/Syntax) {"filter": {"name": {"regex": "^ap-.*"}}}

// Multiple conditions (ANDed together) {"filter": {"type": "uap", "name": {"contains": "echo"}}}

search — Case-insensitive full-text search across all string field values:

{ "search": "living room" }

fields — Project the response to include only specific keys:

{ "fields": ["name", "ip", "mac"] }

Parameters can be combined. Execution order is filter → search → fields, so you can filter on fields that are excluded from the output:

{

"filter": { "type": "uap" }, "search": "echo", "fields": ["name", "ip"] }

Development

Prerequisites
  • Nix with flakes enabled
  • direnv (optional but recommended)
Developing
# Clone the repository

git clone https://github.com/claytono/go-unifi-mcp.git cd go-unifi-mcp

Enter the development environment

nix develop

Or with direnv:

direnv allow

Install pre-commit hooks

pre-commit install

Run linters

task lint

Run tests

task test

Run tests with coverage

task coverage

Available Tasks
task lint        # Run linters via pre-commit

task test # Run tests task coverage # Run tests with coverage checks task build # Build the binary task generate # Run go generate

Testing with mcp-cli

The development environment includes mcp-cli for interactive testing of the MCP server.

  1. Create .envrc.local with your UniFi credentials (not tracked in git):
   export UNIFI_HOST="https://your-controller:443"

export UNIFI_API_KEY="your-api-key"

Or use username/password:

export UNIFI_USERNAME="admin"

export UNIFI_PASSWORD="password"

  1. Build the binary:
   task build
  1. Test with mcp-cli:

The .mcp_servers.json config provides two server entries:

  • go-unifi-mcp - eager mode (252 tools)
  • go-unifi-mcp-lazy - lazy mode (3 meta-tools)

Eager mode (direct tool access):

   # List tools (shows all 252)

mcp-cli info go-unifi-mcp

Call a tool directly

mcp-cli call go-unifi-mcp list_device '{}' mcp-cli call go-unifi-mcp list_network '{"site": "default"}'

Lazy mode (meta-tools):

   # List tools (shows only 3 meta-tools)

mcp-cli info go-unifi-mcp-lazy

Query the tool index

mcp-cli call go-unifi-mcp-lazy tool_index '{}' mcp-cli call go-unifi-mcp-lazy tool_index '{"category": "list"}' mcp-cli call go-unifi-mcp-lazy tool_index '{"resource": "network"}'

Execute a tool via the dispatcher

mcp-cli call go-unifi-mcp-lazy execute '{"tool": "list_device", "arguments": {}}'

Batch execute multiple tools

mcp-cli call go-unifi-mcp-lazy batch '{"calls": [{"tool": "list_network", "arguments": {}}, {"tool": "list_device", "arguments": {}}]}'

Credits

This project builds upon:

  • go-unifi - Go client library for UniFi Network Controller
  • unifi-network-mcp - Python MCP server for UniFi that inspired this project
  • mcp-go - Go SDK for Model Context Protocol

License

MPL-2.0