Pi-hole MCP Server
by ranklancerio.github.ranklancer/pihole-mcpv0.2.0
MCP server for Pi-hole v6 API — manage multiple instances: queries, lists, groups, stats
context tax
queued
security
queued
cold start
queued
freshness
Active28d ago
Install Pi-hole MCP server
Install in Claude Code
claude mcp add pihole-ranklancer -e PIHOLE_INSTANCES='<pihole-instances>' -e PIHOLE_BASE_URL='<pihole-base-url>' -e PIHOLE_PASSWORD='<pihole-password>' -- npx -y @ranklancer/pihole-mcpInstall in Cursor
{
"mcpServers": {
"pihole-ranklancer": {
"command": "npx",
"args": [
"-y",
"@ranklancer/pihole-mcp"
],
"env": {
"PIHOLE_INSTANCES": "<pihole-instances>",
"PIHOLE_BASE_URL": "<pihole-base-url>",
"PIHOLE_PASSWORD": "<pihole-password>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"pihole-ranklancer": {
"command": "npx",
"args": [
"-y",
"@ranklancer/pihole-mcp"
],
"env": {
"PIHOLE_INSTANCES": "<pihole-instances>",
"PIHOLE_BASE_URL": "<pihole-base-url>",
"PIHOLE_PASSWORD": "<pihole-password>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"pihole-ranklancer": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@ranklancer/pihole-mcp"
],
"env": {
"PIHOLE_INSTANCES": "<pihole-instances>",
"PIHOLE_BASE_URL": "<pihole-base-url>",
"PIHOLE_PASSWORD": "<pihole-password>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"pihole-ranklancer": {
"command": "npx",
"args": [
"-y",
"@ranklancer/pihole-mcp"
],
"env": {
"PIHOLE_INSTANCES": "<pihole-instances>",
"PIHOLE_BASE_URL": "<pihole-base-url>",
"PIHOLE_PASSWORD": "<pihole-password>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| PIHOLE_INSTANCES | yes | — | Comma-separated list of Pi-hole instance names (e.g. 'pihole' or 'primary,secondary') |
| PIHOLE_BASE_URL | yes | — | Base URL of your first Pi-hole instance (e.g. 'http://192.168.1.100') |
| PIHOLE_PASSWORD | yes | yes | API password for your first Pi-hole instance |
Freshness
Active — last maintenance signal 28d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-09-12 · 28d ago · GitHub
Latest release
no data · GitHub
Package published
no data · npm/PyPI
Registry entry updated
2026-04-12 · 6mo ago · official registry · v0.2.0
FAQ
›How do I install the Pi-hole MCP server in Claude Code?
Run: claude mcp add pihole-ranklancer -e PIHOLE_INSTANCES='<pihole-instances>' -e PIHOLE_BASE_URL='<pihole-base-url>' -e PIHOLE_PASSWORD='<pihole-password>' -- npx -y @ranklancer/pihole-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Pi-hole require an API key?
Yes. It expects PIHOLE_INSTANCES, PIHOLE_BASE_URL, PIHOLE_PASSWORD, of which 1 is a secret.
›Can I use Pi-hole as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Pi-hole in the official MCP registry?
Yes, as io.github.ranklancer/pihole-mcp.