
Pi-hole MCP Server
Connects Claude to Pi-hole v6's API so you can manage DNS blocklists, query logs, groups, and stats through conversation instead of curl commands or the web UI. Built for multi-instance setups where you're running primary and secondary Pi-holes or split configurations across VLANs. Auto-detects whether a domain needs exact or regex list treatment, includes a regex landmine detector for miscategorized rules, and supports gravity reloads. Ships with Docker config and runs over HTTP transport. Reach for this if you're managing multiple Pi-holes in a homelab or production environment and want to ask an AI to check what's blocked, allowlist domains, or compare stats across instances without switching contexts.
- tools
- 14
- auth
- Secret needed
- transport
- STDIO
- env vars
- 3
- last updated
- Apr 12, 2026
Tools
14 toolsPublic tool metadata for what this MCP can expose to an agent.
pihole_query_logFetch query log with filters (limit, time range, client IP or name, domain, status)
Fetch query log with filters (limit, time range, client IP or name, domain, status)
No parameter schema in public metadata yet.
pihole_allow_domainAdd to allowlist (auto-detects exact vs regex)
Add to allowlist (auto-detects exact vs regex)
No parameter schema in public metadata yet.
pihole_deny_domainAdd to denylist (auto-detects exact vs regex)
Add to denylist (auto-detects exact vs regex)
No parameter schema in public metadata yet.
pihole_list_allowlistList all allowlist entries (exact + regex merged)
List all allowlist entries (exact + regex merged)
No parameter schema in public metadata yet.
pihole_list_denylistList all denylist entries (exact + regex merged)
List all denylist entries (exact + regex merged)
No parameter schema in public metadata yet.
pihole_stats_summaryGet Pi-hole statistics summary
Get Pi-hole statistics summary
No parameter schema in public metadata yet.
pihole_reload_listsTrigger gravity reload
Trigger gravity reload
No parameter schema in public metadata yet.
pihole_group_managementCRUD operations on Pi-hole groups
CRUD operations on Pi-hole groups
No parameter schema in public metadata yet.
pihole_client_managementCRUD operations on Pi-hole clients and their group assignments
CRUD operations on Pi-hole clients and their group assignments
No parameter schema in public metadata yet.
pihole_check_regex_typesDetect miscategorized regex in deny-exact list
Detect miscategorized regex in deny-exact list
No parameter schema in public metadata yet.
pihole_set_blockingEnable/disable blocking, with optional auto-revert timer
Enable/disable blocking, with optional auto-revert timer
No parameter schema in public metadata yet.
pihole_domain_managementUpdate or delete an allow/deny domain (completes CRUD)
Update or delete an allow/deny domain (completes CRUD)
No parameter schema in public metadata yet.
pihole_local_dnsList/add/delete local DNS A records
List/add/delete local DNS A records
No parameter schema in public metadata yet.
pihole_local_cnameList/add/delete local CNAME records
List/add/delete local CNAME records
No parameter schema in public metadata yet.
Sponsors
Configuration
PIHOLE_INSTANCES*Comma-separated list of Pi-hole instance names (e.g. 'pihole' or 'primary,secondary')
PIHOLE_BASE_URL*Base URL of your first Pi-hole instance (e.g. 'http://192.168.1.100')
PIHOLE_PASSWORD*secretAPI password for your first Pi-hole instance
Readme
pihole-mcp
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.
Why?
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.
Details
- Repository
- github.com/ranklancer/pihole-mcp
- Package
@ranklancer/pihole-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active