Server data from the Official MCP Registry
MCP server for Pi-hole v6 API — manage multiple instances: queries, lists, groups, stats
MCP server for Pi-hole v6 API — manage multiple instances: queries, lists, groups, stats
Valid MCP server (2 strong, 3 medium validity signals). 7 known CVEs in dependencies (0 critical, 5 high severity) Package registry verified. Imported from the Official MCP Registry.
8 files analyzed · 8 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: PIHOLE_INSTANCES
Environment variable: PIHOLE_BASE_URL
Environment variable: PIHOLE_PASSWORD
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-ranklancer-pihole-mcp": {
"env": {
"PIHOLE_BASE_URL": "your-pihole-base-url-here",
"PIHOLE_PASSWORD": "your-pihole-password-here",
"PIHOLE_INSTANCES": "your-pihole-instances-here"
},
"args": [
"-y",
"@ranklancer/pihole-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
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.
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.
/run/secrets/ filesgit 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 -d
npm install
npm run build
export PIHOLE_INSTANCES=pihole
export PIHOLE_BASE_URL=http://pihole.example.com
export PIHOLE_PASSWORD=your-password
npm start
All configuration is via environment variables. See .env.example for the full reference.
PIHOLE_INSTANCES=pihole
PIHOLE_BASE_URL=http://192.0.2.100
PIHOLE_PASSWORD=your-password
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=true
For each instance name in PIHOLE_INSTANCES, provide:
| Variable | Required | Description |
|---|---|---|
<NAME>_BASE_URL | Yes | Pi-hole base URL (e.g. http://pihole.local) |
<NAME>_PASSWORD | Yes | Pi-hole API password (or use Docker secrets) |
<NAME>_INSECURE_TLS | No | Set true for self-signed certs (default: false) |
Docker secrets are supported as a fallback: /run/secrets/<name>_password (lowercase).
| Tool | Description |
|---|---|
pihole_query_log | Fetch query log with filters (limit, time range, client, domain, status) |
pihole_allow_domain | Add to allowlist (auto-detects exact vs regex) |
pihole_deny_domain | Add to denylist (auto-detects exact vs regex) |
pihole_list_allowlist | List all allowlist entries (exact + regex merged) |
pihole_list_denylist | List all denylist entries (exact + regex merged) |
pihole_stats_summary | Get Pi-hole statistics summary |
pihole_reload_lists | Trigger gravity reload |
pihole_group_management | CRUD operations on Pi-hole groups |
pihole_check_regex_types | Detect miscategorized regex in deny-exact list |
Every tool accepts an optional instance parameter to target a specific Pi-hole. Defaults to the first configured instance.
The server listens on http://HOST:PORT/mcp (default: http://localhost:3000/mcp).
Add to your MCP settings:
{
"mcpServers": {
"pihole": {
"url": "http://localhost:3031/mcp"
}
}
}
If your MCP client only supports stdio transport, use supergateway:
npx -y supergateway --streamableHttp http://localhost:3031/mcp
curl http://localhost:3031/health
# {"ok":true,"service":"pihole-mcp","version":"0.2.0"}
npm install
npm run dev # Watch mode — recompiles on save
npm start # Run the server
MIT
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.