UniFi Network MCP Server
Exposes the UniFi Network Integration API as MCP tools, dynamically loaded from JSON manifests, with read-only mode by default.
README
UniFi Network MCP Server
This project exposes the UniFi Network Integration API as Model Context Protocol
tools. Runtime tools are loaded from JSON manifests in skills/network, so adding
or updating endpoints does not require hardcoding every command in Python.
By default the server is read-only: only GET endpoints are exposed, and a second
executor guard rejects write methods while READ_ONLY=true.
Quick Start
Generate or refresh runtime skills from the bundled docs:
python3 scripts/import_unifi_docs.py --source docs/network --output skills/network
Run locally:
python3 -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
UNIFI_BASE_URL='https://172.16.1.1/proxy/network/integration' \
UNIFI_API_KEY='<api-key>' \
python -m unifi_mcp
The default Streamable HTTP endpoint is:
http://127.0.0.1:8000/mcp
For stdio MCP clients:
MCP_TRANSPORT=stdio UNIFI_BASE_URL='https://172.16.1.1/proxy/network/integration' \
UNIFI_API_KEY='<api-key>' python -m unifi_mcp
Configuration
Required:
UNIFI_BASE_URL: UniFi Network Integration API base URL, normallyhttps://<console>/proxy/network/integration. If the value already ends in/v1, the server avoids adding a second/v1.UNIFI_API_KEY: UniFi API key. Do not commit this value.
Security and runtime:
READ_ONLY=true: default. Exposes onlyGETtools and blocks write execution.READ_ONLY=false: exposes POST, PUT, PATCH, and DELETE tools.ALLOW_CONNECTOR_PROXY=false: default. Connector wildcard proxy endpoints are disabled because they are less constrained than curated endpoint manifests.UNIFI_VERIFY_TLS=true: default TLS verification.UNIFI_CA_CERT=/path/to/ca.pem: trust a self-signed UniFi certificate.UNIFI_INSECURE_SKIP_VERIFY=false: dev-only equivalent ofcurl -k.MCP_TRANSPORT=streamable-http: also supportsstdioandsse.MCP_HOST=127.0.0.1,MCP_PORT=8000.MCP_PATH=/mcp: Streamable HTTP endpoint path. The bundled devdocker-compose.ymlsets this to/so browser clients can usehttp://127.0.0.1:8000directly.MCP_AUTH_TOKEN: optional Bearer token for Streamable HTTP.MCP_CORS_ALLOW_ORIGINS: comma-separated allowed browser origins for Streamable HTTP, for examplehttp://localhost:8080,http://127.0.0.1:8080. The bundled devdocker-compose.ymluses*for browser clients such as llama.cpp.MCP_COMPACT_TOOLS=true: default. Advertises compact tool descriptions and schemas to reduce MCP context size while keeping full skill manifests on disk.MCP_TOOL_MODE=dispatcher: default. Exposes a small dispatcher tool surface: list skills, then call one by name. Setindividualto advertise every endpoint as its own MCP tool.MCP_ALLOW_UNAUTHENTICATED_REMOTE=false: required to bind HTTP to a non-local host withoutMCP_AUTH_TOKEN.
Docker Compose
./build.sh
docker-compose.yml includes the test UniFi controller IP/API key from
PLAN.md, keeps READ_ONLY=true, and accepts the self-signed UniFi certificate
by default for local development.
The compose file binds the MCP endpoint to localhost:
http://127.0.0.1:8000
Inside the container the server binds to 0.0.0.0 so Docker can publish the
port, but compose publishes it only to the host loopback address.
Tool Inputs
Each MCP tool uses this shape:
{
"pathParams": { "siteId": "..." },
"queryParams": { "limit": 25, "offset": 0 },
"body": {}
}
body is only accepted for write operations. Tool schemas are generated from the
source docs and preserve path parameters, query parameters, request body fields,
response fields, descriptions, required flags, types, and discriminators.
Development
python3 -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
pytest
ruff check .
The importer intentionally ignores guide files without endpoint methods, including
_index.json, gettingstarted.json, filtering.json, error-handling.json, and
quick_start.ansible.json.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。