MCP server for Pi-hole v6 API β manage multiple instances: queries, lists, groups, stats
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Pi Hole MCP Server.
pihole_query_logFetch query log with filters (limit, time range, client, domain, status)
pihole_allow_domainAdd to allowlist (auto-detects exact vs regex)
pihole_deny_domainAdd to denylist (auto-detects exact vs regex)
pihole_list_allowlistList all allowlist entries (exact + regex merged)
pihole_list_denylistList all denylist entries (exact + regex merged)
pihole_stats_summaryGet Pi-hole statistics summary
An MCP (Model Context Protocol) server that gives AI assistants like Claude full control over your Pi-hole v6 DNS ad-blocker - query logs, allow/deny lists, group management, gravity reload, and stats. Designed from day one for multi-instance deployments: manage one or many Pi-hole instances from a single MCP endpoint.
Pi-hole's admin API is powerful but cumbersome to script against. This MCP server turns every Pi-hole API action into a tool that any MCP-compatible AI assistant can call directly. Instead of clicking through the admin UI or writing curl commands, just ask your AI to check what's being blocked, allowlist a domain, or compare stats across instances.
Perfect for homelabbers running multiple Pi-holes (primary + secondary, or per-VLAN), network admins managing DNS filtering at scale, and anyone who wants AI-assisted DNS management.
/run/secrets/ filesAll configuration is via environment variables. See .env.example for the full reference.
For each instance name in PIHOLE_INSTANCES, provide:
| Variable | Required | Description |
|---|---|---|
<NAME>_BASE_URL | Yes | Pi-hole base URL (e.g. http://pihole.local) |
<NAME>_PASSWORD | Yes | Pi-hole API password (or use Docker secrets) |
<NAME>_INSECURE_TLS | No | Set true for self-signed certs (default: false) |
Docker secrets are supported as a fallback: /run/secrets/<name>_password (lowercase).
| Tool | Description |
|---|---|
pihole_query_log | Fetch query log with filters (limit, time range, client, domain, status) |
pihole_allow_domain | Add to allowlist (auto-detects exact vs regex) |
pihole_deny_domain | Add to denylist (auto-detects exact vs regex) |
pihole_list_allowlist | List all allowlist entries (exact + regex merged) |
pihole_list_denylist | List all denylist entries (exact + regex merged) |
pihole_stats_summary | Get Pi-hole statistics summary |
pihole_reload_lists | Trigger gravity reload |
pihole_group_management | CRUD operations on Pi-hole groups |
pihole_check_regex_types | Detect miscategorized regex in deny-exact list |
pihole_set_blocking | Enable/disable blocking, with optional auto-revert timer |
pihole_domain_management | Update or delete an allow/deny domain (completes CRUD) |
pihole_local_dns | List/add/delete local DNS A records |
pihole_local_cname | List/add/delete local CNAME records |
Every tool accepts an optional instance parameter to target a specific Pi-hole. Defaults to the first configured instance.
The server listens on http://HOST:PORT/mcp (default: http://localhost:3000/mcp).
Add to your MCP settings:
If your MCP client only supports stdio transport, use supergateway:
MIT
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/pi-hole-mcp-server-2)<a href="https://allmcps.com/mcp/pi-hole-mcp-server-2"><img src="https://allmcps.com/api/badge/pi-hole-mcp-server-2?style=directory" alt="Pi Hole MCP Server on AllMCPs" /></a>