Safe-by-default UniFi MCP: Network + Protect + Access, multi-site, dry-run, audit log.
unavailable — the image reference already carries a tag
Docker
docker run -i --rm ghcr.io/pete-builds/mcp-unifi:0.28.0
Pick your client — the config below is generated for this server (local stdio). Copy respects the “Pin version” switch above.
claude_desktop_config.json
{
"mcpServers": {
"unifi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.28.0"
],
"env": {
"MCP_UNIFI_AUTH_TOKENS": "<YOUR_MCP_UNIFI_AUTH_TOKENS>",
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>"
}
}
}
}Format verified against the official Claude Desktop docs ↗.
terminal
claude mcp add --env MCP_UNIFI_AUTH_TOKENS=<YOUR_MCP_UNIFI_AUTH_TOKENS> --env UNIFI_API_KEY=<YOUR_UNIFI_API_KEY> unifi -- docker run -i --rm ghcr.io/pete-builds/mcp-unifi:0.28.0
Format verified against the official Claude Code docs ↗.
.cursor/mcp.json
{
"mcpServers": {
"unifi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.28.0"
],
"env": {
"MCP_UNIFI_AUTH_TOKENS": "<YOUR_MCP_UNIFI_AUTH_TOKENS>",
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>"
}
}
}
}Format verified against the official Cursor docs ↗.
.vscode/mcp.json
{
"servers": {
"unifi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.28.0"
],
"env": {
"MCP_UNIFI_AUTH_TOKENS": "<YOUR_MCP_UNIFI_AUTH_TOKENS>",
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>"
}
}
}
}Format verified against the official VS Code docs ↗.
mcp_config.json
{
"mcpServers": {
"unifi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pete-builds/mcp-unifi:0.28.0"
],
"env": {
"MCP_UNIFI_AUTH_TOKENS": "<YOUR_MCP_UNIFI_AUTH_TOKENS>",
"UNIFI_API_KEY": "<YOUR_UNIFI_API_KEY>"
}
}
}
}Format verified against the official Windsurf docs ↗.
Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.
STUB_MODE — When true, the server returns realistic mock data and requires no UniFi hardware. Defaults to true. Set to false to manage a real gateway, which then needs UNIFI_HOST plus UNIFI_API_KEY (or UNIFI_API_KEY_FILE), or MCP_UNMCP_UNIFI_AUTH_TOKENS required secret — Bearer tokens that HTTP clients must present. Required: the streamable-http transport exits at startup with 'HTTP transport requires MCP_UNIFI_AUTH_TOKENS' when it is empty. Comma-separated; each entry is a bare token (nMCP_UNIFI_READONLY — When true, every tool that changes state is hidden from tools/list and refused on tools/call; read tools are unaffected. Defense in depth on top of a read-only UniFi API key. Defaults to false.UNIFI_HOST — IP address or hostname of the UniFi OS gateway (UCG-Fiber, UDM Pro, etc). Required when STUB_MODE=false and MCP_UNIFI_CONTROLLERS_FILE is unset.UNIFI_API_KEY secret — Local API key generated under Settings -> Control Plane -> Integrations on the gateway. Required when STUB_MODE=false and MCP_UNIFI_CONTROLLERS_FILE is unset, unless UNIFI_API_KEY_FILE is used instead.UNIFI_API_KEY_FILE — Path to a file inside the container that holds the local API key, for a Docker or Kubernetes secret mount. Wins over UNIFI_API_KEY when both are set. A controller configured this way verifies the gateway's TLS certificatUNIFI_PINNED_CERT — Path to a file inside the container that holds the gateway's own certificate in PEM, recorded with mcp-unifi-pin-cert. When set, that certificate is the only one the server accepts from the gateway, and a mismatch fails UNIFI_SITE — UniFi controller site name. Defaults to 'default'.⭐ 24 stars · 最近更新于 37 天前 · MIT license
Distributed as Docker, listed under Developer Tools. Review our MCP security guide before granting access to real data.
Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.
The MCP server itself is free to install. The source is public on https://github.com/pete-builds/mcp-unifi. Any third-party service it calls may require its own API key and account.
Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.
Publish this server? Link back with a badge on your README or site — copy either snippet.
Markdown
[](https://mcpnav.net/server/unifi/)
HTML
<a href="https://mcpnav.net/server/unifi/"><img src="https://mcpnav.net/badge/unifi.svg" alt="Listed on MCPNav" height="20"></a>