UniFi Network MCP Server
Click on "Install 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: MCP from API
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dontcrash/unifi-local-network-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server