Pi-hole MCP Server
io.github.ranklancer/pihole-mcp·v0.2.0·2 starsMCP server for Pi-hole v6 API — manage multiple instances: queries, lists, groups, stats
2 stars31 downloads/wk
Reviews
Write oneNobody has reviewed Pi-hole MCP Server yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Pi-hole MCP Server tools
No tool declarations could be read from the package source. They show once the server is installed.
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan19 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 3 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Pi-hole MCP Server compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 83/100
- higher than 65% of 48,255 servers
- GitHub stars
- 2
- more than 75% of 28,688 servers
- Downloads a week
- 31
- more than 19% of 12,191 servers with a package
Install Pi-hole MCP Server in Claude Code, Cursor or VS Code
Runs npx -y @ranklancer/pihole-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add pihole-mcp -- npx -y @ranklancer/pihole-mcp
What the publisher says
From the Pi-hole MCP Server repository's README, as published. We do not edit it. Read it on GitHub
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.
Perfect for homelabbers running multiple Pi-holes (primary + secondary, or per-VLAN), network admins managing DNS filtering at scale, and anyone who wants AI-assisted DNS management.
Features
- Multi-instance support - configure 1 to N Pi-hole instances via environment variables
- Full Pi-hole v6 API coverage - query logs, allow/deny lists (full CRUD), group management, blocking control, local DNS (A + CNAME) records, gravity reload, stats
- Smart regex detection - automatically routes domains to exact or regex lists based on metacharacter analysis
- Regex landmine detector - finds deny-exact entries that look like they should be regex (miscategorized rules)
- Docker-ready - multi-stage Dockerfile with non-root user, health checks, and security hardening
- Streamable HTTP transport - works with any MCP client that supports HTTP-based MCP
- Docker secrets support - passwords via env vars or /run/secrets/ files
Quick Start
Docker (recommended)
git clone https://github.com/ranklancer/pihole-mcp.git
cd pihole-mcp
cp .env.example .env
# Edit .env with your Pi-hole URL(s) and password(s)
mkdir -p secrets
echo "your-pihole-password" > secrets/pihole_password
chmod 600 secrets/pihole_password
cp docker-compose.example.yml docker-compose.yml
docker compose up -dNode.js
npm install
npm run build
export PIHOLE_INSTANCES=pihole
export PIHOLE_BASE_URL=http://pihole.example.com
export PIHOLE_PASSWORD=your-password
npm startConfiguration
All configuration is via environment variables. See .env.example for the full reference.
Single Instance
PIHOLE_INSTANCES=pihole
PIHOLE_BASE_URL=http://192.0.2.100
PIHOLE_PASSWORD=your-passwordMultiple Instances
PIHOLE_INSTANCES=primary,secondary
PRIMARY_BASE_URL=http://192.0.2.100
PRIMARY_PASSWORD=password1
SECONDARY_BASE_URL=https://198.51.100.101
SECONDARY_PASSWORD=password2
SECONDARY_INSECURE_TLS=trueFor each instance name in PIHOLE_INSTANCES, provide:
Docker secrets are supported as a fallback: /run/secrets/_password (lowercase).
Available MCP Tools
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Pi-hole MCP Server: common questions
- Is Pi-hole MCP Server safe?
- Mostly: it is graded B (83/100). Read the Pi-hole MCP Server safety report
- How do I install Pi-hole MCP Server?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Pi-hole MCP Server need an API key?
- Yes. The registry entry asks for
PIHOLE_PASSWORD. - Is Pi-hole MCP Server maintained?
- The last commit was 40 days ago (2026-09-25). The latest release is v0.2.0.
- How does Pi-hole MCP Server compare with other MCP servers?
- safety score 83/100 (higher than 65% of 48,255 servers); github stars 2 (more than 75% of 28,688 servers); downloads a week 31 (more than 19% of 12,191 servers with a package). Full comparison.