Skip to content
VS Code

Pi-hole MCP Server for VS Code

io.github.ranklancer/pihole-mcp

MCP server for Pi-hole v6 API — manage multiple instances: queries, lists, groups, stats

client:VS Code transport:stdio runtime:npm

Install Pi-hole MCP Server in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "pihole-instances",
      "description": "PIHOLE_INSTANCES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pihole-base-url",
      "description": "PIHOLE_BASE_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pihole-password",
      "description": "PIHOLE_PASSWORD",
      "password": true
    }
  ],
  "servers": {
    "pihole-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@ranklancer/pihole-mcp"
      ],
      "env": {
        "PIHOLE_INSTANCES": "${input:pihole-instances}",
        "PIHOLE_BASE_URL": "${input:pihole-base-url}",
        "PIHOLE_PASSWORD": "${input:pihole-password}"
      }
    }
  }
}

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