pip install unifi-sitemanager-mcp Copy PIP instructions
A read-only Model Context Protocol server for Ubiquiti's official Site Manager API. It gives an AI assistant the account-wide view that the Network, Protect and Access servers cannot see from inside one console: every host, site and device on a UI account, WAN performance per site, and SD-WAN configurations.
The other servers in this project connect directly to a console you name. This one is different:
/plugin marketplace add sirkirby/unifi-mcp /plugin install unifi-sitemanager@unifi-plugins Then run the plugin's setup command to configure the Site Manager key, and start a new Claude Code session. Give the key as a file or command provider; do not paste it into chat.
Codex plugin. Register the marketplace, then install unifi-sitemanager from Codex's /plugins UI:
codex plugin marketplace add sirkirby/unifi-mcp Setup writes the key provider to a per-user settings file that the plugin's server entry reads through UNIFI_SETTINGS_FILE. See the plugin support matrix.
# PyPI uvx unifi-sitemanager-mcp@latest # or: pip install unifi-sitemanager-mcp # Docker docker pull ghcr.io/sirkirby/unifi-sitemanager-mcp:latest Install from source You need uv and Python 3.13 or later.
git clone https://github.com/sirkirby/unifi-mcp.git cd unifi-mcp uv sync Create an API key at unifi.ui.com under Settings > API Keys, save it in a file only you can read, and start the server:
export UNIFI_SITEMANAGER_API_KEY_FILE="$HOME/.config/unifi-mcp/sitemanager-api-key" uv run --package unifi-sitemanager-mcp unifi-sitemanager-mcp Without a key the server still starts. It answers the client in setup mode, offers only sitemanager_setup_status, explains what to set, and makes no request.
"List every console on my UniFi account with its OS version and whether it is connected"
"Which devices across all my sites have a firmware update available?"
"Which sites had WAN downtime or high latency in the last 24 hours?"
"Compare packet loss over the last 7 days for the two sites on the same ISP"
"Show the deployment status of my SD-WAN configuration. Are any hubs or spokes reporting errors?"
Every tool reads. Nothing on this server changes a console, a site or the account.
Set these variables in the server's process environment. The server does not load .env files from the working directory. Load a trusted env file explicitly in your launcher, or name a per-user settings file with an absolute UNIFI_SETTINGS_FILE path.
The full list, including HTTP, logging, diagnostics and tracing, is in docs/configuration.md. The _FILE and _COMMAND forms follow the shared credential provider rules.
UNIFI_SITEMANAGER_MCP_CONTENT_MODE (falling back to UNIFI_MCP_CONTENT_MODE) controls how tool results are returned. The default, adaptive, decides from the MCP protocolVersion the client advertised during initialization, not from the client's name. Clients advertising 2025-06-18 or later get a short content text plus the full result once in structuredContent; earlier or missing revisions get the full JSON in content. Set compat to always send the full JSON in content, or compact to always send the short form. The meta-tools always return their result in content. See docs/configuration.md.
This server has one credential: the Site Manager API key. There is no console host, username, password or local API key, and no second authentication path.
The key is read only from UNIFI_SITEMANAGER_API_KEY or its _FILE / _COMMAND forms. It is never read from:
The separation runs both ways because the two keys reach different places. A console key opens one console on your network. A Site Manager key reads every console on the account from anywhere on the internet.
Responses pass through the same redaction as the other servers: fields whose names mark them as secrets come back as ***REDACTED***. Set UNIFI_SITEMANAGER_REDACT_SENSITIVE_FIELDS=false (or the shared UNIFI_REDACT_SENSITIVE_FIELDS=false) only for a trusted local process that needs raw values. Independently of that setting, the account holder's name, email and role are never returned. See docs/permissions.md.
Stdio is the default transport, for Claude Desktop, Claude Code and other local clients:
uv run --package unifi-sitemanager-mcp unifi-sitemanager-mcp HTTP is opt-in and listens on port 3003 by default. It is meant for a container, where the server is the main process; the Docker Compose service below turns it on. Outside a container the server skips HTTP unless UNIFI_MCP_HTTP_FORCE=true is also set, which is for local testing only:
UNIFI_MCP_HTTP_ENABLED=true UNIFI_MCP_HTTP_FORCE=true \ UNIFI_SITEMANAGER_MCP_HTTP_AUTH_TOKEN_FILE="$HOME/.config/unifi-mcp/sitemanager-http-token" \ uv run --package unifi-sitemanager-mcp unifi-sitemanager-mcp Never set these variables in a client's MCP entry. Anyone who can reach the HTTP endpoint can read the whole account's inventory. Keep it on loopback, the default bind address, and set a bearer token. See HTTP transport.
The Compose file builds the image from this checkout. The Site Manager service is in the opt-in sitemanager profile, so it does not start with the other servers:
export UNIFI_SITEMANAGER_API_KEY="$(cat "$HOME/.config/unifi-mcp/sitemanager-api-key")" docker compose -f docker/docker-compose.yml --profile sitemanager up --build unifi-sitemanager-mcp The key is taken from your shell when the container starts and is never built into the image. The service receives only its own key variables, never the shared env file or console logins, and serves HTTP on 127.0.0.1:3003. To use UNIFI_SITEMANAGER_API_KEY_FILE instead, mount the secret read-only and give its path inside the container; UNIFI_SITEMANAGER_API_KEY_COMMAND must name a helper installed in the image.
{ "mcpServers": { "unifi-sitemanager": { "command": "uvx", "args": ["unifi-sitemanager-mcp@latest"], "env": { "UNIFI_SITEMANAGER_API_KEY_FILE": "/Users/you/.config/unifi-mcp/sitemanager-api-key" } } } } Use a file or command provider rather than putting the key itself in the config file.
The server can be listed in a relay's UNIFI_RELAY_SERVERS like the others, but it is not added by default. Relay tokens are scoped to a location, and this server exposes the whole account: anyone holding a token for that location, including a read-only one, could then read the inventory of every console on the account.
Host, site and device ids returned here belong to the Site Manager tool family. They are not the ids the Network, Protect or Access servers use, and there is no translation between them.
Supported: reading hosts, sites, devices, ISP metrics and SD-WAN configurations for the account behind the key, one page at a time.
Not supported: any write or configuration change, firmware updates, reboots, events or real-time streams, MCP resources, support bundles, and reading data from inside a console (clients, firewall rules, cameras, doors). For those, use the Network, Protect or Access server against the console itself.
The same nine reads are also available through unifi-api-server.
cd apps/sitemanager make test # Run tests make lint # Lint make format # Format make manifest # Regenerate tools_manifest.json make run # Run the server locally (lazy mode) make pre-commit # Format, manifests, lint and test See the root CONTRIBUTING.md for the full monorepo workflow.
Both files in this release have provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




