Server data from the Official MCP Registry
Pi-hole v6 MCP server - manage DNS blocking, stats, whitelists/blacklists
Pi-hole v6 MCP server - manage DNS blocking, stats, whitelists/blacklists
Valid MCP server (2 strong, 4 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (5/5 approved).
5 files analyzed · 1 issue 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_URL
Environment variable: PIHOLE_PASSWORD
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-aplaceforallmystuff-mcp-pihole": {
"env": {
"PIHOLE_URL": "your-pihole-url-here",
"PIHOLE_PASSWORD": "your-pihole-password-here"
},
"args": [
"-y",
"mcp-pihole-server"
],
"command": "npx"
}
}
}From the project's GitHub README.

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.
If you're running Pi-hole on your network, this MCP server lets you:
| Category | Tools |
|---|---|
| Statistics | Query totals, blocking percentage, top domains, top clients |
| Blocking Control | Enable, disable (with optional timer), check status |
| Domain Lists | Whitelist/blacklist CRUD operations |
| Query Log | Recent DNS queries with client, status, response time |
| Maintenance | Update gravity, flush cache |
| Visualizations | ASCII art dashboards and bar charts with ANSI colors |
npx mcp-pihole-server
Or install globally:
npm install -g mcp-pihole-server
git clone https://github.com/aplaceforallmystuff/mcp-pihole.git
cd mcp-pihole
npm install
npm run build
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pihole": {
"command": "npx",
"args": ["-y", "mcp-pihole-server"],
"env": {
"PIHOLE_URL": "http://your-pihole-address:8080",
"PIHOLE_PASSWORD": "your-app-password"
}
}
}
}
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"
}
}
}
}
| Variable | Description | Example |
|---|---|---|
PIHOLE_URL | Pi-hole web interface URL | http://pihole.local:8080 |
PIHOLE_PASSWORD | Pi-hole app password | Your app password from settings |
Once configured, you can interact with Pi-hole through natural language:
"Show me Pi-hole stats"
"What are the top blocked domains?"
"Which clients are making the most queries?"
"Is Pi-hole blocking enabled?"
"Disable Pi-hole for 5 minutes"
"Re-enable Pi-hole blocking"
"Add example.com to the whitelist"
"Block ads.trackersite.com"
"Show me all whitelisted domains"
"Show me the last 50 DNS queries"
"What domains has my phone been querying?"
"Show me Pi-hole stats with visualize: true"
"Get top blocked domains with visualization"
pihole_get_stats - Get comprehensive Pi-hole statisticspihole_get_top_blocked - Get top blocked domainspihole_get_top_permitted - Get top permitted domainspihole_get_top_clients - Get top clients by query countpihole_get_query_log - Get recent DNS queriespihole_get_blocking_status - Check if blocking is enabledpihole_enable_blocking - Enable DNS blockingpihole_disable_blocking - Disable blocking (optionally with timer)pihole_get_whitelist - List all whitelisted domainspihole_get_blacklist - List all blacklisted domainspihole_add_to_whitelist - Add domain to whitelistpihole_add_to_blacklist - Add domain to blacklistpihole_remove_from_whitelist - Remove domain from whitelistpihole_remove_from_blacklist - Remove domain from blacklistpihole_update_gravity - Update blocklists (gravity)pihole_flush_cache - Flush DNS cacheThis server supports colorful ASCII art visualizations rendered directly in your terminal using ANSI escape codes.
The following tools support the optional visualize: true parameter:
| Tool | Visualization |
|---|---|
pihole_get_stats | Full dashboard with summary stats, top clients, blocked domains, and permitted domains |
pihole_get_top_blocked | Red bar chart of blocked domains |
pihole_get_top_permitted | Green bar chart of permitted domains |
pihole_get_top_clients | Blue bar chart of client activity |
Pass visualize: true to any supported tool:
{
"name": "pihole_get_stats",
"arguments": {
"visualize": true
}
}
When visualize is not set or false, tools return JSON data as usual.
╔════════════════════════════════════════════════════════════════════════════╗
║ 🛡️ PI-HOLE DASHBOARD ║
╠════════════════════════════════════════════════════════════════════════════╣
║ ║
║ 📊 SUMMARY ║
║ ────────────────────────────────────────────────────────────────────────── ║
║ Total Queries: 73K Domains Blocked: 2.4M ║
║ Blocked: 22K Active Clients: 28 ║
║ Block Rate: 29.7% Total Clients: 115 ║
╠════════════════════════════════════════════════════════════════════════════╣
║ 🔝 TOP CLIENTS ║
║ ────────────────────────────────────────────────────────────────────────── ║
║ 192.168.1.52 ████████████████████████████████████████ 28K (38%) ║
║ 192.168.1.51 ███████████████████▋ 14K (19%) ║
╚════════════════════════════════════════════════════════════════════════════╝
(Colors appear in terminals that support ANSI escape codes)
# Run in development mode (auto-reloads)
npm run watch
# Build for production
npm run build
# Run the built version
node dist/index.js
Ensure both environment variables are set in your MCP config.
Your app password is invalid or expired. Generate a new one from Pi-hole Settings > API.
Session expired. The server will automatically re-authenticate, but if issues persist, check your password.
Ensure Pi-hole is running and the URL is correct. Check that you can access the Pi-hole web interface from your machine.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.
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.