Install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
Windows / Linux path
%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"io-github-mmoonport-labs-unifi-mcp": {
"command": "npx",
"args": [
"-y",
"@mmoonport-labs/unifi-mcp"
],
"env": {
"UNIFI_URL": "<VALUE>",
"UNIFI_API_KEY": "<YOUR_VALUE>",
"UNIFI_CERT_SHA256": "<VALUE>",
"UNIFI_READ_ONLY": "<VALUE>",
"UNIFI_SITE": "default",
"UNIFI_INSECURE": "<VALUE>",
"UNIFI_SPEC_DIR": "$XDG_CACHE_HOME/unifi-mcp or ~/.cache/unifi-mcp",
"UNIFI_AUDIT_LOG": "<VALUE>",
"UNIFI_SPEC_FILE": "<VALUE>",
"UNIFI_SPEC_AUTO_UPDATE": "<VALUE>",
"UNIFI_PROTECT_SPEC_FILE": "<VALUE>"
}
}
}
}
Restart Claude Desktop to activate the new server.
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Windows / Linux path
.cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global).cursor/mcp.json (project) or ~/.cursor/mcp.json (global){
"mcpServers": {
"io-github-mmoonport-labs-unifi-mcp": {
"command": "npx",
"args": [
"-y",
"@mmoonport-labs/unifi-mcp"
],
"env": {
"UNIFI_URL": "<VALUE>",
"UNIFI_API_KEY": "<YOUR_VALUE>",
"UNIFI_CERT_SHA256": "<VALUE>",
"UNIFI_READ_ONLY": "<VALUE>",
"UNIFI_SITE": "default",
"UNIFI_INSECURE": "<VALUE>",
"UNIFI_SPEC_DIR": "$XDG_CACHE_HOME/unifi-mcp or ~/.cache/unifi-mcp",
"UNIFI_AUDIT_LOG": "<VALUE>",
"UNIFI_SPEC_FILE": "<VALUE>",
"UNIFI_SPEC_AUTO_UPDATE": "<VALUE>",
"UNIFI_PROTECT_SPEC_FILE": "<VALUE>"
}
}
}
}
Cursor usually picks up config changes automatically; if the server does not appear, reload the window.
Add to .mcp.json (project) or ~/.claude.json (global)
Windows / Linux path
.mcp.json (project) or %USERPROFILE%\.claude.json (global).mcp.json (project) or ~/.claude.json (global){
"mcpServers": {
"io-github-mmoonport-labs-unifi-mcp": {
"command": "npx",
"args": [
"-y",
"@mmoonport-labs/unifi-mcp"
],
"env": {
"UNIFI_URL": "<VALUE>",
"UNIFI_API_KEY": "<YOUR_VALUE>",
"UNIFI_CERT_SHA256": "<VALUE>",
"UNIFI_READ_ONLY": "<VALUE>",
"UNIFI_SITE": "default",
"UNIFI_INSECURE": "<VALUE>",
"UNIFI_SPEC_DIR": "$XDG_CACHE_HOME/unifi-mcp or ~/.cache/unifi-mcp",
"UNIFI_AUDIT_LOG": "<VALUE>",
"UNIFI_SPEC_FILE": "<VALUE>",
"UNIFI_SPEC_AUTO_UPDATE": "<VALUE>",
"UNIFI_PROTECT_SPEC_FILE": "<VALUE>"
}
}
}
}
The server will be available in the next Claude Code session.
Add to .vscode/mcp.json
Windows / Linux path
.vscode\mcp.json.vscode/mcp.json{
"servers": {
"io-github-mmoonport-labs-unifi-mcp": {
"command": "npx",
"args": [
"-y",
"@mmoonport-labs/unifi-mcp"
],
"env": {
"UNIFI_URL": "<VALUE>",
"UNIFI_API_KEY": "<YOUR_VALUE>",
"UNIFI_CERT_SHA256": "<VALUE>",
"UNIFI_READ_ONLY": "<VALUE>",
"UNIFI_SITE": "default",
"UNIFI_INSECURE": "<VALUE>",
"UNIFI_SPEC_DIR": "$XDG_CACHE_HOME/unifi-mcp or ~/.cache/unifi-mcp",
"UNIFI_AUDIT_LOG": "<VALUE>",
"UNIFI_SPEC_FILE": "<VALUE>",
"UNIFI_SPEC_AUTO_UPDATE": "<VALUE>",
"UNIFI_PROTECT_SPEC_FILE": "<VALUE>"
}
}
}
}
Reload the VS Code window to activate.
Add to ~/.codeium/windsurf/mcp_config.json
Windows / Linux path
%USERPROFILE%\.codeium\windsurf\mcp_config.json~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"io-github-mmoonport-labs-unifi-mcp": {
"command": "npx",
"args": [
"-y",
"@mmoonport-labs/unifi-mcp"
],
"env": {
"UNIFI_URL": "<VALUE>",
"UNIFI_API_KEY": "<YOUR_VALUE>",
"UNIFI_CERT_SHA256": "<VALUE>",
"UNIFI_READ_ONLY": "<VALUE>",
"UNIFI_SITE": "default",
"UNIFI_INSECURE": "<VALUE>",
"UNIFI_SPEC_DIR": "$XDG_CACHE_HOME/unifi-mcp or ~/.cache/unifi-mcp",
"UNIFI_AUDIT_LOG": "<VALUE>",
"UNIFI_SPEC_FILE": "<VALUE>",
"UNIFI_SPEC_AUTO_UPDATE": "<VALUE>",
"UNIFI_PROTECT_SPEC_FILE": "<VALUE>"
}
}
}
}
Restart Windsurf (or refresh its MCP servers panel) to activate the new server.
Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.
Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows / Linux path
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json{
"mcpServers": {
"io-github-mmoonport-labs-unifi-mcp": {
"command": "npx",
"args": [
"-y",
"@mmoonport-labs/unifi-mcp"
],
"env": {
"UNIFI_URL": "<VALUE>",
"UNIFI_API_KEY": "<YOUR_VALUE>",
"UNIFI_CERT_SHA256": "<VALUE>",
"UNIFI_READ_ONLY": "<VALUE>",
"UNIFI_SITE": "default",
"UNIFI_INSECURE": "<VALUE>",
"UNIFI_SPEC_DIR": "$XDG_CACHE_HOME/unifi-mcp or ~/.cache/unifi-mcp",
"UNIFI_AUDIT_LOG": "<VALUE>",
"UNIFI_SPEC_FILE": "<VALUE>",
"UNIFI_SPEC_AUTO_UPDATE": "<VALUE>",
"UNIFI_PROTECT_SPEC_FILE": "<VALUE>"
}
}
}
}
Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.
Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.
Configuration
Environment variables this server reads. Secrets stay on your machine.
| Name | Required | Description |
|---|---|---|
| UNIFI_URL | No | Gateway address, e.g. https://192.168.1.1. Required unless setup saved one. |
| UNIFI_API_KEY secret | No | UniFi API key created in Settings > Control Plane > Integrations. Required unless setup saved one. Only ever sent as the X-API-KEY header. |
| UNIFI_CERT_SHA256 | No | Recommended SHA-256 fingerprint of the gateway's own certificate, used to pin it. The key is not sent to any other certificate. |
| UNIFI_READ_ONLY | No | Set to 1 to refuse every change (unifi_write, unifi_delete, unifi_set_port_forward), whatever the permissions say. |
| UNIFI_SITE | No | Site name. Default: default |
| UNIFI_INSECURE | No | Set to 1 to accept the self-signed certificate without pinning. |
| UNIFI_SPEC_DIR | No | Where fetched specs are cached. Default: $XDG_CACHE_HOME/unifi-mcp or ~/.cache/unifi-mcp |
| UNIFI_AUDIT_LOG | No | File to append every applied change to, one JSON object per line. Secrets redacted; created readable only by you. |
| UNIFI_SPEC_FILE | No | Path to another copy of the Network OpenAPI spec, used instead of the fetched one. |
| UNIFI_SPEC_AUTO_UPDATE | No | Set to 0 to never fetch a spec. |
| UNIFI_PROTECT_SPEC_FILE | No | Path to another copy of the Protect OpenAPI spec, used instead of the fetched one. |