pihole_paddLABSCO SUMMARY
Sync is dry-run first, and it says what it will not touch.
The two-Pi-hole story is the standout: diff is read-only, and sync writes in one direction only, returns a plan with a single-use confirm token before changing anything, takes a teleporter backup first, and deliberately never syncs DHCP, interface bindings, passwords, TLS certificates or 2FA. Elsewhere the same connection that reads your stats can restart DNS and rewrite your blocklists, so it is worth using an application password you can revoke.
What it is
An MCP server for the Pi-hole v6 REST API, shipped as a single Go binary. It covers the whole admin surface rather than a read-only slice: statistics and query log on one side, domain lists, groups, clients, configuration and service actions on the other. Point it at more than one Pi-hole and two extra tools appear for keeping them aligned.
What you get
pihole_padd— a one-call snapshot: queries, blocking state, top domain and client, cache, versions and host health- Blocking control —
pihole_dns_get_blockingandpihole_dns_set_blocking, the latter with an optional timer - Statistics —
pihole_stats_summary,pihole_stats_top_domains,pihole_stats_top_clients,pihole_stats_upstreams,pihole_stats_query_types,pihole_stats_recent_blocked, plus the long-term database equivalents - Query log —
pihole_queries_searchwith 12 filters and cursor pagination,pihole_queries_suggestionsfor the available filter values, andpihole_search_domainsfor a cross-list lookup - List management —
pihole_domains_list,pihole_domains_add,pihole_domains_update,pihole_domains_delete,pihole_domains_batch_delete, and the same shape forpihole_groups_list/add/update/delete/batch_delete,pihole_clients_list/suggestions/add/update/deleteandpihole_lists_list/add/update/delete/batch_delete - System and actions —
pihole_info_system,pihole_info_version,pihole_info_messages,pihole_action_gravity_update,pihole_action_restart_dns,pihole_network_devices,pihole_dhcp_leases,pihole_teleporter_exportandpihole_teleporter_import - Configuration by dotted path —
pihole_config_get,pihole_config_set,pihole_config_get_value,pihole_config_add_value,pihole_config_remove_value - 76 tools for a single Pi-hole; a second instance registers
pihole_instance_diffandpihole_instance_syncfor 78 - 9 prompts including
diagnose_slow_dns,investigate_domain,review_top_blocked,audit_networkandsecurity_audit, and 5 resources such aspihole://statusandpihole://summary
Requirements
A Pi-hole v6 instance and its admin password — an application password is the better choice for automation, since it bypasses TOTP 2FA and can be revoked on its own. Set PIHOLE_URL and PIHOLE_PASSWORD in the client's env block. Install the binary with brew install hexamatic/tap/pihole-mcp, scoop install pihole-mcp, go install github.com/hexamatic/pihole-mcp/cmd/pihole-mcp@latest, or the ghcr.io/hexamatic/pihole-mcp image. For several Pi-holes, use numbered variables — PIHOLE_1_URL, PIHOLE_1_PASSWORD, PIHOLE_1_NAME and so on — which are mutually exclusive with the single-instance pair. Set TZ if you want timestamps in local time rather than UTC. MIT.
Setup effort
One command plus credentials — brew install hexamatic/tap/pihole-mcp, then supply credentials
USE CASES
Finding out why a site is broken
Search the query log for the domain, then check which list is blocking it across allow and deny rules.
Unblocking something for ten minutes
Disable blocking with a timer so it re-enables itself instead of staying off until someone remembers.
Keeping a second Pi-hole in step with the first
Diff the two, review the plan sync returns, then re-run with the token to apply — with a backup taken before any write.
Spotting a device you do not recognize
List the network devices and DHCP leases and compare them against your configured clients.
Reading a morning health summary
One call returns queries, blocking state, cache, versions and host health without opening the dashboard.
78 tools
Listed in project docs. Your client may show a different list.
pihole_dns_get_blockingpihole_dns_set_blockingpihole_stats_summarypihole_stats_top_domainspihole_stats_top_clientspihole_stats_upstreamspihole_stats_query_typespihole_stats_recent_blockedpihole_stats_databasepihole_stats_database_top_domainspihole_stats_database_top_clientspihole_stats_database_upstreamspihole_stats_database_query_typespihole_info_systempihole_info_versionpihole_info_databasepihole_info_messagespihole_info_dismiss_messagepihole_info_clientpihole_info_ftlpihole_info_metricspihole_info_sensorspihole_queries_searchpihole_queries_suggestionspihole_history_graphpihole_history_clientspihole_history_databasepihole_history_database_clientspihole_search_domainspihole_domains_listpihole_domains_addpihole_domains_updatepihole_domains_deletepihole_domains_batch_deletepihole_groups_listpihole_groups_addpihole_groups_updatepihole_groups_deletepihole_groups_batch_deletepihole_clients_listpihole_clients_suggestionspihole_clients_addpihole_clients_updatepihole_clients_deletepihole_clients_batch_deletepihole_lists_listpihole_lists_addpihole_lists_updatepihole_lists_deletepihole_lists_batch_deletepihole_config_getpihole_config_setpihole_config_get_valuepihole_config_add_valuepihole_config_remove_valuepihole_config_propertiespihole_action_gravity_updatepihole_action_restart_dnspihole_action_flush_logspihole_action_flush_networkpihole_network_devicespihole_network_gatewaypihole_network_infopihole_network_routespihole_network_interfacespihole_network_delete_devicepihole_dhcp_leasespihole_dhcp_delete_leasepihole_logs_dnspihole_logs_ftlpihole_logs_webserverpihole_teleporter_exportpihole_teleporter_importpihole_auth_sessionspihole_auth_revoke_sessionpihole_instance_diffpihole_instance_syncBEFORE YOU INSTALL
What to know first
Tools you get
78 tools named in the project's documentation.
Requires
- pihole-mcp on PATH
- PIHOLE_PASSWORD in your environment
- PIHOLE_URL in your environment
Where it runs
All 7 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
brew install hexamatic/tap/pihole-mcpMCP Clients
Claude Desktop, Cursor, Windsurf, Cline
{
"mcpServers": {
"pihole": {
"command": "pihole-mcp",
"env": {
"PIHOLE_URL": "http://192.168.1.2",
"PIHOLE_PASSWORD": "<YOUR_PIHOLE_PASSWORD>"
}
}
}
}Claude Code
claude mcp add pihole -e PIHOLE_URL=http://192.168.1.2 -e PIHOLE_PASSWORD=<YOUR_PIHOLE_PASSWORD> -- pihole-mcpVS Code
{
"servers": {
"pihole": {
"type": "stdio",
"command": "pihole-mcp",
"env": {
"PIHOLE_URL": "http://192.168.1.2",
"PIHOLE_PASSWORD": "<YOUR_PIHOLE_PASSWORD>"
}
}
}
}Any MCP client — Docker
{
"mcpServers": {
"pihole": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PIHOLE_URL=http://192.168.1.2",
"-e",
"PIHOLE_PASSWORD=<YOUR_PIHOLE_PASSWORD>",
"-e",
"TZ=Australia/Adelaide",
"ghcr.io/hexamatic/pihole-mcp:latest"
]
}
}
}