Skip to content
MCP server

Pi-hole MCP Server

MCP server for Pi-hole v6 API — manage multiple instances: queries, lists, groups, stats

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.2.0
Listing updated
5 days ago

About Pi-hole MCP Server

Pi-hole MCP Server is an open-source MCP server. It runs locally on your machine and is started by your AI client.

Install

Run in a terminal

claude mcp add pihole-mcp --env PIHOLE_INSTANCES='<PIHOLE_INSTANCES>' --env PIHOLE_BASE_URL='<PIHOLE_BASE_URL>' --env PIHOLE_PASSWORD='<PIHOLE_PASSWORD>' -- npx -y @ranklancer/pihole-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "pihole-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ranklancer/pihole-mcp"
      ],
      "env": {
        "PIHOLE_INSTANCES": "<PIHOLE_INSTANCES>",
        "PIHOLE_BASE_URL": "<PIHOLE_BASE_URL>",
        "PIHOLE_PASSWORD": "<PIHOLE_PASSWORD>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "pihole-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ranklancer/pihole-mcp"
      ],
      "env": {
        "PIHOLE_INSTANCES": "<PIHOLE_INSTANCES>",
        "PIHOLE_BASE_URL": "<PIHOLE_BASE_URL>",
        "PIHOLE_PASSWORD": "<PIHOLE_PASSWORD>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "pihole-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@ranklancer/pihole-mcp"
      ],
      "env": {
        "PIHOLE_INSTANCES": "<PIHOLE_INSTANCES>",
        "PIHOLE_BASE_URL": "<PIHOLE_BASE_URL>",
        "PIHOLE_PASSWORD": "<PIHOLE_PASSWORD>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "pihole-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ranklancer/pihole-mcp"
      ],
      "env": {
        "PIHOLE_INSTANCES": "<PIHOLE_INSTANCES>",
        "PIHOLE_BASE_URL": "<PIHOLE_BASE_URL>",
        "PIHOLE_PASSWORD": "<PIHOLE_PASSWORD>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "pihole-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ranklancer/pihole-mcp"
      ],
      "env": {
        "PIHOLE_INSTANCES": "<PIHOLE_INSTANCES>",
        "PIHOLE_BASE_URL": "<PIHOLE_BASE_URL>",
        "PIHOLE_PASSWORD": "<PIHOLE_PASSWORD>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • PIHOLE_INSTANCESComma-separated list of Pi-hole instance names (e.g. 'pihole' or 'primary,secondary')Required
  • PIHOLE_BASE_URLBase URL of your first Pi-hole instance (e.g. 'http://192.168.1.100')Required
  • PIHOLE_PASSWORDAPI password for your first Pi-hole instanceRequired

Pricing

Open source

Pi-hole MCP Server FAQ

Is Pi-hole MCP Server free?

Yes. Pi-hole MCP Server is open source, so you can use and self-host it for free.

How do I add Pi-hole MCP Server to Claude Code?

Run this command in your terminal: claude mcp add pihole-mcp --env PIHOLE_INSTANCES='<PIHOLE_INSTANCES>' --env PIHOLE_BASE_URL='<PIHOLE_BASE_URL>' --env PIHOLE_PASSWORD='<PIHOLE_PASSWORD>' -- npx -y @ranklancer/pihole-mcp

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers