MCP.Market

Pihole MCP server

by aplaceforallmystuff·io.github.aplaceforallmystuff/mcp-pihole·v1.0.1·8 stars

Pi-hole v6 MCP server - manage DNS blocking, stats, whitelists/blacklists

B78/100grade B
What users say
No reviews yet
Be the first
Safety scan
B78/100

full report

Adoption
New

8 stars

Reviews

Write one

Nobody 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 posts

Read from the package source without running it. The installed server may list more.

  • pihole_add_to_blacklist

    Add a domain to the Pi-hole blacklist (block list)

  • pihole_add_to_whitelist

    Add a domain to the Pi-hole whitelist (allow list)

  • pihole_disable_blocking

    Disable Pi-hole DNS blocking, optionally for a specific duration

  • pihole_enable_blocking

    Enable Pi-hole DNS blocking

  • pihole_flush_cache

    Flush Pi-hole's DNS cache

  • pihole_get_blacklist

    Get all domains on the Pi-hole blacklist

  • pihole_get_blocking_status

    Check if Pi-hole blocking is currently enabled or disabled

  • pihole_get_query_log

    Get recent DNS queries from the query log

  • pihole_get_stats

    Get Pi-hole statistics including total queries, blocked queries, blocking percentage, active clients, and domains being blocked

  • pihole_get_top_blocked

    Get the top blocked domains

  • pihole_get_top_clients

    Get the top clients by query count

  • pihole_get_top_permitted

    Get the top permitted (allowed) domains

  • pihole_get_whitelist

    Get all domains on the Pi-hole whitelist

  • pihole_remove_from_blacklistwrite action

    Remove a domain from the Pi-hole blacklist

  • pihole_remove_from_whitelistwrite action

    Remove a domain from the Pi-hole whitelist

  • pihole_update_gravitywrite action

    Update 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

no findings
  • 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
Overall 78/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

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
Add to Cursor

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-server

Or install globally:

npm install -g mcp-pihole-server

Option 2: Clone and Build

git clone https://github.com/aplaceforallmystuff/mcp-pihole.git
cd mcp-pihole
npm install
npm run build

Configuration

1. Get Your Pi-hole App Password

  1. Open your Pi-hole web interface
  2. Go to Settings > API
  3. Generate a new app password
  4. 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.

More from aplaceforallmystuff →