UniFi Network MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UniFi Network MCP Serverlist all access points in the default site"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
UniFi Network MCP Server
Model Context Protocol server for the UniFi Network Integration API.
It turns curated UniFi Network endpoints into MCP-callable skills, loaded from
JSON manifests at runtime. The server is read-only by default: READ_ONLY=true
exposes only GET skills and the executor blocks writes as a second guard.
Highlights
Manifest-driven endpoint catalog in
skills/networkRead-only default with runtime write protection
Compact dispatcher tool surface to keep MCP context small
Docker Compose and stdio support
Self-signed UniFi certificate support
Connector wildcard proxy endpoints hidden and blocked
Related MCP server: UniFi Network MCP Server
Quick Start
Docker Compose
Edit docker-compose.yml with your UniFi console URL and API key, then run:
./build.shThe MCP endpoint is:
http://127.0.0.1:8000/mcpThe Compose file publishes only to host loopback:
ports:
- "127.0.0.1:8000:8000"Do not change this to 8000:8000 unless you intend to expose the server on all
host interfaces and have added real authentication. The Docker image binds to
0.0.0.0 inside the container so Docker can forward the published port to the
Python process.
Local Python
Requires Python 3.12 or newer.
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_mcpFor stdio clients:
MCP_TRANSPORT=stdio \
UNIFI_BASE_URL='https://172.16.1.1/proxy/network/integration' \
UNIFI_API_KEY='<api-key>' \
python -m unifi_mcpMCP Tools
The server intentionally exposes three MCP tools instead of one tool per UniFi endpoint:
Tool | Purpose |
| List available UniFi skills with brief descriptions. Omit arguments for the default brief catalog; use |
| Fetch the exact input schema for one selected skill. Response docs and samples are opt-in. |
| Execute the selected skill with |
This keeps the MCP tool list small while still giving the model exact schemas before it calls an endpoint.
Skill calls use this shape:
{
"pathParams": { "siteId": "..." },
"queryParams": { "limit": 25, "offset": 0 },
"body": {}
}body is accepted only when the selected skill schema includes a request body.
With the default READ_ONLY=true, exposed skills are GET-only and do not need a
body.
Configuration
Only UNIFI_BASE_URL and UNIFI_API_KEY are required. READ_ONLY=true is the
secure default and is shown in Compose as an explicit safety setting.
Variable | Default | Notes |
| required | UniFi Network Integration API base URL, normally |
| required | UniFi API key. Do not commit real keys. |
|
| When true, exposes only |
| unset | Read the API key from a mounted secret file instead of |
| unset | Trust a self-signed UniFi certificate. Prefer this over disabling TLS verification. |
|
| TLS verification stays enabled by default. Set |
|
| UniFi request timeout in seconds. |
|
| Use |
|
| HTTP bind host. The Docker image overrides this to |
|
| HTTP bind port. |
|
| Streamable HTTP endpoint path. |
| unset | Optional bearer token for Streamable HTTP. For shared or internet-facing deployments, prefer a proper authenticated HTTPS proxy or gateway. |
| unset | Read the bearer token from a mounted secret file instead of |
| unset | Comma-separated exact browser origins allowed to call the Streamable HTTP endpoint. |
Do not set both a direct secret env var and its _FILE variant. Startup fails on
ambiguous secret configuration.
Skills
Runtime manifests live in skills/network and are generated from docs/network:
python3 scripts/import_unifi_docs.py --source docs/network --output skills/networkThe importer writes endpoint manifests only. Guide documents such as
_index.json, gettingstarted.json, filtering.json, error-handling.json,
and quick_start.ansible.json are ignored.
Generated manifests preserve endpoint paths, parameters, request bodies, responses, descriptions, required flags, types, and discriminators.
Connector wildcard proxy endpoints are generated from upstream docs but are not exposed at runtime. Add curated endpoint manifests instead of enabling broad proxy access.
Development
python3 -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
pytest
ruff check .This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Unified gateway exposing 150+ tools across all NexGenData MCP servers via one endpoint.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP for 1,500+ APIs. Vault-managed credentials; OAuth or API key. Search, load, and execute.
Related MCP Servers
- AlicenseAqualityAmaintenanceExposes UniFi Protect's Integration REST API as tools for Claude Code and other MCP clients, providing 73 tools to manage cameras, lights, sensors, and more with safety features like read-only mode and dry-run support.38387 npm1MIT
- -licenseNot gradedqualityNot gradedmaintenanceTurns your UniFi Network Controller into programmable tools for querying and modifying network settings via MCP.-
- AlicenseNot gradedqualityCmaintenanceA safety-first MCP server for managing UniFi networks, exposing 17 tools for telemetry, diagnostics, and guarded mutations with dry-run previews and confirm requirements.14MIT
- AlicenseNot gradedqualityDmaintenanceDynamically exposes any REST API as MCP tools by parsing its OpenAPI specification.MIT