pihole-mcp
pihole-mcp
통합 Pi-hole v6 MCP 서버입니다. 세 개의 업스트림 MCP(aplaceforallmystuff/mcp-pihole, sbarbett/pihole-mcp-server, cwdcwd/mcp-server-pihole)의 유용한 도구들을 chris2ao-unifi-mcp 스택(FastMCP + httpx + Pydantic v2)과 일치하는 하나의 Python 서버로 통합했습니다.
도구 (28)
통계 (8): get_stats, get_top_blocked, get_top_permitted, get_top_clients, get_query_types, get_forward_destinations, get_recent_blocked, get_history
쿼리 (2): get_query_log (풍부한 필터: 시간 범위, 도메인, 클라이언트, 업스트림, 커서), get_query_suggestions
차단 (3): get_blocking_status, enable_blocking, disable_blocking (타이머 옵션 포함)
도메인 목록 (6): get_whitelist, get_blacklist, add_to_whitelist, add_to_blacklist, remove_from_whitelist, remove_from_blacklist
로컬 DNS (5): list_local_dns, add_local_a_record, remove_local_a_record, add_local_cname_record, remove_local_cname_record
유지 관리 (4): update_gravity, flush_cache, flush_logs, get_tail_log
및 server_info.
도구별 엔드포인트 매핑은 docs/plans/consolidated-tool-map.md를 참조하세요.
Related MCP server: Pi-hole MCP Server
인증
Pi-hole v6는 세션 기반 인증을 사용합니다. 이 서버는 이를 자동으로 처리합니다:
{"password": "<app-password>"}를 포함한POST /api/auth요청은 세션 SID를 반환합니다.이후의 모든 호출에는
X-FTL-SID: <sid>가 포함됩니다.401 오류가 발생하거나 세션이 만료될 경우, 클라이언트는 재인증을 수행하고 한 번 재시도합니다.
종료 시
DELETE /api/auth를 통해 세션을 해제합니다.
앱 비밀번호는 Pi-hole 웹 UI에서 생성합니다: 설정 > 웹 인터페이스 > "애플리케이션 비밀번호" > 생성. 이는 메인 관리자 웹 비밀번호와는 별개이며 API 클라이언트를 위한 올바른 자격 증명입니다.
설치
cd /Users/chris2ao/GitProjects/chris2ao-pihole-mcp
uv sync
cp .env.example .env # fill in PIHOLE_URL and PIHOLE_PASSWORD
uv run pytest또는 래퍼를 통한 설치 (Claude Code와 함께 프로덕션 환경에서 사용):
~/.claude/scripts/pihole-wrapper.shClaude Code에 등록
~/.claude.json의 mcpServers에 다음을 추가하세요:
"pihole": {
"command": "/Users/chris2ao/.claude/scripts/pihole-wrapper.sh",
"args": []
}래퍼는 PIHOLE_URL 및 PIHOLE_PASSWORD를 위해 ~/.claude/secrets/secrets.env를 소싱한 후 uv run을 호출합니다.
개발
테스트 실행:
uv run pytest커버리지:
uv run pytest --cov --cov-report=termPython: 3.12+
chris2ao-unifi-mcp와의 관계
동일한 스택(FastMCP, httpx, Pydantic-settings, hatchling, uv)을 사용합니다. Pi-hole은 단일 제품(동적 제품 로딩이나 검색 없음)이므로 unifi-mcp보다 단순합니다. 다중 Pi-hole 환경이나 추가 기능(adlist/gravity CRUD, 그룹, DHCP, Teleporter)을 위해 확장하려면 unifi-mcp의 기능별 모듈 패턴을 따르세요.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for managing Cloudron instances that enables monitoring and controlling self-hosted applications, backups, and infrastructure. It provides tools for listing installed apps, retrieving system status, and performing administrative tasks through the Model Context Protocol.19121MIT
- Flicense-qualityDmaintenanceEnables control of Pi-hole v6 ad blocking, allowing users to toggle DNS blocking status and retrieve real-time statistics like query counts and blocked domains. It provides a structured interface for monitoring and managing network-level ad filtering through the Pi-hole REST API.
- AlicenseBqualityDmaintenanceAn MCP server for managing and operating Minecraft servers through multiple backend protocols including MCSManager API, RCON, and MSMP. It provides tools for instance lifecycle management, file operations, console commands, player administration, and server configuration with built-in security controls.712MIT
- AlicenseBqualityDmaintenanceA local MCP server for managing WHM and cPanel servers through AI clients, supporting server health, account, DNS, email, database, SSL, bandwidth, disk, cron, and service-management tools across multiple WHM accounts.31MIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for Blockscout
MCP server for Google Veo AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chris2ao/pihole-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server