mcp-pihole

mcp-pihole

MCP server for Pi-hole v6 that enables management of blocklists, DNS blocking, domain allow/deny lists, and query diagnostics through natural language.

Category
Visit Server

README

mcp-pihole

MCP server for Pi-hole v6. Manage blocklists, DNS blocking, domain allow/deny lists, and query diagnostics through the Model Context Protocol.

Prerequisites

  • Python 3.14+
  • uv
  • Pi-hole v6+ with the REST API enabled

Setup

uv sync

Configuration

Environment Variables

Variable Required Description
PIHOLE_URL Yes Base URL of your Pi-hole instance (e.g., http://192.168.0.160:8080)
PIHOLE_PASSWORD No Web interface password. Omit or leave empty for passwordless instances.

Claude Code

claude mcp add pihole \
  -e PIHOLE_URL=http://192.168.0.160:8080 \
  -e PIHOLE_PASSWORD=yourpassword \
  -- uvx mcp-pihole

Or add to .claude/settings.json:

{
  "mcpServers": {
    "pihole": {
      "command": "uvx",
      "args": ["mcp-pihole"],
      "env": {
        "PIHOLE_URL": "http://192.168.0.160:8080",
        "PIHOLE_PASSWORD": "yourpassword"
      }
    }
  }
}

Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "pihole": {
      "command": "uvx",
      "args": ["mcp-pihole"],
      "env": {
        "PIHOLE_URL": "http://192.168.0.160:8080",
        "PIHOLE_PASSWORD": "yourpassword"
      }
    }
  }
}

Tools

Diagnostics

Tool Description
get_status Pi-hole status summary (queries, blocked count, blocking state)
get_top_domains Top queried or blocked domains
get_top_clients Top DNS clients by query count
get_queries Recent DNS query log with cursor-based pagination
get_version Pi-hole FTL version information

Blocklist Management

Tool Description
get_lists List all configured blocklists
add_list Add a blocklist URL
remove_list Remove a blocklist by URL
update_list Enable/disable a blocklist or update its comment
update_gravity Rebuild gravity database (required after blocklist changes)

Domain Management

Tool Description
get_domains List allow/deny domains (exact or regex)
add_domain Add a domain to allow or deny list
remove_domain Remove a domain from allow or deny list
search_domains Check if a domain is blocked and by which list

DNS Control and DHCP

Tool Description
get_blocking_status Current DNS blocking status and timer
set_blocking Enable/disable blocking, optionally with a timer
get_dhcp_leases Current DHCP leases
restart_dns Restart the DNS resolver

Development

uv sync
uv run pytest tests/ -x -q
uv run ruff check src/ tests/
uv run pyright src/

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured