GU

gbassaragh/unifi-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

2 stars 5 forks 품질 59 트렌드 4

UniFi 네트워크용 MCP 서버 및 API 통합 보호 - AI-powered Network Management

개요

MCP (Model Context Protocol) 서버는 UniFi Network에 액세스하고 인프라 관리 및 분석 기능을 보호합니다. - : 목록, 재시작, 위치 및 업그레이드 UniFi 장치 (AP, 스위치, 라우터) - : 연결된 클라이언트, 블록 / 차단, 트래픽 통계보기 - : 사이트 건강, 네트워크 구성, VLAN 및 무선 설정보기 - : 이벤트, 알람, 속도 테스트 및 DPI 통계 - : 네트워크 분석, 최적화 권고 및 문제 해결 - : 카메라 목록, 상태보기, 라이브 스냅 샷을 얻을 - : NVR 상태, 카메라 건강 요약 - : 조명, 센서, 굴삭기 및 뷰어 관리 - : 카메라 레이아웃 구성 - 여러 UniFi 장치 구성 (게이트웨이, NVR 등).

개요(AI 번역)

MCP (Model Context Protocol) 서버는 UniFi Network에 액세스하고 인프라 관리 및 분석 기능을 보호합니다.

특징

유니파이 네트워크

  • 장치 관리: 목록, 재시작, 위치, 업그레이드 UniFi 장치(AP, 스위치, 라우터)
  • 클라이언트 관리: 연결된 클라이언트, block/unblock, view 트래픽 통계
  • 사이트 관리: 사이트 건강, 네트워크 구성, VLAN 및 무선 설정보기
  • ** 통계 및 모니터링 ** : 이벤트, 알람, 속도 테스트 및 DPI 통계
  • AI-Powered Insights: 네트워크 분석, 최적화 권고, 문제 해결

유니파이 보호

  • 카메라 관리: 카메라 목록, 상태보기, 라이브 스냅 샷을
  • 시스템 모니터링: NVR 상태, 카메라 건강 요약
  • 액세서리: 조명, 센서, 굴, 뷰어 관리
  • Liveviews: 접근형 카메라 보기 레이아웃

다 장치 지원

  • 여러 UniFi 장치 구성 (게이트웨이, NVR 등)
  • 이름에 의한 타겟 특정 장치
  • Network의 혼합 및 기기의 보호

지원되는 기계설비

  • UniFi 꿈 기계 (UDM, UDM-Pro, UDM-SE)

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

UniFi MCP Server

An MCP (Model Context Protocol) server that provides AI assistants like Claude with access to UniFi Network and Protect infrastructure management and analysis capabilities.

Features

UniFi Network

  • Device Management: List, restart, locate, and upgrade UniFi devices (APs, switches, routers)
  • Client Management: Monitor connected clients, block/unblock, view traffic statistics
  • Site Management: View site health, network configurations, VLANs, and wireless settings
  • Statistics & Monitoring: Events, alarms, speed tests, and DPI statistics
  • AI-Powered Insights: Network analysis, optimization recommendations, and troubleshooting

UniFi Protect

  • Camera Management: List cameras, view status, get live snapshots
  • System Monitoring: NVR status, camera health summaries
  • Accessories: Manage lights, sensors, chimes, and viewers
  • Liveviews: Access configured camera view layouts

Multi-Device Support

  • Configure multiple UniFi devices (gateways, NVRs, etc.)
  • Target specific devices by name
  • Mix of Network and Protect services across devices

Supported Hardware

  • UniFi Dream Machine (UDM, UDM-Pro, UDM-SE)
  • UniFi Cloud Gateway (UCG-Ultra, UCG-Fiber)
  • UniFi Network Video Recorder (UNVR, UNVR-Pro)
  • UniFi Network Application (self-hosted)
  • Traditional Cloud Key (Gen1, Gen2, Gen2+)

Installation

# Clone the repository
git clone https://github.com/gbassaragh/Unifi-mcp.git
cd Unifi-mcp

# Install dependencies
uv sync

Using pip

pip install -e .

Configuration

Create a .env file in the project root (or set environment variables).

Configure multiple UniFi devices with different services:

UNIFI_DEVICES='[
  {
    "name": "main-gateway",
    "url": "https://192.168.1.1",
    "api_key": "your-gateway-api-key",
    "services": ["network"],
    "site": "default"
  },
  {
    "name": "nvr",
    "url": "https://192.168.1.2",
    "api_key": "your-nvr-api-key",
    "services": ["network", "protect"],
    "site": "default"
  }
]'
UNIFI_VERIFY_SSL=false

Device configuration fields:

Field Description Default
name Friendly name for targeting the device (required)
url Base URL of the UniFi device (required)
api_key API key from UniFi OS Control Plane (required)
services Array: ["network"], ["protect"], or both ["network"]
site Site name for network operations "default"
verify_ssl Verify SSL certificates false
username Username for Protect events (optional) null
password Password for Protect events (optional) null

Note: The username and password fields are only required for Protect event tools (motion events, smart detections). Basic camera operations work with just the API key.

To create an API key:

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "unifi": { "command": "uv", "args": ["run", "--directory", "/path/to/Unifi-mcp", "python", "-m", "unifi_mcp.server"], "env": { "UNIFI_DEVICES": "[{\"name\":\"gateway\",\"url\":\"https://192.168.1.1\",\"api_key\":\"your-key\",\"services\":[\"network\"]},{\"name\":\"nvr\",\"url\":\"https://192.168.1.2\",\"api_key\":\"your-key\",\"services\":[\"network\",\"protect\"]}]", "UNIFI_VERIFY_SSL": "false" } } } }