Pihole MCP server
Pi-hole v6 MCP server - manage DNS blocking, stats, whitelists/blacklists
8 stars
Reviews
Write oneNobody has reviewed Pihole yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Pihole tools (16, 3 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
pihole_add_to_blacklistAdd a domain to the Pi-hole blacklist (block list)
pihole_add_to_whitelistAdd a domain to the Pi-hole whitelist (allow list)
pihole_disable_blockingDisable Pi-hole DNS blocking, optionally for a specific duration
pihole_enable_blockingEnable Pi-hole DNS blocking
pihole_flush_cacheFlush Pi-hole's DNS cache
pihole_get_blacklistGet all domains on the Pi-hole blacklist
pihole_get_blocking_statusCheck if Pi-hole blocking is currently enabled or disabled
pihole_get_query_logGet recent DNS queries from the query log
pihole_get_statsGet Pi-hole statistics including total queries, blocked queries, blocking percentage, active clients, and domains being blocked
pihole_get_top_blockedGet the top blocked domains
pihole_get_top_clientsGet the top clients by query count
pihole_get_top_permittedGet the top permitted (allowed) domains
pihole_get_whitelistGet all domains on the Pi-hole whitelist
pihole_remove_from_blacklistwrite actionRemove a domain from the Pi-hole blacklist
pihole_remove_from_whitelistwrite actionRemove a domain from the Pi-hole whitelist
pihole_update_gravitywrite actionUpdate Pi-hole's gravity (refresh blocklists). This may take a minute to complete.
Public scan report
scanner v0.1.10 · 2026-10-01 · same rubric, same numbers if you re-run it
- Code scan5 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 50 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Pihole compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 78/100
- higher than 57% of 48,255 servers
- Tools
- 16
- the typical server has 7
- Tools that change things
- 19%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 8
- more than 86% of 28,688 servers
What its tools let an agent do: 13 read · 3 change
Install Pihole in Claude Code, Cursor or VS Code
Runs npx -y mcp-pihole-server on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add mcp-pihole -- npx -y mcp-pihole-server
What the publisher says
From the Pihole repository's README, as published. We do not edit it. Read it on GitHub
MCP Pi-hole Server
An MCP (Model Context Protocol) server that connects AI assistants like Claude to your Pi-hole network-wide ad blocker. Manage DNS blocking, view statistics, control whitelists/blacklists, and more through natural language.
Why Use This?
If you're running Pi-hole on your network, this MCP server lets you:
- Monitor DNS traffic - View query statistics, top blocked domains, and client activity
- Control blocking - Enable/disable Pi-hole blocking instantly or with a timer
- Manage lists - Add or remove domains from whitelist and blacklist without opening the web UI
- View query logs - See recent DNS queries with detailed information
- Maintain your Pi-hole - Update gravity (blocklists) and flush DNS cache
Features
Prerequisites
- Node.js 18+
- Pi-hole v6 with API enabled
- Pi-hole app password (generated in Pi-hole settings)
- Network access to Pi-hole from your machine
Installation
Option 1: Install from npm (recommended)
npx mcp-pihole-serverOr install globally:
npm install -g mcp-pihole-serverOption 2: Clone and Build
git clone https://github.com/aplaceforallmystuff/mcp-pihole.git
cd mcp-pihole
npm install
npm run buildConfiguration
1. Get Your Pi-hole App Password
- Open your Pi-hole web interface
- Go to Settings > API
- Generate a new app password
- Copy the password (it's only shown once)
2. Configure Your MCP Client
For Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claudedesktopconfig.json Windows: %APPDATA%\Claude\claudedesktopconfig.json
{
"mcpServers": {
"pihole": {
"command": "npx",
"args": ["-y", "mcp-pihole-server"],
"env": {
"PIHOLE_URL": "http://your-pihole-address:8080",
"PIHOLE_PASSWORD": "your-app-password"
}
}
}
}For Claude Code
Add to ~/.claude.json:
{
"mcpServers": {
"pihole": {
"command": "npx",
"args": ["-y", "mcp-pihole-server"],
"env": {
"PIHOLE_URL": "http://your-pihole-address:8080",
"PIHOLE_PASSWORD": "your-app-password"
}
}
}
}Environment Variables
Usage Examples
Once configured, you can interact with Pi-hole through natural language:
View Statistics
"Show me Pi-hole stats"
"What are the top blocked domains?"
"Which clients are making the most queries?"
Control Blocking
"Is Pi-hole blocking enabled?"
"Disable Pi-hole for 5 minutes"
"Re-enable Pi-hole blocking"
Manage Domain Lists
"Add example.com to the whitelist"
"Block ads.trackersite.com"
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Pihole: common questions
- Is Pihole MCP server safe?
- Mostly: it is graded B (78/100). Read the Pihole safety report
- How do I install Pihole?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Pihole need an API key?
- Yes. The registry entry asks for
PIHOLE_PASSWORD. - Is Pihole maintained?
- The last commit was 84 days ago (2026-08-12). The latest release is v1.0.1.
- How does Pihole compare with other MCP servers?
- safety score 78/100 (higher than 57% of 48,255 servers); tools 16 (the typical server has 7); tools that change things 19% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.