Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
PluginAn toànKết nối & tự động hoáCần cài đặt chút

unifi-mcp

sirkirby · sirkirby/unifi-mcp

Một bộ MCP server cho phép các tác nhân AI quản lý các ứng dụng UniFi Network, Protect và Access, tạo điều kiện cho các quy trình làm việc tác nhân cho tự động hóa nhà thông minh và mạng.

MCP servers & Graph API for the UniFi suite of applications, Network, Protect, and Access

868 sao117Giấy phép: MITCập nhật 13 ngày trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Tạo một tác nhân AI để giám sát và cấu hình mạng UniFi.
  • Phát triển một tác nhân để quản lý camera an ninh và điểm truy cập bằng UniFi Protect và Access.
  • Tự động hóa các tác vụ bảo trì thiết bị UniFi định kỳ thông qua một tác nhân AI.

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

UniFi MCP

Leverage agents and agentic AI workflows to manage your UniFi deployment.

Servers

ServerStatusToolsPackage
NetworkStable209unifi-network-mcp
ProtectStable62unifi-protect-mcp
AccessStable37unifi-access-mcp

Choose an integration

What you are buildingUseWhy
An AI assistant or another existing MCP clientNetwork, Protect, or Access MCP serverStandard MCP discovery, tool calls, permissions, and confirmation flows
A custom application, automation service, code-execution runtime, or MCP adapterunifi-api-serverYour code controls call sequencing, data joins, resource limits, and approval flow
Remote access for an MCP clientCloud RelayAuthenticated remote MCP routing without exposing the local servers directly

An MCP adapter can expose a small set of tools while using unifi-api-server as its backend. This keeps application-specific joins, branching, loops, and code isolation out of the general-purpose MCP servers.

Cloud Relay

ComponentStatusPackage
Relay SidecarBetaunifi-mcp-relay
Worker GatewayBetaunifi-mcp-worker (CLI)

Cloud Relay pairs the Cloudflare-hosted Worker gateway with the Relay sidecar on your LAN. The Worker provides the authenticated edge MCP endpoint, Durable Object broker, multi-location routing, token boundary, and deployment/management CLI. The Relay sidecar is a local MCP HTTP client and forwarder: it discovers configured local MCP servers over HTTP and maintains an outbound WebSocket to the Worker. Remote requests follow MCP client → Worker gateway → outbound WebSocket → Relay sidecar → local MCP servers over HTTP; the API server is not in this path. Read-only tools support annotation-based multi-location fan-out, while writes require explicit location targeting. Deploy the Worker with npm install -g unifi-mcp-worker && unifi-mcp-worker install, then see the Relay sidecar README to connect local servers.

REST + GraphQL API

ComponentStatusPackage
API ServerBetaunifi-api-server · GHCR image

unifi-api-server is an independent HTTP service for custom applications, automation, and adapters. It provides typed REST resources, read-only GraphQL queries, SSE streams, scoped API keys and administration, plus a REST action endpoint for supported controller operations. It shares unifi-core managers with the MCP servers but does not proxy or require them.

See apps/api/README.md for quick-start and deployment patterns.

What is this?

UniFi MCP is a collection of Model Context Protocol servers that let AI assistants and automation tools interact with Ubiquiti UniFi controllers. Each server targets a specific UniFi application (Network, Protect, Access) and exposes its functionality as MCP tools — queryable, composable, and safe by default.

MCP HTTP Access

MCP HTTP is unauthenticated and intended for trusted local clients. HTTP is disabled by default; when enabled, packages bind to loopback. Docker Compose enables it on the container network and publishes ports 3000–3002 on host 127.0.0.1. Use an authenticated TLS proxy or Cloud Relay for remote access, and prevent direct access to the backend. See the transport security model and HTTP setup and migration.

SettingDefaultPurpose
UNIFI_MCP_HTTP_ENABLEDfalseOpt into HTTP transport
UNIFI_MCP_HOST127.0.0.1Bind address; Compose explicitly uses 0.0.0.0 inside containers
UNIFI_MCP_HTTP_FORCEfalseAllow HTTP outside container PID 1
UNIFI_MCP_ALLOWED_HOSTSlocalhost,127.0.0.1Complete accepted Host-header list; Compose separately adds required internal hosts
UNIFI_MCP_ENABLE_DNS_REBINDING_PROTECTIONtrueValidate Host headers to prevent DNS-rebinding requests

MCP Discovery

UniFi MCP keeps the standard MCP path primary: capable clients discover currently registered tools with tools/list and invoke them with tools/call. The default lazy mode keeps initial context small by exposing meta-tools first, while eager mode registers all selected domain tools directly for clients that prefer a full standard tool list.

The lazy-loading meta-tools — *_tool_index, *_execute, *_batch, *_batch_status, and lazy-only *_load_tools — support filtered discovery, indirect execution, batch orchestration, and optional direct registration. They are independent of the protocol-version response compatibility policy below. See MCP Discovery and Lazy-Loading Meta-Tools for mode-by-mode behavior.

MCP response size

For tool results that already provide structured output, adaptive response mode is the default. It classifies each request by the canonical date-based protocolVersion advertised during MCP initialization, not by the client's product name or application version. Requests advertising MCP `2

Xem mã nguồn trên GitHub