Skip to content
VS Code

Pi-hole MCP Server for VS Code

io.github.hexamatic/pihole-mcp

Manage Pi-hole v6: DNS blocking, domains, clients, query analysis, DHCP, and multi-instance sync.

client:VS Code transport:stdio runtime:oci

Install Pi-hole MCP Server in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "pihole-url",
      "description": "PIHOLE_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pihole-password",
      "description": "PIHOLE_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "tz",
      "description": "TZ",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pihole-read-only",
      "description": "PIHOLE_READ_ONLY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pihole-tls-skip-verify",
      "description": "PIHOLE_TLS_SKIP_VERIFY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pihole-request-timeout",
      "description": "PIHOLE_REQUEST_TIMEOUT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pihole-max-retries",
      "description": "PIHOLE_MAX_RETRIES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pihole-retry-max-delay",
      "description": "PIHOLE_RETRY_MAX_DELAY",
      "password": true
    }
  ],
  "servers": {
    "pihole-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hexamatic/pihole-mcp:0.9.0"
      ],
      "env": {
        "PIHOLE_URL": "${input:pihole-url}",
        "PIHOLE_PASSWORD": "${input:pihole-password}",
        "TZ": "${input:tz}",
        "PIHOLE_READ_ONLY": "${input:pihole-read-only}",
        "PIHOLE_TLS_SKIP_VERIFY": "${input:pihole-tls-skip-verify}",
        "PIHOLE_REQUEST_TIMEOUT": "${input:pihole-request-timeout}",
        "PIHOLE_MAX_RETRIES": "${input:pihole-max-retries}",
        "PIHOLE_RETRY_MAX_DELAY": "${input:pihole-retry-max-delay}"
      }
    }
  }
}

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

Pi-hole MCP Server in other clients