Pihole MCP Server

Gives AI assistants full control over your Pi-hole instance — DNS blocking, domain management, query analysis, statistics, network devices, DHCP, and

Local serverstdioGo

What is the Pihole MCP Server?

Gives AI assistants full control over your Pi-hole instance — DNS blocking, domain management, query analysis, statistics, network devices, DHCP, and system

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
pihole_paddOne-call snapshot: queries, blocking, top domain/client, cache, versions, host health
pihole_dns_get_blockingGet current DNS blocking status and timer
pihole_dns_set_blockingEnable/disable blocking with optional timer
pihole_local_dns_listList local A and AAAA records (dns.hosts)
pihole_local_dns_addPoint a hostname at an IP address; the record type follows the address family
pihole_local_dns_deleteRemove a local A or AAAA record by IP address and hostname
pihole_local_cname_listList local CNAME records (dns.cnameRecords)
pihole_local_cname_addPoint an alias at another name, with an optional TTL
pihole_local_cname_deleteRemove a local CNAME record by its alias
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
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
pihole_queries_searchSearch queries with 12 filters + cursor pagination
pihole_queries_suggestionsAvailable filter values
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_info_dismiss_messageDismiss a diagnostic message by ID
pihole_info_clientThe requesting client's own IP and connection info
pihole_info_ftlFTL process info: PID, privacy level, client/domain counts
pihole_info_metricsLive DNS and DHCP operational metrics (cache, inserts, evictions, leases)
pihole_info_sensorsHardware temperature sensors
pihole_search_domainsCross-list domain search
pihole_config_propertiesList read-only config keys (Pi-hole v6.6.1+)
pihole_action_gravity_updateRe-download blocklists
pihole_action_restart_dnsRestart FTL DNS resolver
pihole_action_flush_logsFlush the query log
pihole_action_flush_networkFlush the network table (Pi-hole v6.3+)
pihole_network_delete_deviceRemove a stale network device record
pihole_instance_diffCompare configuration between two instances
pihole_instance_syncReconcile a target instance towards a source (dry-run plan, then confirmed apply)

How to install the Pihole MCP Server

{
  "mcpServers": {
    "pihole": {
      "command": "pihole-mcp",
      "env": {
        "PIHOLE_URL": "http://192.168.1.2",
        "PIHOLE_PASSWORD": "YOUR_PIHOLE_PASSWORD"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
PIHOLE_URLDeclared in the maintainer’s client configuration.Check documentation
PIHOLE_PASSWORDDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use Pihole MCP to Homebrew.”
  • “Use Pihole MCP to Dashboard.”
  • “Use Pihole MCP to Statistics.”

Frequently asked questions

Gives AI assistants full control over your Pi-hole instance — DNS blocking, domain management, query analysis, statistics, network devices, DHCP, and system Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.