Hey everyone,
I built an MCP server for Pi-hole v6 that lets AI assistants (Claude, Cursor, VS Code Copilot, etc.) manage your Pi-hole instance through natural language.
What can it do?
Instead of clicking through the web UI, you can ask your AI assistant things like:
- "Why is ‘example.com’ being blocked?"
- "Show me the top blocked domains this week"
- "Add ‘ads.tracker.com’ to my blocklist"
- "What devices are on my network?"
- "Run a gravity update"
It covers the entire Pi-hole v6 REST API - 55 tools across DNS blocking, domain management, query analysis, statistics, groups, clients, lists, DHCP, network devices, logs, config, and system actions.
Key details:
- Written in Go - single binary, zero runtime dependencies, 9MB Docker image
- 6 built-in prompts for guided workflows (DNS diagnosis, blocked domain review, network audit, daily report, etc.)
- 5 MCP resources for quick status checks
- Session-based auth with automatic renewal
- Works with Claude, Cursor, Windsurf, VS Code, and Cline
- MIT licensed
Quick start:
{
"mcpServers": {
"pihole": {
"command": "pihole-mcp",
"env": {
"PIHOLE_URL": "http://192.168.1.2",
"PIHOLE_PASSWORD": "your-password"
}
}
}
}
Install via go install, Docker (ghcr.io/lloydmcl/pihole-mcp:latest), or grab a binary from the releases page.
GitHub: https://github.com/lloydmcl/pihole-mcp
Happy to answer any questions or take feature requests. If you run multiple Pi-hole instances, multi-instance support is on the roadmap.