Skip to content
VS Code

UniFi Network for VS Code

io.github.graf3x/unifi-mcp

Diagnostics and owner-approved changes for one UniFi Network console, over its local API.

client:VS Code transport:stdio runtime:oci

Install UniFi Network in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "unifi-url",
      "description": "UNIFI_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "unifi-api-key",
      "description": "UNIFI_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "unifi-cert-sha256",
      "description": "UNIFI_CERT_SHA256",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-lan-listen",
      "description": "MCP_LAN_LISTEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-lan-access-token",
      "description": "MCP_LAN_ACCESS_TOKEN",
      "password": true
    }
  ],
  "servers": {
    "unifi-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/graf3x/unifi-mcp:0.13.0"
      ],
      "env": {
        "UNIFI_URL": "${input:unifi-url}",
        "UNIFI_API_KEY": "${input:unifi-api-key}",
        "UNIFI_CERT_SHA256": "${input:unifi-cert-sha256}",
        "MCP_LAN_LISTEN": "${input:mcp-lan-listen}",
        "MCP_LAN_ACCESS_TOKEN": "${input:mcp-lan-access-token}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

UniFi Network in other clients