UniFi RMCP
ai.dinglebear由 dinglebear.ai 发布v0.2.4更新于 Oct 24, 2026
Rust MCP server and CLI for UniFi Network controller operations.
发布方自己的服务:RMCP
概览
本地 MCP 服务器兼 CLI,让助手读取 UniFi Network 控制器的客户端、设备、WLAN 和健康状态,并在具备管理员权限时执行变更操作。
- 可以做什么
- 读取客户端、设备、WLAN 配置、站点健康、告警、事件、控制器系统信息和当前认证身份,可通过便捷操作及 list_clients、list_devices 等混合别名完成。调用生成的 official_* 操作,访问有文档的 Network Integration API 端点。调用基于模型的 unifi_* 内部控制器操作,其中包含变更类操作。使用 help 操作查看内置操作说明。通过 CLI 执行相同操作,便于脚本化和调试。
- 适用场景
- 适合已运行 UniFi Network 控制器、希望助手汇总网络状态、查看客户端与设备或执行控制器操作而无需打开控制台的场景。最适合本地单用户环境;共享 HTTP 部署可行,但需自行配置认证。
- 运行要求
- 通过 npx 作为本地进程运行(npm 包会从 GitHub Releases 下载 runifi 二进制),或使用自行构建的二进制。npm 方式需要 Node.js,并需能访问控制器的网络,以及设置 UNIFI_URL 和 UNIFI_API_KEY 环境变量。可选配置包括站点名、旧版控制器、跳过 TLS 校验和 HTTP 认证。
安装
在 SourceWeft 中
- 打开 控制台中的 UniFi RMCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
unifi-rmcp
UniFi Network client, device, WLAN, firewall, and health operations over MCP and CLI.
It exposes one MCP tool, unifi, plus the runifi CLI. Agents can inspect
clients, devices, WiFi networks, health, alarms, events, controller sysinfo, and
authenticated identity, and can use generated official_* / unifi_* actions
when their MCP auth scope permits it.
30-second path: set UNIFI_URL and UNIFI_API_KEY, then run
npx -y @dinglebear/runifi health --json -> start loopback HTTP with
UNIFI_MCP_HOST=127.0.0.1 npx -y @dinglebear/runifi serve -> call tools/call with
{"action":"health"}.
Status: operational RMCP upstream-client server. The preserved convenience
actions are read-oriented; generated mutating actions require unifi:admin
authorization. HTTP MCP supports loopback dev mode, static bearer tokens, and
Google OAuth through lab-auth.
Not for: replacing the UniFi console, storing controller credentials for callers, bypassing UniFi permissions, generic HTTP proxying, multi-tenant isolation, or passing UniFi API keys through MCP tool arguments.
Contents
- Naming
- Capabilities And Boundaries
- Install
- Quickstart
- Client Configuration
- Runtime Surfaces
- MCP Tool Reference
- CLI Reference
- Configuration
- Authentication
- Safety And Trust Model
- Architecture
- Distribution Contract
- Development
- Verification
- Deployment
- Troubleshooting
- Related Servers
- Documentation
- License
Naming
The repo and npm package use the RMCP family name, while the shipped binary uses
the short Rust CLI name runifi.
Capabilities And Boundaries
- Read connected wireless and wired clients, network devices, WLAN configs, site health, active alarms, recent events, controller sysinfo, and current authenticated user.
- Dispatch generated
official_*actions for documented Network Integration API endpoints. - Dispatch model-backed
unifi_*internal controller actions and hybrid aliases such aslist_clients,list_devices,list_networks,list_wifi, andget_system_info. - Enforce
unifi:readfor read actions andunifi:adminfor mutating actions in mounted HTTP MCP mode. - Provide setup, doctor, and endpoint-verification commands for local runtime checks.
Install
npm / npx
Run the stdio MCP server or CLI without a manual binary install:
The npm package downloads runifi during postinstall. Override download
behavior only when testing packaging:
Build From Source
Minimum supported Rust version: 1.86. The Cargo workspace has three members:
the root unifi-rmcp package, crates/unifi (reusable core), and xtask
(dev tooling). All members inherit Rust edition 2024 and MSRV 1.97.1 from the
workspace root.
Quickstart
1. Create A UniFi API Key
In UniFi OS, go to Settings -> Admins & Users -> API Keys, create a key, and
copy it into UNIFI_API_KEY.
2. Configure The Controller
Set UNIFI_LEGACY=true only for older non-UDM controllers that do not use the
/proxy/network path prefix.
3. Run A Safe CLI Call
4. Start Loopback HTTP MCP
In another shell:
5. Make A First MCP Call
Client Configuration
Claude Code Stdio
Claude Code HTTP
Codex / Labby Gateway
Register UniFi through Labby as an HTTP upstream when sharing one long-running server, or run it directly as stdio for local-only use.
Generic MCP JSON
Do not put UNIFI_API_KEY, OAuth secrets, passwords, SSH keys, or upstream
bearer tokens in MCP tool arguments. Use env, config files, or the MCP client's
secret storage. MCP callers never provide credentials, tokens, keys, or secrets
as action arguments.
Runtime Surfaces
MCP Tool Reference
One MCP tool is exposed: unifi. Pass the required action argument to select
the operation. The action enum is generated from the inventories in data/, so
the surface is large:
Counts are derived from data/unifi_official_network_v10_3_58.json and the
runtime: true entries of data/unifi_internal_endpoint_models.json.
crates/unifi/src/capabilities.rs is the source of truth at runtime.
Preserved Convenience Actions
Generated Action Families
Endpoint coverage is tracked in docs/unifi_api_coverage.md; contract and safe
live verification are documented in docs/unifi_endpoint_verification.md.
CLI Reference
The binary calls the same service layer as the MCP tool:
Generated actions accept --param k=v, --body-json JSON, and --json.
setup plugin-hook maps CLAUDE_PLUGIN_OPTION_* env vars into UNIFI_*,
refreshes the ~/.local/bin copy of the binary, and runs check + repair. It
used to run automatically from a Claude Code SessionStart/ConfigChange
hook; those hooks have been removed.
You do not need to run it to configure the plugin: plugins/unifi/.mcp.json
maps your plugin settings into the server's environment directly via
${user_config.*}. Run it by hand only when you want the ~/.local/bin binary
refresh or the preflight checks.
Configuration
Configuration loads from config.toml first, then UNIFI_* environment
variables override it. Host installs read ~/.unifi-rmcp/.env before loading
config; containers read /data/.env. Process environment overrides both.
config.toml-only settings with no environment override: mcp.server_name
and the [mcp.auth] TTL, rate-limit, and allowlist fields
(access_token_ttl_secs, refresh_token_ttl_secs, auth_code_ttl_secs,
register_rpm, authorize_rpm, disable_static_token_with_oauth,
allowed_emails, allowed_client_redirect_uris). See config.example.toml.
xtask endpoint verification reads its own variables that the server never
touches: UNIFI_ALLOW_INSECURE_TLS, UNIFI_RESOLVE_IP,
UNIFI_VERIFY_TIMEOUT_SECS, UNIFI_VERIFY_RATE_LIMIT_MS,
UNIFI_VERIFY_MAX_REQUESTS, UNIFI_VERIFY_UNVERIFIED_INTERNAL.
Authentication
Stdio MCP runs as a local trusted child process and does not use HTTP auth.
HTTP MCP auth policy:
unifi:admin satisfies unifi:read; unifi:read does not satisfy mutating
actions.
Safety And Trust Model
- UniFi API keys are loaded from config/env only.
- MCP callers select actions, params, and request bodies, not upstream credentials.
- Preserved convenience actions are read-oriented.
- Generated mutating actions require
unifi:adminin mounted HTTP MCP mode. - Unknown actions and malformed generated-action params fail before upstream calls.
- Non-loopback HTTP deployments must use bearer auth, OAuth, or a trusted authenticated gateway.
- This bridge does not sandbox UniFi itself. UniFi remains responsible for API permissions and the actual network-side effect of a mutating call.
Architecture
Distribution Contract
Cargo.toml,Cargo.lock,packages/unifi-rmcp/package.json,.release-please-manifest.json, andserver.jsonmust agree on the released version.- GitHub Releases publish the
runifibinary consumed by the npm launcher. - The npm package name is
@dinglebear/runifi; binary aliases are@dinglebear/runifiandrunifi. - Docker/OCI metadata uses
ghcr.io/dinglebear-ai/runifi:<version>. The GHCR namespace still readsjmagarbecause that is what.github/workflows/docker-publish.ymlpublishes; the git remote isdinglebear-ai/runifi. Do not "fix" one without the other. plugins/unifi/.mcp.jsonmust launchnpx -y @dinglebear/runifi mcpso stdio clients start the MCP transport rather than the HTTP server.plugins/unifi/ships no Claude Code hooks.scripts/validate-plugin-layout.shandtests/setup_cli.rsboth fail if ahooks/directory or a manifesthookskey reappears.- The root README is curated. Source of truth for current actions and generated
endpoint coverage is
src/capabilities.rs, thedata/inventories,docs/unifi_api_coverage.md, anddocs/unifi_endpoint_verification.md.
Development
Verification
Live read probes require a controller:
Deployment
Use loopback for local development:
Use Docker Compose for shared HTTP deployment:
When binding to a non-loopback address, configure UNIFI_MCP_TOKEN,
UNIFI_MCP_AUTH_MODE=oauth, or UNIFI_NOAUTH=true behind an authenticated
gateway.
Troubleshooting
Related Servers
All sibling servers live under the dinglebear-ai org.
- soma - RMCP runtime and scaffold for provider-backed MCP servers.
- rtailscale - Tailscale API bridge for devices, users, and tailnet operations.
- unraid - Unraid monorepo;
unraid-rs/is the GraphQL bridge (binaryrunraid). - rapprise - Apprise notification fan-out bridge for many delivery backends.
- rgotify - Gotify push notification bridge for sends, messages, apps, and clients.
- rarcane - Arcane Docker management bridge for containers and related resources.
- yarr - Media-stack bridge for Sonarr, Radarr, Prowlarr, Plex, and related services.
- rytdl - Media download and metadata workflow server.
- synapse - Local Synapse workflow server for scout and flux actions.
- cortex - Syslog and homelab log aggregation MCP server.
- axon - RAG, crawl, scrape, extract, and semantic search project.
- labby - Homelab control plane and MCP gateway project.
Documentation
CLAUDE.mdis the curated local operating guide for contributors and agents.docs/unifi_api_coverage.mdis the curated API-family and coverage summary.docs/unifi_endpoint_verification.mdis the curated endpoint verification guide.docs/SETUP.mdis curated plugin/setup guidance.docs/OAUTH.mdis curated OAuth setup guidance.plugins/unifi/skills/unifi/SKILL.mdis the agent usage guide.data/inventories are generated/reference inputs for the action registry.src/is the source of truth for current action dispatch, config defaults, auth behavior, and CLI parsing.
License
Original Dinglebear-authored portions of this project are licensed under AGPL-3.0-only. Separate commercial licensing is available for organizations that need terms outside the AGPL. Third-party material remains under its original license. See LICENSING.md.
来源:README.md,提交 68f46bc
工具
0版本历史
1- v0.2.4最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Rmcp 集成
RMCP
dev.rmcp官方发布者
一个远程 MCP 目录服务器,让助手搜索已收录的 MCP 服务器与工具、查看其记录和端点,并比较候选方案。
YTDL RMCP
ai.dinglebear
本地运行的 Rust MCP 服务器,让助手搜索 YouTube、用 yt-dlp 下载音视频、写入标签并传输媒体,以及同步 Plex 播放列表。
Unraid RMCP
ai.dinglebear
本地 MCP 服务器兼 CLI,让助手通过 Unraid 的 GraphQL API 处理 NAS、Docker、虚拟机和存储相关任务。
Unraid RMCP
ai.dinglebear
本地运行的 Rust MCP 服务器兼命令行工具,让助手通过 Unraid 的 GraphQL API 查询和管理 NAS,涵盖阵列、Docker、虚拟机和存储。
Tailscale RMCP
ai.dinglebear
让助手查看和管理 Tailscale 网络:列出设备、路由、密钥、ACL、DNS 和用户,授权设备,并可选地删除设备。