Unifi MCP 6ad5bde7

MCPAI代理

提供方 lesleslie

AI代理 stdio · 本地进程 无需鉴权 社区 / 第三方
查看接入方式

一个基于FastMCP的服务器,用于管理UniFi网络和访问控制器,提供设备、站点、用户等实体的MCP接口管理功能。

一句话选型结论

按资料字段整理

Unifi MCP 6ad5bde7 属于AI代理类 MCP 服务器,stdio · 本地进程,无需鉴权,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 1 仓库热度,无公开仓库时显示未标注
工具数 13 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量13暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

网络管理Python本地部署访问控制MCP协议设备管理异步操作

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
pip install -r requirements.txt

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 13 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 13 个工具,覆盖面较广,能满足多种调用。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Unifi MCP 6ad5bde7当前 13 stdio · 本地进程 本地部署 有 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方lesleslie上游标注的维护方 lesleslie
分类AI代理本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

9.3 KB
来自项目仓库与上游目录的原文,未做删改

UniFi MCP Server

A FastMCP server for managing UniFi Network and Access controllers.

Overview

This server provides MCP (Model Context Protocol) tools to interact with UniFi Network and Access controllers, allowing you to manage devices, sites, users, and other UniFi entities through an MCP interface.

System Architecture```mermaid

graph TB
subgraph "MCP Client Layer"
A[MCP Client<br/>AI Assistant]
end

subgraph &quot;MCP Server Layer&quot;
    B[FastMCP Server]
    C{Configuration&lt;br/&gt;Manager}
    F[Tool Registration&lt;br/&gt;System]
end

subgraph &quot;Controller Layer&quot;
    D[Network Controller&lt;br/&gt;UniFi Network API]
    E[Access Controller&lt;br/&gt;UniFi Access API]
end

subgraph &quot;Tool Layer&quot;
    G[Network Tools&lt;br/&gt;unifi_get_sites, unifi_get_devices&lt;br/&gt;unifi_get_clients, unifi_get_wlans&lt;br/&gt;unifi_restart_device, unifi_disable_ap&lt;br/&gt;unifi_enable_ap, unifi_get_statistics]
    H[Access Tools&lt;br/&gt;unifi_get_access_points&lt;br/&gt;unifi_get_access_users, unifi_unlock_door&lt;br/&gt;unifi_set_access_schedule&lt;br/&gt;unifi_get_access_logs]
end

subgraph &quot;Data Models&quot;
    I[Pydantic Models&lt;br/&gt;NetworkDevice, NetworkClient&lt;br/&gt;NetworkWLAN, AccessPoint]
end

A --&gt; B
B --&gt; C
C --&gt;|Configured| D
C --&gt;|Configured| E
D --&gt; G
E --&gt; H
F --&gt; G
F --&gt; H
G --&gt; I
H --&gt; I

style A fill:#e1f5ff
style B fill:#fff4e1
style D fill:#e8f5e9
style E fill:#e8f5e9
style G fill:#f3e5f5
style H fill:#f3e5f5

## Features

- **UniFi Network Controller Integration**: Manage sites, devices, clients, and WLANs
- **UniFi Access Controller Integration**: Manage access points, users, and door access
- **MCP Tools**: Rich set of tools for common UniFi operations
- **Configuration Management**: Flexible configuration via environment variables or pyproject.toml
- **Async Operations**: Built with async/await for efficient performance
- **Error Handling**: Comprehensive error handling and retry mechanisms

## Installation

1. Install the required dependencies (the project uses pyproject.toml with uv):```bash
pip install uv &amp;&amp; uv sync
  1. Install the package in development mode:```bash
    pip install -e .

## Configuration

### Environment Variables

You can configure the server using environment variables. The `Settings` class
reads these names directly (no env_prefix is set, so do NOT prefix them with
`UNIFI__` or `MCP_SERVER_` — those names are not bound):```bash
# Server configuration
HOST=127.0.0.1
PORT=8000
DEBUG=true

# Network Controller (optional)
NETWORK_CONTROLLER__HOST=unifi.example.com
NETWORK_CONTROLLER__PORT=8443
NETWORK_CONTROLLER__USERNAME=admin
NETWORK_CONTROLLER__PASSWORD=&lt;YOUR_PASSWORD_MIN_12_CHARS&gt;  # placeholder — replace
NETWORK_CONTROLLER__SITE_ID=default

# Access Controller (optional)
ACCESS_CONTROLLER__HOST=unifi-access.example.com
ACCESS_CONTROLLER__PORT=8444
ACCESS_CONTROLLER__USERNAME=admin
ACCESS_CONTROLLER__PASSWORD=&lt;YOUR_PASSWORD_MIN_12_CHARS&gt;  # placeholder — replace
ACCESS_CONTROLLER__SITE_ID=default

PyProject.toml Configuration

Alternatively, you can configure the server in your pyproject.toml under the
[tool.unifi-mcp] section (the canonical section used by the Oneiric CLI
entry point):```toml
[tool.unifi-mcp]
http_host = "127.0.0.1"
http_port = 3038
enable_http_transport = true


## Usage

### Running the Server

The active entry point is `python -m unifi_mcp`, which routes through
`MCPServerCLIFactory`. Run it in the foreground with host/port/debug flags:```bash
# Foreground (blocks the terminal)
python -m unifi_mcp --host 127.0.0.1 --port 8000

# Or start in the background
python -m unifi_mcp --start-mcp-server --host 127.0.0.1 --port 8000

# Or run via the run_server() entry point
python -c &quot;from unifi_mcp.server import run_server; run_server()&quot;

Available CLI Flags

The Typer CLI in unifi_mcp/cli.py exposes top-level lifecycle flags plus
config and test-connection subcommands, but only the lifecycle flags are
reachable via the documented entry point. The legacy start/status/subcommand
names shown in older docs are NOT registered against python -m unifi_mcp
(which uses MCPServerCLIFactory):```bash

Start the server in the background (managed by ServerManager)

python -m unifi_mcp --start-mcp-server --host 127.0.0.1 --port 8000 --debug

Stop / restart / status (use the flag form, not a positional subcommand)

python -m unifi_mcp --stop-mcp-server
python -m unifi_mcp --restart-mcp-server --host 127.0.0.1 --port 8000
python -m unifi_mcp --server-status


For connection diagnostics or detailed configuration dumps, use the legacy Typer
entry point directly:```bash
# Display the resolved Settings
python -m unifi_mcp.cli config

# Test connection to a controller
python -m unifi_mcp.cli test-connection network
python -m unifi_mcp.cli test-connection access

MCP Tools Available

The tools below are the FastMCP-exposed names (the @server.tool() decorator
name). Inner helpers in unifi_mcp/tools/network_tools.py use the
get_unifi_* form, but those are NOT the names clients call — always use the
unifi_-prefixed names from the @server.tool() wrappers in
unifi_mcp/server.py.

Network Controller Tools

  • unifi_get_sites: Get all sites from the UniFi Network Controller
  • unifi_get_devices: Get all devices in a specific site
  • unifi_get_clients: Get all clients in a specific site
  • unifi_get_wlans: Get all WLANs in a specific site
  • unifi_restart_device: Restart a device by its MAC address
  • unifi_disable_ap: Disable an access point by its MAC address
  • unifi_enable_ap: Enable an access point by its MAC address
  • unifi_get_statistics: Get site statistics

Access Controller Tools

  • unifi_get_access_points: Get all access points
  • unifi_get_access_users: Get all users
  • unifi_get_access_logs: Get door access logs
  • unifi_unlock_door: Unlock a door
  • unifi_set_access_schedule: Set access schedule for a user

Installation via Claude Code marketplace

This repo ships a Claude Code plugin manifest (.claude-plugin/plugin.json) plus a colocated .mcp.json and three slash commands in commands/. Register the www-mcp-servers marketplace with Claude Code, then install the plugin with claude plugin install unifi --marketplace www-mcp-servers. Once installed, the slash commands /unifi-status, /unifi-clients, and /unifi-devices are available alongside the mcp__unifi__* tools. The HTTP transport is hardcoded to http://localhost:3038/mcp; start the server with python -m unifi_mcp --host 127.0.0.1 --port 3038 before invoking any of the tools.

Development

Running Tests```bash

Run the pytest test suite (configured via pyproject.toml [tool.pytest.ini_options])

pytest

Skip slow tests for fast feedback:

pytest -m "not slow"


### Project Structure```
unifi_mcp/
├── __init__.py
├── __main__.py            # Oneiric CLI entry point (python -m unifi_mcp)
├── cli.py                 # Legacy Typer CLI (reachable as python -m unifi_mcp.cli)
├── server.py              # FastMCP server implementation + @server.tool() registrations
├── config.py              # Configuration management with Pydantic models
├── credentials.py         # macOS Keychain credential resolution
├── main.py                # Convenience entry point
├── clients/               # API clients for UniFi Network, Access, and Local
│   ├── __init__.py
│   ├── base_client.py     # Base HTTP client with authentication handling
│   ├── network_client.py  # UniFi Network Controller API client
│   └── access_client.py   # UniFi Access Controller API client
├── models/                # Pydantic models for UniFi data structures
│   ├── __init__.py
│   ├── network.py         # Network controller data models
│   └── access.py          # Access controller data models
├── tools/                 # Internal helpers used by the FastMCP tool wrappers
│   ├── __init__.py
│   ├── network_tools.py   # Network-specific helpers (get_unifi_*, restart_*, ...)
│   └── access_tools.py    # Access-specific helpers (get_unifi_access_*, unlock_*, ...)
├── utils/                 # Utility functions
│   ├── __init__.py
│   ├── process_utils.py   # ServerManager process lifecycle helpers
│   └── retry_utils.py     # Retry logic with exponential backoff
└── monitoring/            # Reserved for future monitoring/health helpers (currently empty)

Security Considerations

  • Store credentials securely and never commit them to version control
  • Use appropriate firewall rules to restrict access to the MCP server
  • Enable SSL/TLS if the server is exposed to untrusted networks
  • Regularly update dependencies to address security vulnerabilities

Troubleshooting

If you encounter connection issues:

  1. Verify that your UniFi controllers are accessible from the server
  2. Check that the correct credentials and ports are configured
  3. Ensure that SSL certificates are valid (or set verify_ssl to false for self-signed certificates in development)
  4. Check the server logs for detailed error messages

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Built on Oneiric for runtime configuration
and mcp-common for the FastMCP
baseline. Crackerjack gates every commit.

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Unifi MCP 6ad5bde7 怎么安装?

在客户端按下面的安装命令接入:pip install -r requirements.txt。装完在客户端配置里引用同一个包或端点。

Unifi MCP 6ad5bde7 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Unifi MCP 6ad5bde7 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Unifi MCP 6ad5bde7 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Unifi MCP 6ad5bde7 能提供哪些能力?

资料显示约 13 个工具;能力标签包括 网络管理、访问控制、Python、设备管理。具体工具清单以官方文档为准。

Unifi MCP 6ad5bde7 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Unifi MCP 6ad5bde7 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。