P

Pihole MCP

by hexamatic · io.github.hexamatic/pihole-mcp

Enables AI assistants to control Pi-hole DNS filtering, including domain management, query analysis, and system administration, with support for multiple Pi-hole instances and synchronization.

oci Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-hexamatic-pihole-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "PIHOLE_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_PASSWORD=<YOUR_VALUE>",
        "-e",
        "TZ=<YOUR_VALUE>",
        "-e",
        "PIHOLE_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TLS_SKIP_VERIFY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_REQUEST_TIMEOUT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_MAX_RETRIES=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RETRY_MAX_DELAY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TOOLSETS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_BACKUP_DIR=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RATE_LIMIT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_ALLOWED_ORIGINS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TRUSTED_PROXIES=<YOUR_VALUE>",
        "-e",
        "OTEL_EXPORTER_OTLP_ENDPOINT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN_FILE=<YOUR_VALUE>",
        "ghcr.io/hexamatic/pihole-mcp:0.10.0"
      ]
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-hexamatic-pihole-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "PIHOLE_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_PASSWORD=<YOUR_VALUE>",
        "-e",
        "TZ=<YOUR_VALUE>",
        "-e",
        "PIHOLE_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TLS_SKIP_VERIFY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_REQUEST_TIMEOUT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_MAX_RETRIES=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RETRY_MAX_DELAY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TOOLSETS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_BACKUP_DIR=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RATE_LIMIT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_ALLOWED_ORIGINS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TRUSTED_PROXIES=<YOUR_VALUE>",
        "-e",
        "OTEL_EXPORTER_OTLP_ENDPOINT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN_FILE=<YOUR_VALUE>",
        "ghcr.io/hexamatic/pihole-mcp:0.10.0"
      ]
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-hexamatic-pihole-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "PIHOLE_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_PASSWORD=<YOUR_VALUE>",
        "-e",
        "TZ=<YOUR_VALUE>",
        "-e",
        "PIHOLE_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TLS_SKIP_VERIFY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_REQUEST_TIMEOUT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_MAX_RETRIES=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RETRY_MAX_DELAY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TOOLSETS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_BACKUP_DIR=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RATE_LIMIT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_ALLOWED_ORIGINS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TRUSTED_PROXIES=<YOUR_VALUE>",
        "-e",
        "OTEL_EXPORTER_OTLP_ENDPOINT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN_FILE=<YOUR_VALUE>",
        "ghcr.io/hexamatic/pihole-mcp:0.10.0"
      ]
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-hexamatic-pihole-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "PIHOLE_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_PASSWORD=<YOUR_VALUE>",
        "-e",
        "TZ=<YOUR_VALUE>",
        "-e",
        "PIHOLE_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TLS_SKIP_VERIFY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_REQUEST_TIMEOUT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_MAX_RETRIES=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RETRY_MAX_DELAY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TOOLSETS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_BACKUP_DIR=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RATE_LIMIT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_ALLOWED_ORIGINS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TRUSTED_PROXIES=<YOUR_VALUE>",
        "-e",
        "OTEL_EXPORTER_OTLP_ENDPOINT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN_FILE=<YOUR_VALUE>",
        "ghcr.io/hexamatic/pihole-mcp:0.10.0"
      ]
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-hexamatic-pihole-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "PIHOLE_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_PASSWORD=<YOUR_VALUE>",
        "-e",
        "TZ=<YOUR_VALUE>",
        "-e",
        "PIHOLE_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TLS_SKIP_VERIFY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_REQUEST_TIMEOUT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_MAX_RETRIES=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RETRY_MAX_DELAY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TOOLSETS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_BACKUP_DIR=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RATE_LIMIT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_ALLOWED_ORIGINS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TRUSTED_PROXIES=<YOUR_VALUE>",
        "-e",
        "OTEL_EXPORTER_OTLP_ENDPOINT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN_FILE=<YOUR_VALUE>",
        "ghcr.io/hexamatic/pihole-mcp:0.10.0"
      ]
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-hexamatic-pihole-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "PIHOLE_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_PASSWORD=<YOUR_VALUE>",
        "-e",
        "TZ=<YOUR_VALUE>",
        "-e",
        "PIHOLE_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TLS_SKIP_VERIFY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_REQUEST_TIMEOUT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_MAX_RETRIES=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RETRY_MAX_DELAY=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_URL=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_NAME=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TOOLSETS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_1_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_2_PASSWORD=<YOUR_VALUE>",
        "-e",
        "PIHOLE_BACKUP_DIR=<YOUR_VALUE>",
        "-e",
        "PIHOLE_RATE_LIMIT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_ALLOWED_ORIGINS=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN=<YOUR_VALUE>",
        "-e",
        "PIHOLE_TRUSTED_PROXIES=<YOUR_VALUE>",
        "-e",
        "OTEL_EXPORTER_OTLP_ENDPOINT=<YOUR_VALUE>",
        "-e",
        "PIHOLE_HTTP_AUTH_TOKEN_FILE=<YOUR_VALUE>",
        "ghcr.io/hexamatic/pihole-mcp:0.10.0"
      ]
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
PIHOLE_URL Yes Pi-hole base URL (e.g. `http://192.168.1.2`). Mutually exclusive with `PIHOLE_1_URL`.
PIHOLE_PASSWORD secret Yes Admin password or application password.
TZ No IANA timezone for rendered timestamps (e.g. `Australia/Adelaide`). Default is the system timezone (UTC in Docker).
PIHOLE_READ_ONLY No Expose only tools that cannot change Pi-hole. Read-only always wins when combined with PIHOLE_TOOLSETS. Default: false
PIHOLE_TLS_SKIP_VERIFY No Disable TLS certificate verification for Pi-hole connections. Only for instances serving self-signed certificates. Default: false
PIHOLE_REQUEST_TIMEOUT No HTTP request timeout. Default: 30s
PIHOLE_MAX_RETRIES No Retries after a failed Pi-hole API call. `0` disables. Default: 3
PIHOLE_RETRY_MAX_DELAY No Upper bound on a single backoff wait. Default: 8s
PIHOLE_1_URL No Base URL of instance 1 in a multiple-instance configuration. Mutually exclusive with `PIHOLE_URL`.
PIHOLE_2_URL No Base URL of instance 2 in a multiple-instance configuration.
PIHOLE_1_NAME No Friendly name for instance 1 (default `instance-1`).
PIHOLE_2_NAME No Friendly name for instance 2 (default `instance-2`).
PIHOLE_TOOLSETS No Comma-separated toolset names to expose, e.g. `dashboard,domains`. Unset or `all` exposes everything. An unknown name fails at startup.
PIHOLE_1_PASSWORD No Password for instance 1.
PIHOLE_2_PASSWORD No Password for instance 2.
PIHOLE_BACKUP_DIR No Absolute path of an existing directory to keep teleporter backups in. When set, exports write only inside it and imports read only from it.
PIHOLE_RATE_LIMIT No Requests per minute per MCP session on the HTTP/SSE transports, under a per-address ceiling of four times that. `0` disables. Default: 120
PIHOLE_ALLOWED_ORIGINS No Comma-separated Origin/Host allowlist for HTTP/SSE transports. The literal `*` disables enforcement (unsafe). Not authentication. Default: localhost,127.0.0.1,[::1]
PIHOLE_HTTP_AUTH_TOKEN No Shared bearer token required on every HTTP/SSE request. Minimum 16 characters. Mutually exclusive with `PIHOLE_HTTP_AUTH_TOKEN_FILE`.
PIHOLE_TRUSTED_PROXIES No Comma-separated IPs or CIDR blocks whose `X-Forwarded-For` the rate limiter believes. Unset means the header is ignored.
OTEL_EXPORTER_OTLP_ENDPOINT No OpenTelemetry collector endpoint. Setting it enables tracing; ignored in slim builds.
PIHOLE_HTTP_AUTH_TOKEN_FILE No Path to a file holding the bearer token, so it stays out of `ps`. Mutually exclusive with `PIHOLE_HTTP_AUTH_TOKEN`.

Similar servers