Labsco
lloydmcl logo

Pi-hole

โ˜… 4

from lloydmcl

Manage your Pi-hole v6 instance with 55 tools covering DNS blocking, domain management, query analysis, statistics, DHCP, and system administration.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys
pihole-mcp

pihole-mcp

A production-grade MCP server for Pi-hole v6.

77 tools | 9 prompts | 5 resources | Multi-instance + sync | Single Go binary | ~6MB compressed (slim: ~3.5MB)

Go Report Card

Gives AI assistants full control over your Pi-hole instance โ€” DNS blocking, domain management, query analysis, statistics, network devices, DHCP, and system administration. Compatible with the Pi-hole v6 REST API.

Tools

Dashboard

ToolDescription
pihole_paddOne-call snapshot: queries, blocking, top domain/client, cache, versions, host health

DNS Control

ToolDescription
pihole_dns_get_blockingGet current DNS blocking status and timer
pihole_dns_set_blockingEnable/disable blocking with optional timer

Statistics

ToolDescription
pihole_stats_summaryQueries, blocking rate, clients, gravity size
pihole_stats_top_domainsTop queried or blocked domains
pihole_stats_top_clientsMost active clients by query count
pihole_stats_upstreamsUpstream DNS server performance
pihole_stats_query_typesQuery type distribution (A, AAAA, MX, etc.)
pihole_stats_recent_blockedRecently blocked domains
pihole_stats_databaseLong-term database statistics

Domain Management

ToolDescription
pihole_domains_listList allow/deny domains
pihole_domains_addAdd domains (bulk supported)
pihole_domains_updateUpdate domain entry
pihole_domains_deleteRemove a domain
pihole_domains_batch_deleteRemove multiple domains

Groups, Clients, Lists

ToolDescription
pihole_groups_list/add/update/delete/batch_deleteManage groups
pihole_clients_list/suggestions/add/update/deleteManage clients
pihole_lists_list/add/update/delete/batch_deleteManage blocklists/allowlists

Query Log

ToolDescription
pihole_queries_searchSearch queries with 12 filters + cursor pagination
pihole_queries_suggestionsAvailable filter values

System

ToolDescription
pihole_info_systemHost, CPU, memory, disk, load, temperature
pihole_info_versionPi-hole component versions
pihole_info_databaseDatabase size and query count
pihole_info_messagesFTL diagnostic messages
pihole_search_domainsCross-list domain search
pihole_config_get/setRead/modify Pi-hole configuration
pihole_config_get_value/add_value/remove_valueGranular dotted-path config access
pihole_config_propertiesList read-only config keys (Pi-hole v6.6.1+)

Actions and Network

ToolDescription
pihole_action_gravity_updateRe-download blocklists
pihole_action_restart_dnsRestart FTL DNS resolver
pihole_action_flush_logs/networkFlush logs or network table
pihole_network_devices/gateway/infoNetwork device discovery
pihole_dhcp_leases/delete_leaseDHCP lease management
pihole_logs_dns/ftl/webserverLog retrieval
pihole_teleporter_export/importConfiguration backup and restore
pihole_history_graph/clientsActivity history

Multi-instance (only with more than one Pi-hole configured)

ToolDescription
pihole_instance_diffCompare configuration between two instances
pihole_instance_syncReconcile a target instance towards a source (dry-run plan, then confirmed apply)

Response Options

Most tools accept optional parameters for controlling output:

  • detail (minimal | normal | full) โ€” Controls response depth. Default: normal. Use minimal for one-line summaries, full for complete API data.
  • format (text | csv) โ€” Output format for tabular data. Default: text. CSV saves ~29% tokens. Available on pihole_domains_list, pihole_lists_list, pihole_clients_list, pihole_queries_search, pihole_network_devices, pihole_stats_top_domains, pihole_stats_top_clients, pihole_stats_upstreams, pihole_stats_query_types, pihole_stats_recent_blocked, pihole_stats_database_top_domains, pihole_stats_database_top_clients, pihole_stats_database_upstreams, pihole_dhcp_leases, and pihole_config_properties.

Prompts

Pre-built multi-step workflows for common tasks:

PromptDescription
diagnose_slow_dnsAnalyse upstream performance and identify bottlenecks
investigate_domainCheck why a domain is blocked/allowed across all lists
review_top_blockedIdentify false positives in top blocked domains
audit_networkDiscover unknown devices and unconfigured clients
optimise_blocklistsSuggest list consolidation and cleanup
daily_reportComprehensive daily Pi-hole health summary

Development

# Prerequisites: Go 1.26+, Docker, mise, just

# One-command setup
just setup

# Start local Pi-hole (http://localhost:8081, password: test)
just dev-up

# Run quality checks (format + lint + test)
just check

# Run integration tests against local Pi-hole
just integration

# Build binary
just build

See CONTRIBUTING.md for full development guidelines.


Pi-hole is a registered trademark of Pi-hole LLC. This project is independently maintained and is not affiliated with, endorsed by, or sponsored by Pi-hole LLC.