原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

UniFi

作者:mattoddie版本 0.9.1i★ 1i在你的电脑上运行官方网站 ↗
注册名称io.github.mattoddie/unifi-mcp

安装方法

What it does

Manage a Ubiquiti UniFi network: devices, clients, WiFi, firewall and VPN. Read-only by default.

  • Connects 在你的电脑上运行
  • Account or key Needs UNIFI_API_KEY, UNIFI_PASSWORD · 2 settings to fill in (UNIFI_URL, UNIFI_USERNAME)
  • Category 网络安全

为什么排在这里

列表按使用分(满分 100)排序,由以下部分组成

热度4/80GitHub 星标或每周下载量:较大的计 60,较小的计 20
新鲜度12/1230 天内有发布或代码更新得满分
仍在响应0/8上次检查时云端端点有响应
使用分16/100

质量: 基础检查通过 3/3 项(仅展示,不用于排序) · 上升势头: 暂无数据 (只用于“上升中”标签)

安装

选择你使用的 AI 应用,然后复制设置。

用一句话让 AI 帮你安装

请帮我安装 UniFi。按照 https://mcp.popnx.com/i/mattoddie-unifi-mcp.md 操作,先把命令给我看,等我同意后再运行。

粘贴到能在你电脑上工作的 AI(如 Claude Code、Cursor)。它会读取我们的步骤,先给你看命令,等你同意。无需密钥,无需注册。 · 查看 AI 会读取的全文

通过 3/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月17日

第一步:你用哪个 AI?

选择你用的应用,步骤会显示在下方。

可连接 Claude,但需要先准备

需要 UniFi 的密钥(在开发者网站创建) · 需要填写 2 项设置(UNIFI_URL, UNIFI_USERNAME) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用

  1. 下载开发者的安装文件

    下载作者的 .mcpb 文件

    .mcpb 文件直接来自开发者,我们没有修改

  2. 双击文件,然后在电脑版 Claude 应用中点击 Install

  3. 试一试

    用 UniFi 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude 说正在使用 UniFi,或回答中出现 UniFi 的工具名称,就表示连接成功

10 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • MCP_TRANSPORT 该镜像默认通过 HTTP 提供服务;设置此项后将改为通过 stdio 运行。
    查看英文原文The image serves HTTP by default; this runs it over stdio.
    · 默认值 stdio
  • UNIFI_TLS_FINGERPRINT 推荐用于使用自签名证书的 https 控制器:填写其 SHA-256 指纹以进行固定。
    查看英文原文Recommended for an https controller with a self-signed certificate: its SHA-256 fingerprint, to pin it.
  • UNIFI_VERIFY_SSL 设置了指纹时请留空。true:公开受信任的证书。false:跳过检查(不安全)。
    查看英文原文Leave empty when you set a fingerprint. true: publicly trusted certificate. false: skip the check (insecure).
  • UNIFI_SITE 站点的简称,在请求未指定站点时使用。
    查看英文原文The site's short name, used when a request doesn't name a site.
    · 默认值 default
  • UNIFI_ALLOW_WRITES 允许更改:重启设备、阻止客户端、编辑WiFi、防火墙和网络。关闭则为只读。
    查看英文原文Allow changes: restart devices, block clients, edit WiFi, firewall and networks. Off means read-only.
    · 默认值 false
  • UNIFI_ALLOW_DELETES 同时允许删除配置和忘记客户端。需要 UNIFI_ALLOW_WRITES。
    查看英文原文Also allow deleting configuration and forgetting clients. Needs UNIFI_ALLOW_WRITES.
    · 默认值 false
  • UNIFI_ALLOW_SECRETS 允许输出未脱敏的密码和密钥(include_secrets)以及WiFi二维码工具。关闭时所有输出均保持脱敏。
    查看英文原文Allow unredacted passwords and keys (include_secrets) and the WiFi QR tool. Off keeps all output redacted.
    · 默认值 false
  • UNIFI_TOOLSETS 可选的逗号分隔列表,用于暴露较少的工具,例如 overview,devices,clients。为空表示全部,但 raw 除外,必须按名称单独列出。
    查看英文原文Optional comma-separated list to expose fewer tools, e.g. overview,devices,clients. Empty means all except raw, which has to be listed by name.
  • UNIFI_RAW_ALLOWED_PATHS 可选的逗号分隔 API 路径前缀列表,例如 /api/s/default/stat,用于将原始 API 工具(toolset raw)限制在这些路径内。为空则允许任意路径。
    查看英文原文Optional comma-separated API path prefixes, e.g. /api/s/default/stat, that limit the raw API tool (toolset raw) to those paths. Empty allows any path.
  • UNIFI_AUDIT_LOG 设置为 stderr 可将助手所做或预览的每项更改以 JSON 行记录。为空时关闭。
    查看英文原文Set to stderr to log every change the assistant makes or previews as JSON lines. Off when empty.

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

ChatGPT 暂时无法连接 UniFi

UniFi 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器

你可以改用这些方式

A · 使用能连接 UniFi 的应用

  • 需要 UniFi 的密钥(在开发者网站创建) · 需要填写 2 项设置(UNIFI_URL, UNIFI_USERNAME) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
  • 需要 UniFi 的密钥(在开发者网站创建) · 需要填写 2 项设置(UNIFI_URL, UNIFI_USERNAME) · 需要先在电脑上安装 Docker(只需一次)
  • 需要 UniFi 的密钥(在开发者网站创建) · 需要填写 2 项设置(UNIFI_URL, UNIFI_USERNAME) · 需要先在电脑上安装 Docker(只需一次)
  • 需要 UniFi 的密钥(在开发者网站创建) · 需要填写 2 项设置(UNIFI_URL, UNIFI_USERNAME) · 需要先在电脑上安装 Docker(只需一次)

B · 网络安全 类中能连接 ChatGPT 的其他服务器

从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的

可连接 Claude Code,但需要先准备

需要 UniFi 的密钥(在开发者网站创建) · 需要填写 2 项设置(UNIFI_URL, UNIFI_USERNAME) · 需要先在电脑上安装 Docker(只需一次)

让 AI 帮你安装

把这段话复制到 Claude Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude Code 安装 MCP server UniFi,按顺序:1) 用 docker --version 检查是否有 Docker。没有的话,请让我从 https://www.docker.com/products/docker-desktop/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):claude mcp add --scope user unifi --env UNIFI_URL=your-value --env UNIFI_API_KEY=your-value --env UNIFI_USERNAME=your-value --env UNIFI_PASSWORD=your-value -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e UNIFI_USERNAME -e UNIFI_PASSWORD ghcr.io/mattoddie/unifi-mcp:0.9.1 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) UNIFI_API_KEY, UNIFI_PASSWORD, UNIFI_URL, UNIFI_USERNAME 先保留 "your-value",请我自己把真实值粘贴到文件或应用的输入框里。不要让我在对话里输入密钥。5) 按约定执行,然后确认 UniFi 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Docker(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    docker --version
    • 显示版本号(例如 Docker version …)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 安装 Docker Desktop:Mac 打开 Docker.dmg,把图标拖到“应用程序”(按电脑选择 Apple silicon 或 Intel 版本)· Windows 双击 Docker Desktop Installer.exe · 装好后打开 Docker Desktop 应用并保持运行。不需要 curl 命令

    打开 Docker 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: docker --version

    安装一次,所有需要 Docker 的工具都能用

  2. 注册并创建 UniFi 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。价格和免费方案请看开发者网站。

    打开 UniFi 网站 ↗

  3. 填写 2 项设置

    这些是程序设置,不是密钥,无需注册。按开发者的说明填写。

    • UNIFI_URL 您的UniFi控制台地址。对于旧版自托管Network应用,请包含端口。
      查看英文原文Address of your UniFi console. For a legacy self-hosted Network application, include the port.
    • UNIFI_USERNAME 本地(非Ubiquiti云)账户,可替代API密钥使用。旧版控制器必需。
      查看英文原文A local (not Ubiquiti cloud) account, used instead of an API key. Required for legacy controllers.

    说明为自动翻译,变量名保持原样;不确定时请查看原文。

  4. 打开终端

    Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell

  5. 粘贴这条命令并按 Enter

    claude mcp add --scope user unifi --env UNIFI_URL=your-value --env UNIFI_API_KEY=your-value --env UNIFI_USERNAME=your-value --env UNIFI_PASSWORD=your-value -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e UNIFI_USERNAME -e UNIFI_PASSWORD ghcr.io/mattoddie/unifi-mcp:0.9.1

    按 Enter 前,把“your-value”改成你的密钥

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  6. 在 Claude Code 中输入 /mcp

    应能看到 UniFi 在列表中并显示已连接

  7. 试一试

    用 UniFi 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude Code 说正在使用 UniFi,或回答中出现 UniFi 的工具名称,就表示连接成功

10 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • MCP_TRANSPORT 该镜像默认通过 HTTP 提供服务;设置此项后将改为通过 stdio 运行。
    查看英文原文The image serves HTTP by default; this runs it over stdio.
    · 默认值 stdio
  • UNIFI_TLS_FINGERPRINT 推荐用于使用自签名证书的 https 控制器:填写其 SHA-256 指纹以进行固定。
    查看英文原文Recommended for an https controller with a self-signed certificate: its SHA-256 fingerprint, to pin it.
  • UNIFI_VERIFY_SSL 设置了指纹时请留空。true:公开受信任的证书。false:跳过检查(不安全)。
    查看英文原文Leave empty when you set a fingerprint. true: publicly trusted certificate. false: skip the check (insecure).
  • UNIFI_SITE 站点的简称,在请求未指定站点时使用。
    查看英文原文The site's short name, used when a request doesn't name a site.
    · 默认值 default
  • UNIFI_ALLOW_WRITES 允许更改:重启设备、阻止客户端、编辑WiFi、防火墙和网络。关闭则为只读。
    查看英文原文Allow changes: restart devices, block clients, edit WiFi, firewall and networks. Off means read-only.
    · 默认值 false
  • UNIFI_ALLOW_DELETES 同时允许删除配置和忘记客户端。需要 UNIFI_ALLOW_WRITES。
    查看英文原文Also allow deleting configuration and forgetting clients. Needs UNIFI_ALLOW_WRITES.
    · 默认值 false
  • UNIFI_ALLOW_SECRETS 允许输出未脱敏的密码和密钥(include_secrets)以及WiFi二维码工具。关闭时所有输出均保持脱敏。
    查看英文原文Allow unredacted passwords and keys (include_secrets) and the WiFi QR tool. Off keeps all output redacted.
    · 默认值 false
  • UNIFI_TOOLSETS 可选的逗号分隔列表,用于暴露较少的工具,例如 overview,devices,clients。为空表示全部,但 raw 除外,必须按名称单独列出。
    查看英文原文Optional comma-separated list to expose fewer tools, e.g. overview,devices,clients. Empty means all except raw, which has to be listed by name.
  • UNIFI_RAW_ALLOWED_PATHS 可选的逗号分隔 API 路径前缀列表,例如 /api/s/default/stat,用于将原始 API 工具(toolset raw)限制在这些路径内。为空则允许任意路径。
    查看英文原文Optional comma-separated API path prefixes, e.g. /api/s/default/stat, that limit the raw API tool (toolset raw) to those paths. Empty allows any path.
  • UNIFI_AUDIT_LOG 设置为 stderr 可将助手所做或预览的每项更改以 JSON 行记录。为空时关闭。
    查看英文原文Set to stderr to log every change the assistant makes or previews as JSON lines. Off when empty.

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

可连接 Cursor,但需要先准备

需要 UniFi 的密钥(在开发者网站创建) · 需要填写 2 项设置(UNIFI_URL, UNIFI_USERNAME) · 需要先在电脑上安装 Docker(只需一次)

让 AI 帮你安装

把这段话复制到 Cursor 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Cursor 安装 MCP server UniFi,按顺序:1) 用 docker --version 检查是否有 Docker。没有的话,请让我从 https://www.docker.com/products/docker-desktop/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "unifi": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "UNIFI_URL", "-e", "UNIFI_API_KEY", "-e", "UNIFI_USERNAME", "-e", "UNIFI_PASSWORD", "ghcr.io/mattoddie/unifi-mcp:0.9.1" ], "env": { "UNIFI_URL": "your-value", "UNIFI_API_KEY": "your-value", "UNIFI_USERNAME": "your-value", "UNIFI_PASSWORD": "your-value" } } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) UNIFI_API_KEY, UNIFI_PASSWORD, UNIFI_URL, UNIFI_USERNAME 先保留 "your-value",请我自己把真实值粘贴到文件或应用的输入框里。不要让我在对话里输入密钥。5) 按约定执行,然后确认 UniFi 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Docker(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    docker --version
    • 显示版本号(例如 Docker version …)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 安装 Docker Desktop:Mac 打开 Docker.dmg,把图标拖到“应用程序”(按电脑选择 Apple silicon 或 Intel 版本)· Windows 双击 Docker Desktop Installer.exe · 装好后打开 Docker Desktop 应用并保持运行。不需要 curl 命令

    打开 Docker 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: docker --version

    安装一次,所有需要 Docker 的工具都能用

  2. 注册并创建 UniFi 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。价格和免费方案请看开发者网站。

    打开 UniFi 网站 ↗

  3. 填写 2 项设置

    这些是程序设置,不是密钥,无需注册。按开发者的说明填写。

    • UNIFI_URL 您的UniFi控制台地址。对于旧版自托管Network应用,请包含端口。
      查看英文原文Address of your UniFi console. For a legacy self-hosted Network application, include the port.
    • UNIFI_USERNAME 本地(非Ubiquiti云)账户,可替代API密钥使用。旧版控制器必需。
      查看英文原文A local (not Ubiquiti cloud) account, used instead of an API key. Required for legacy controllers.

    说明为自动翻译,变量名保持原样;不确定时请查看原文。

  4. 点击这个按钮打开 Cursor

    在 Cursor 中打开

    Cursor 会请你确认安装,点击 Install

  5. 填写你的密钥

    在 UniFi 的设置中,UNIFI_API_KEY, UNIFI_PASSWORD, UNIFI_URL, UNIFI_USERNAME 还是空的,填入你的密钥并保存

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  6. 在 Cursor 中以 Agent 模式打开 AI 聊天

  7. 试一试

    用 UniFi 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Cursor 说正在使用 UniFi,或回答中出现 UniFi 的工具名称,就表示连接成功

10 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • MCP_TRANSPORT 该镜像默认通过 HTTP 提供服务;设置此项后将改为通过 stdio 运行。
    查看英文原文The image serves HTTP by default; this runs it over stdio.
    · 默认值 stdio
  • UNIFI_TLS_FINGERPRINT 推荐用于使用自签名证书的 https 控制器:填写其 SHA-256 指纹以进行固定。
    查看英文原文Recommended for an https controller with a self-signed certificate: its SHA-256 fingerprint, to pin it.
  • UNIFI_VERIFY_SSL 设置了指纹时请留空。true:公开受信任的证书。false:跳过检查(不安全)。
    查看英文原文Leave empty when you set a fingerprint. true: publicly trusted certificate. false: skip the check (insecure).
  • UNIFI_SITE 站点的简称,在请求未指定站点时使用。
    查看英文原文The site's short name, used when a request doesn't name a site.
    · 默认值 default
  • UNIFI_ALLOW_WRITES 允许更改:重启设备、阻止客户端、编辑WiFi、防火墙和网络。关闭则为只读。
    查看英文原文Allow changes: restart devices, block clients, edit WiFi, firewall and networks. Off means read-only.
    · 默认值 false
  • UNIFI_ALLOW_DELETES 同时允许删除配置和忘记客户端。需要 UNIFI_ALLOW_WRITES。
    查看英文原文Also allow deleting configuration and forgetting clients. Needs UNIFI_ALLOW_WRITES.
    · 默认值 false
  • UNIFI_ALLOW_SECRETS 允许输出未脱敏的密码和密钥(include_secrets)以及WiFi二维码工具。关闭时所有输出均保持脱敏。
    查看英文原文Allow unredacted passwords and keys (include_secrets) and the WiFi QR tool. Off keeps all output redacted.
    · 默认值 false
  • UNIFI_TOOLSETS 可选的逗号分隔列表,用于暴露较少的工具,例如 overview,devices,clients。为空表示全部,但 raw 除外,必须按名称单独列出。
    查看英文原文Optional comma-separated list to expose fewer tools, e.g. overview,devices,clients. Empty means all except raw, which has to be listed by name.
  • UNIFI_RAW_ALLOWED_PATHS 可选的逗号分隔 API 路径前缀列表,例如 /api/s/default/stat,用于将原始 API 工具(toolset raw)限制在这些路径内。为空则允许任意路径。
    查看英文原文Optional comma-separated API path prefixes, e.g. /api/s/default/stat, that limit the raw API tool (toolset raw) to those paths. Empty allows any path.
  • UNIFI_AUDIT_LOG 设置为 stderr 可将助手所做或预览的每项更改以 JSON 行记录。为空时关闭。
    查看英文原文Set to stderr to log every change the assistant makes or previews as JSON lines. Off when empty.

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同

可连接 VS Code,但需要先准备

需要 UniFi 的密钥(在开发者网站创建) · 需要填写 2 项设置(UNIFI_URL, UNIFI_USERNAME) · 需要先在电脑上安装 Docker(只需一次)

让 AI 帮你安装

把这段话复制到 VS Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 VS Code 安装 MCP server UniFi,按顺序:1) 用 docker --version 检查是否有 Docker。没有的话,请让我从 https://www.docker.com/products/docker-desktop/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "servers": { "unifi": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "-e", "UNIFI_URL", "-e", "UNIFI_API_KEY", "-e", "UNIFI_USERNAME", "-e", "UNIFI_PASSWORD", "ghcr.io/mattoddie/unifi-mcp:0.9.1" ], "env": { "UNIFI_URL": "your-value", "UNIFI_API_KEY": "your-value", "UNIFI_USERNAME": "your-value", "UNIFI_PASSWORD": "your-value" } } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) UNIFI_API_KEY, UNIFI_PASSWORD, UNIFI_URL, UNIFI_USERNAME 先保留 "your-value",请我自己把真实值粘贴到文件或应用的输入框里。不要让我在对话里输入密钥。5) 按约定执行,然后确认 UniFi 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Docker(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    docker --version
    • 显示版本号(例如 Docker version …)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 安装 Docker Desktop:Mac 打开 Docker.dmg,把图标拖到“应用程序”(按电脑选择 Apple silicon 或 Intel 版本)· Windows 双击 Docker Desktop Installer.exe · 装好后打开 Docker Desktop 应用并保持运行。不需要 curl 命令

    打开 Docker 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: docker --version

    安装一次,所有需要 Docker 的工具都能用

  2. 注册并创建 UniFi 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。价格和免费方案请看开发者网站。

    打开 UniFi 网站 ↗

  3. 填写 2 项设置

    这些是程序设置,不是密钥,无需注册。按开发者的说明填写。

    • UNIFI_URL 您的UniFi控制台地址。对于旧版自托管Network应用,请包含端口。
      查看英文原文Address of your UniFi console. For a legacy self-hosted Network application, include the port.
    • UNIFI_USERNAME 本地(非Ubiquiti云)账户,可替代API密钥使用。旧版控制器必需。
      查看英文原文A local (not Ubiquiti cloud) account, used instead of an API key. Required for legacy controllers.

    说明为自动翻译,变量名保持原样;不确定时请查看原文。

  4. 点击这个按钮打开 VS Code

    在 VS Code 中打开

    VS Code 会请你确认安装,点击 Install

  5. 填写你的密钥

    在 UniFi 的设置中,UNIFI_API_KEY, UNIFI_PASSWORD, UNIFI_URL, UNIFI_USERNAME 还是空的,填入你的密钥并保存

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  6. 在 VS Code 中以 Agent 模式打开 AI 聊天

  7. 试一试

    用 UniFi 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 VS Code 说正在使用 UniFi,或回答中出现 UniFi 的工具名称,就表示连接成功

10 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • MCP_TRANSPORT 该镜像默认通过 HTTP 提供服务;设置此项后将改为通过 stdio 运行。
    查看英文原文The image serves HTTP by default; this runs it over stdio.
    · 默认值 stdio
  • UNIFI_TLS_FINGERPRINT 推荐用于使用自签名证书的 https 控制器:填写其 SHA-256 指纹以进行固定。
    查看英文原文Recommended for an https controller with a self-signed certificate: its SHA-256 fingerprint, to pin it.
  • UNIFI_VERIFY_SSL 设置了指纹时请留空。true:公开受信任的证书。false:跳过检查(不安全)。
    查看英文原文Leave empty when you set a fingerprint. true: publicly trusted certificate. false: skip the check (insecure).
  • UNIFI_SITE 站点的简称,在请求未指定站点时使用。
    查看英文原文The site's short name, used when a request doesn't name a site.
    · 默认值 default
  • UNIFI_ALLOW_WRITES 允许更改:重启设备、阻止客户端、编辑WiFi、防火墙和网络。关闭则为只读。
    查看英文原文Allow changes: restart devices, block clients, edit WiFi, firewall and networks. Off means read-only.
    · 默认值 false
  • UNIFI_ALLOW_DELETES 同时允许删除配置和忘记客户端。需要 UNIFI_ALLOW_WRITES。
    查看英文原文Also allow deleting configuration and forgetting clients. Needs UNIFI_ALLOW_WRITES.
    · 默认值 false
  • UNIFI_ALLOW_SECRETS 允许输出未脱敏的密码和密钥(include_secrets)以及WiFi二维码工具。关闭时所有输出均保持脱敏。
    查看英文原文Allow unredacted passwords and keys (include_secrets) and the WiFi QR tool. Off keeps all output redacted.
    · 默认值 false
  • UNIFI_TOOLSETS 可选的逗号分隔列表,用于暴露较少的工具,例如 overview,devices,clients。为空表示全部,但 raw 除外,必须按名称单独列出。
    查看英文原文Optional comma-separated list to expose fewer tools, e.g. overview,devices,clients. Empty means all except raw, which has to be listed by name.
  • UNIFI_RAW_ALLOWED_PATHS 可选的逗号分隔 API 路径前缀列表,例如 /api/s/default/stat,用于将原始 API 工具(toolset raw)限制在这些路径内。为空则允许任意路径。
    查看英文原文Optional comma-separated API path prefixes, e.g. /api/s/default/stat, that limit the raw API tool (toolset raw) to those paths. Empty allows any path.
  • UNIFI_AUDIT_LOG 设置为 stderr 可将助手所做或预览的每项更改以 JSON 行记录。为空时关闭。
    查看英文原文Set to stderr to log every change the assistant makes or previews as JSON lines. Off when empty.

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同

其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看

查看所有支持 MCP 的应用 →

JSON 设置在下方“开发者专用”中

卡住了?问问正在用 UniFi 的人💬 讨论 →
开发者专用:终端命令和 JSON 设置

安装在电脑上

Claude Code

claude mcp add --scope user unifi --env UNIFI_URL=your-value --env UNIFI_API_KEY=your-value --env UNIFI_USERNAME=your-value --env UNIFI_PASSWORD=your-value -- docker run -i --rm -e UNIFI_URL -e UNIFI_API_KEY -e UNIFI_USERNAME -e UNIFI_PASSWORD ghcr.io/mattoddie/unifi-mcp:0.9.1

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "unifi": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "UNIFI_USERNAME",
        "-e",
        "UNIFI_PASSWORD",
        "ghcr.io/mattoddie/unifi-mcp:0.9.1"
      ],
      "env": {
        "UNIFI_URL": "your-value",
        "UNIFI_API_KEY": "your-value",
        "UNIFI_USERNAME": "your-value",
        "UNIFI_PASSWORD": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "unifi": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "UNIFI_USERNAME",
        "-e",
        "UNIFI_PASSWORD",
        "ghcr.io/mattoddie/unifi-mcp:0.9.1"
      ],
      "env": {
        "UNIFI_URL": "your-value",
        "UNIFI_API_KEY": "your-value",
        "UNIFI_USERNAME": "your-value",
        "UNIFI_PASSWORD": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "unifi": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIFI_URL",
        "-e",
        "UNIFI_API_KEY",
        "-e",
        "UNIFI_USERNAME",
        "-e",
        "UNIFI_PASSWORD",
        "ghcr.io/mattoddie/unifi-mcp:0.9.1"
      ],
      "env": {
        "UNIFI_URL": "your-value",
        "UNIFI_API_KEY": "your-value",
        "UNIFI_USERNAME": "your-value",
        "UNIFI_PASSWORD": "your-value"
      }
    }
  }
}

需要你填写的值

  • MCP_TRANSPORT env
    该镜像默认通过 HTTP 提供服务;设置此项后将改为通过 stdio 运行。
    查看英文原文The image serves HTTP by default; this runs it over stdio.
  • UNIFI_URL 必填 env
    您的UniFi控制台地址。对于旧版自托管Network应用,请包含端口。
    查看英文原文Address of your UniFi console. For a legacy self-hosted Network application, include the port.
  • UNIFI_API_KEY 机密 必填 env
    来自UniFi Network → Settings → Control Plane → Integrations的API密钥。也可以使用用户名和密码。
    查看英文原文API key from UniFi Network → Settings → Control Plane → Integrations. Or use a username and password.
  • UNIFI_USERNAME 必填 env
    本地(非Ubiquiti云)账户,可替代API密钥使用。旧版控制器必需。
    查看英文原文A local (not Ubiquiti cloud) account, used instead of an API key. Required for legacy controllers.
  • UNIFI_PASSWORD 机密 必填 env
    本地账户的密码,与用户名一起使用。
    查看英文原文The local account's password, used with the username.
  • UNIFI_TLS_FINGERPRINT env
    推荐用于使用自签名证书的 https 控制器:填写其 SHA-256 指纹以进行固定。
    查看英文原文Recommended for an https controller with a self-signed certificate: its SHA-256 fingerprint, to pin it.
  • UNIFI_VERIFY_SSL env
    设置了指纹时请留空。true:公开受信任的证书。false:跳过检查(不安全)。
    查看英文原文Leave empty when you set a fingerprint. true: publicly trusted certificate. false: skip the check (insecure).
  • UNIFI_SITE env
    站点的简称,在请求未指定站点时使用。
    查看英文原文The site's short name, used when a request doesn't name a site.
  • UNIFI_ALLOW_WRITES env
    允许更改:重启设备、阻止客户端、编辑WiFi、防火墙和网络。关闭则为只读。
    查看英文原文Allow changes: restart devices, block clients, edit WiFi, firewall and networks. Off means read-only.
  • UNIFI_ALLOW_DELETES env
    同时允许删除配置和忘记客户端。需要 UNIFI_ALLOW_WRITES。
    查看英文原文Also allow deleting configuration and forgetting clients. Needs UNIFI_ALLOW_WRITES.
  • UNIFI_ALLOW_SECRETS env
    允许输出未脱敏的密码和密钥(include_secrets)以及WiFi二维码工具。关闭时所有输出均保持脱敏。
    查看英文原文Allow unredacted passwords and keys (include_secrets) and the WiFi QR tool. Off keeps all output redacted.
  • UNIFI_TOOLSETS env
    可选的逗号分隔列表,用于暴露较少的工具,例如 overview,devices,clients。为空表示全部,但 raw 除外,必须按名称单独列出。
    查看英文原文Optional comma-separated list to expose fewer tools, e.g. overview,devices,clients. Empty means all except raw, which has to be listed by name.
  • UNIFI_RAW_ALLOWED_PATHS env
    可选的逗号分隔 API 路径前缀列表,例如 /api/s/default/stat,用于将原始 API 工具(toolset raw)限制在这些路径内。为空则允许任意路径。
    查看英文原文Optional comma-separated API path prefixes, e.g. /api/s/default/stat, that limit the raw API tool (toolset raw) to those paths. Empty allows any path.
  • UNIFI_AUDIT_LOG env
    设置为 stderr 可将助手所做或预览的每项更改以 JSON 行记录。为空时关闭。
    查看英文原文Set to stderr to log every change the assistant makes or previews as JSON lines. Off when empty.

说明为自动翻译,变量名保持原样;不确定时请查看原文。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

一览

每周下载量i
不在 npm/PyPI 上
连接方式
在你的电脑上运行
最新版本i
0.9.1
发布到注册中心i
2026年11月17日
代码最后更新i
2026年11月17日
作者
mattoddie
软件包
oci: ghcr.io/mattoddie/unifi-mcp:0.9.1
mcpb: …/unifi-mcp-0.9.1-darwin-arm64.mcpb
mcpb: …/unifi-mcp-0.9.1-darwin-amd64.mcpb
注册状态
活跃

哪些应用可以使用它

依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。

在你的电脑上运行,适用于

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

全部应用及其优缺点 →

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月19日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 mattoddie 验证,该账户拥有此仓库

  • ✓ 通过

    仍在维护

    代码最后更新于前天

  • ✓ 通过

    有许可证

    使用 MIT

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

已公开的漏洞(OSV.dev)

未检查:只能检查标明版本的 npm 和 PyPI 包

我们检查什么 → · JSON

作者:申请重新检查或报告信息错误
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

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

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

用户评价

还没有评价

登录后写评价

与“网络安全”中的其他服务器比较i

  • 星标数多于此分类中其他 1106 个服务器的 74%
  • 发布到注册中心的时间比此分类中其他 1106 个服务器的 93% 更新
  • 基础检查结果等于或优于此分类中其他 1106 个服务器的 99%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

UniFi 安全吗?

它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:UNIFI_API_KEY, UNIFI_PASSWORD

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于前天,最新版本(0.9.1)于前天进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Docker, MCPB。

有什么可以替代它?

同一分类中有:GitHits, Dependency Management MCP Server, Snyk MCP, Draugr, EchelonGraph CVE & Exposure

功能相近的其他选择

同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

GitHits

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

作者:githits-com正在增长↓ 3807/周★ 13810天前更新

电脑或云端✓ 服务方 · githits.com

Snyk MCP

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

作者:snyk广泛使用↓ 76.2万/周★ 617个月前更新

在你的电脑上运行✓ 服务方 · snyk.io

Draugr

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

作者:draugr-dev起步阶段★ 30前天更新

在你的电脑上运行✓ 服务方 · draugr.dev
与相似项目对比
本项
UniFi
GitHitsDependency Management MCP ServerSnyk MCPDraugrEchelonGraph CVE & Exposure
运行位置需要安装在电脑上云端或安装在电脑上都可以在云端运行,无需安装需要安装在电脑上需要安装在电脑上云端或安装在电脑上都可以
需要密钥是否否否否否
可在 Claude 中按 + 添加否否否否否否
基础检查3/35/53/43/33/34/4
许可证MITApache-2.0–Apache-2.0Apache-2.0MIT
价格登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

unifi-mcp

Talk to your UniFi network.

An open-source Model Context Protocol server for Ubiquiti UniFi Network. It lets Claude and other AI assistants monitor and manage your sites, devices, clients, WiFi, firewall and more, all from one Docker container.

[unifi-mcp.mattoddie.dev](https://unifi-mcp.mattoddie.dev)

Quick start · Documentation · Tool reference · Contributing


"Why is the lounge TV buffering?"

*The TV is on the Lounge AP at -78 dBm and 12 Mbps, and that AP's 5 GHz radio is at 81% channel utilisation on channel 36. Moving the AP to channel 149 or adding a wired backhaul should fix it. Want me to change the channel?*

Ask about your network in plain English. The assistant picks from 148 tools to look things up and, if you allow it, make changes. Some examples:

  • 🩺 *"Give me a health check of the network."*
  • 🔎 *"Which clients have a weak WiFi signal right now?"*
  • 🔐 *"Review my firewall and port forwards for anything risky."*
  • 🔄 *"Which devices have firmware updates, and when were they last rebooted?"*
  • 🎟️ *"Create 10 one-day guest vouchers limited to 5 Mbps."*
  • 🧱 *"Block the device called 'kids-tablet' until I unblock it."*

Highlights

  • 🐳 Docker-first. There's one small distroless image (ghcr.io/mattoddie/unifi-mcp, about 22 MB) for linux/amd64 and linux/arm64. It serves Streamable HTTP for a long-running service, or stdio for docker run -i. For Claude Desktop there's also a one-click extension bundle (.mcpb) that needs no Docker, and each release has plain binaries for macOS, Linux and Windows on amd64 and arm64.
  • 🛡️ Safe by default. The server is read-only unless you turn on writes, and deleting configuration needs a second switch. Destructive tools are labelled so your MCP client asks before running them, and passwords and keys are redacted from output.
  • 🔍 Preview and audit. Every write tool takes dry_run: true to show the request it would send, with a field-level diff of what would change, without changing anything. UNIFI_AUDIT_LOG records each change in a JSON Lines audit log.
  • 🧰 Broad coverage. It covers 14 toolsets: devices, clients, switch ports and PoE, WiFi, networks and VLANs, WAN, DNS, legacy and zone-based firewall, traffic rules and routes, IDS/IPS, VPN, RADIUS, hotspot vouchers, statistics, logs, admins and backups.
  • 🎛️ Tunable. Expose only the toolsets you need, which keeps the model's context small and focused. See Keeping the tool list small.
  • 🔌 Works with your controller. Supports UniFi OS consoles (UDM, UDM Pro/SE, UCG, UDR, UX, Cloud Key Gen2+, UniFi OS Server) and legacy self-hosted Network applications (up to Network 10.6). Auth is an API key or a local account.
  • 🧪 Tested. The test suite runs against a mock controller on every build.

Quick start

You need Docker, a UniFi controller and an MCP client such as Claude Code.

1. Get credentials. On a UniFi OS console, create an API key: UniFi Network → Settings → Control Plane → Integrations → Create API Key. On older controllers, use a local account instead.

2. Start the server.

mkdir unifi-mcp && cd unifi-mcp

curl -fsSLO https://raw.githubusercontent.com/mattoddie/unifi-mcp/main/compose.yaml curl -fsSL https://raw.githubusercontent.com/mattoddie/unifi-mcp/main/example.env -o .env

Edit .env: set UNIFI_URL, UNIFI_API_KEY and a random MCP_AUTH_TOKEN (required; e.g. openssl rand -hex 32).

For an https controller, also say how to check its certificate, or the server won't start.

Recommended: pin it with UNIFI_TLS_FINGERPRINT (see docs/security.md). example.env sets

UNIFI_VERIFY_SSL=false, which skips the check: remove it once the fingerprint is set.

docker compose up -d

3. Connect your assistant.

claude mcp add --transport http unifi http://<docker-host>:8080/mcp \

--header "Authorization: Bearer "

Now ask *"How's my network doing?"* in Claude Code.

Using Claude Desktop, VS Code, Cursor or Codex? See Connecting MCP clients. Prefer not to run a service? Use stdio mode with docker run -i, or a release binary without Docker. On macOS or Linux: brew install mattoddie/tap/unifi-mcp.

Claude Desktop in one click

On a Mac or Windows PC with Claude Desktop, you don't need Docker at all. Download the .mcpb bundle for your computer from the latest release, open it, and enter your controller URL, API key and certificate fingerprint in the settings. See Claude Desktop.

unifi-mcp is also listed in the MCP Registry as io.github.mattoddie/unifi-mcp, with the image (over stdio) and the bundles, so clients and directories that read the registry can install it.

Turning on changes

Out of the box the assistant can look but not touch. To let it make changes, add these to .env and run docker compose up -d:

UNIFI_ALLOW_WRITES=true      # restart devices, block clients, edit WiFi/firewall/networks…

UNIFI_ALLOW_DELETES=true # also allow deleting configuration, forgetting clients… (needs writes too) UNIFI_TOOLSETS=overview,devices,clients,wifi,monitoring # optional: expose fewer tools UNIFI_AUDIT_LOG=stderr # optional: log every change (or a file path; see docs/configuration.md)

Ask for a dry run to preview a change first: *"Dry run: disable the guest WiFi. What would change?"* Read Security before turning on writes for a production network.

What it can do

ToolsetWhat's covered
overviewSites, controller info, site health
devicesDevice status and details, restart/locate/provision, firmware upgrades (also rolling), radios, PoE outlets, adoption, RF scans, AP groups
clientsOnline and known clients, block/unblock, reconnect, names, fixed IPs, lock to an AP, forget
switchingSwitch ports, port profiles, PoE power-cycling, port mirroring, link aggregation, LLDP neighbours
wifiWLANs (SSIDs, security, VLANs, bands), WiFi QR codes
networksNetworks/VLANs and DHCP, WAN, local DNS records, bandwidth profiles, dynamic DNS
firewallPort forwards, firewall rules and groups, zone-based policies and zones, traffic rules, QoS rules, NAT rules, switch ACL rules, object-oriented network policies
routingStatic routes, policy-based traffic routes
securityIDS/IPS threat management, threat log, country blocking, content filtering
vpnVPN servers and site-to-site VPNs, RADIUS profiles and accounts
hotspotVouchers, hotspot operators, guest authorization, guest portal
monitoringEvents, alarms, traffic reports, traffic flows, DPI, speed tests, rogue APs, system log, sessions, anomalies, dashboards
adminSite settings (including SNMP, mDNS and auto-backup), admins, backups, controller updates, sites
rawAn escape hatch that calls any controller API path

See the [tool reference](docs/tools.md) for every tool and argument. Ready-made prompts like network_health_check, troubleshoot_client and security_review chain the tools together for common jobs.

Documentation

The docs are also published at [unifi-mcp.mattoddie.dev/docs](https://unifi-mcp.mattoddie.dev/docs/), with search.

🚀 Getting startedStep-by-step setup, from credentials to first question
🔌 Connecting MCP clientsClaude Code, Claude Desktop, VS Code, Cursor, Codex, stdio mode
⚙️ ConfigurationEvery environment variable, Docker secrets, toolsets
🐳 DeploymentCompose, image tags, upgrades, TLS reverse proxy, hardening
💬 Using unifi-mcpExample conversations, prompts, how saves and secrets work
🧰 Tool referenceAll 148 tools and 5 prompts, generated from the code
🛡️ SecurityThreat model, least privilege, safe write setups
📡 CompatibilitySupported controllers and versions, API caveats
🩹 TroubleshootingCommon errors and how to fix them
🛠️ DevelopmentArchitecture, adding a tool, testing

Contributing

Contributions are very welcome, whether that's bug reports, compatibility reports from your hardware, docs or new tools. Read the contributing guide to get started, and please follow the code of conduct. To report a vulnerability, see the security policy. Please don't open a public issue for one.

License

MIT © Matt Oddie

*unifi-mcp is an independent community project. It is not affiliated with, endorsed by or sponsored by Ubiquiti Inc. UniFi and Ubiquiti are trademarks of Ubiquiti Inc.*