Pi-hole MCP Server
About
MCP server for Pi-hole v6 API — manage multiple instances: queries, lists, groups, stats
Use this server
Add it to your MCP client. The catalogue lists this config verbatim from its source — it does not run, download, or vouch for the server. Review the command before you run it.
Transportstdio (runs a local command)
Env vars
PIHOLE_INSTANCES PIHOLE_BASE_URL PIHOLE_PASSWORDClaude Code
claude mcp add --env PIHOLE_INSTANCES= --env PIHOLE_BASE_URL= --env PIHOLE_PASSWORD= pihole-mcp -- npx @ranklancer/pihole-mcp
Cursor
If the button doesn't open Cursor, use the JSON below — Cursor accepts the same mcpServers config.
VS Code
code --add-mcp '{"name":"pihole-mcp","command":"npx","args":["@ranklancer/pihole-mcp"],"env":{"PIHOLE_INSTANCES":"","PIHOLE_BASE_URL":"","PIHOLE_PASSWORD":""}}'
JSON
{
"mcpServers": {
"pihole-mcp": {
"command": "npx",
"args": [
"@ranklancer/pihole-mcp"
],
"env": {
"PIHOLE_INSTANCES": "",
"PIHOLE_BASE_URL": "",
"PIHOLE_PASSWORD": ""
}
}
}
}
Environment variables are listed by name only — fill in your own values. Entries never carry secrets.