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 MCP server?

Pihole MCP MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. 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.

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

What the assistant can call

Once Pihole MCP is connected, these are the calls the assistant has available:

  • Homebrew — Installs on both macOS and Linux (Homebrew on Linux). On macOS the cask clears the quarantine attribute during install, so the binary runs without a
  • Dashboard — The Dashboard tool exposed by this server
  • Statistics — The Statistics tool exposed by this server
  • System — The System tool exposed by this server
  • Transport — By default, pihole-mcp uses stdio (standard for MCP). HTTP and SSE transports are also available:
  • OpenTelemetry — All tool calls are automatically traced with tool name, duration, and error status

Configuration and credentials

You will need 8 environment variables: PIHOLE_URL, PIHOLE_PASSWORD, PIHOLE_1_URL, PIHOLE_1_PASSWORD, PIHOLE_1_NAME, PIHOLE_2_URL, PIHOLE_2_PASSWORD, PIHOLE_2_NAME. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the pihole mcp mcp server does with a few real requests.

Choosing this one

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Pihole MCP's toolset — Homebrew, Dashboard, Statistics and 3 more — is a fair guide to whether it matches your workflow. It is maintained by lloydmcl; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Pihole MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
HomebrewInstalls on both macOS and Linux (Homebrew on Linux). On macOS the cask clears the quarantine attribute during install, so the binary runs without a Gatekeeper prompt.
DashboardThe Dashboard tool exposed by this server.
StatisticsThe Statistics tool exposed by this server.
SystemThe System tool exposed by this server.
TransportBy default, pihole-mcp uses stdio (standard for MCP). HTTP and SSE transports are also available:
OpenTelemetryAll tool calls are automatically traced with tool name, duration, and error status.

How to install the Pihole MCP MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
PIHOLE_URLEndpoint or connection string the server talks to.Yes
PIHOLE_PASSWORDConfiguration value read at startup.Optional
PIHOLE_1_URLEndpoint or connection string the server talks to.Yes
PIHOLE_1_PASSWORDConfiguration value read at startup.Optional
PIHOLE_1_NAMEConfiguration value read at startup.Optional
PIHOLE_2_URLEndpoint or connection string the server talks to.Yes
PIHOLE_2_PASSWORDConfiguration value read at startup.Optional
PIHOLE_2_NAMEConfiguration value read at startup.Optional

Example prompts to try

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

Frequently asked questions

It connects Pihole MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (Homebrew, Dashboard, Statistics, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Pihole MCP directly.