MCP Hub
Back to servers

AdGuard Home MCP Server

Manage AdGuard Home through AI assistants

Registry
Updated
Mar 9, 2026

Quick Install

npx -y @samik081/mcp-adguard-home

npm version Docker image License: MIT Node.js Version

MCP AdGuard Home

MCP server for AdGuard Home. Manage DNS filtering, clients, DHCP, rewrites, and more through natural language in Cursor, Claude Code, and Claude Desktop.

Disclaimer: Most of this code has been AI-generated and has not been fully tested yet. I created this project for my own needs and plan to continue improving its quality, but it may be buggy in the early stages. If you find a bug, feel free to open an issue -- I'll try to work on it in my spare time.

Features

  • 65 tools across 16 API categories covering the complete AdGuard Home API
  • Read-only mode via ADGUARD_ACCESS_TIER=read-only for safe monitoring
  • Category filtering via ADGUARD_CATEGORIES to expose only the tools you need
  • Zero HTTP dependencies -- uses native fetch (Node.js 18+)
  • Docker images for linux/amd64 and linux/arm64 on GHCR
  • Remote MCP via HTTP transport (MCP_TRANSPORT=http) using the Streamable HTTP protocol
  • TypeScript/ESM with full type safety

Quick Start

Run the server directly with npx:

ADGUARD_URL="http://your-adguard-ip:3000" \
ADGUARD_USERNAME="your-username" \
ADGUARD_PASSWORD="your-password" \
npx -y @samik081/mcp-adguard-home

The server validates your AdGuard Home connection on startup and fails immediately with a clear error if credentials are missing or invalid.

Docker

Run with Docker (stdio transport, same as npx):

docker run --rm -i \
  -e ADGUARD_URL=http://your-adguard-ip:3000 \
  -e ADGUARD_USERNAME=your-username \
  -e ADGUARD_PASSWORD=your-password \
  ghcr.io/samik081/mcp-adguard-home

To run as a remote MCP server with HTTP transport:

docker run -d -p 3000:3000 \
  -e MCP_TRANSPORT=http \
  -e ADGUARD_URL=http://your-adguard-ip:3000 \
  -e ADGUARD_USERNAME=your-username \
  -e ADGUARD_PASSWORD=your-password \
  ghcr.io/samik081/mcp-adguard-home

The MCP endpoint is available at http://localhost:3000 and a health check at http://localhost:3000/health.

Configuration

Claude Code CLI (recommended):

# Using npx
claude mcp add --transport stdio adguard-home \
  --env ADGUARD_URL=http://your-adguard-ip:3000 \
  --env ADGUARD_USERNAME=your-username \
  --env ADGUARD_PASSWORD=your-password \
  -- npx -y @samik081/mcp-adguard-home

# Using Docker
claude mcp add --transport stdio adguard-home \
  --env ADGUARD_URL=http://your-adguard-ip:3000 \
  --env ADGUARD_USERNAME=your-username \
  --env ADGUARD_PASSWORD=your-password \
  -- docker run --rm -i ghcr.io/samik081/mcp-adguard-home

# Using remote HTTP (connect to a running Docker container or HTTP server)
claude mcp add --transport http adguard-home http://localhost:3000

JSON config (works with Claude Code .mcp.json, Claude Desktop claude_desktop_config.json, Cursor .cursor/mcp.json):

{
  "mcpServers": {
    "adguard-home": {
      "command": "npx",
      "args": ["-y", "@samik081/mcp-adguard-home"],
      "env": {
        "ADGUARD_URL": "http://your-adguard-ip:3000",
        "ADGUARD_USERNAME": "your-username",
        "ADGUARD_PASSWORD": "your-password"
      }
    }
  }
}

Docker (stdio):

{
  "mcpServers": {
    "adguard-home": {
      "command": "docker",
      "args": ["run", "--rm", "-i",
        "-e", "ADGUARD_URL=http://your-adguard-ip:3000",
        "-e", "ADGUARD_USERNAME=your-username",
        "-e", "ADGUARD_PASSWORD=your-password",
        "ghcr.io/samik081/mcp-adguard-home"
      ]
    }
  }
}

Remote MCP (connect to a running Docker container or HTTP server):

{
  "mcpServers": {
    "adguard-home": {
      "type": "streamable-http",
      "url": "http://localhost:3000"
    }
  }
}

Access Tiers

Control which tools are available using the ADGUARD_ACCESS_TIER environment variable:

TierToolsDescription
full (default)65Read and write -- full control
read-only29Read only -- safe for monitoring, no state changes
  • full: All 65 tools. Includes configuration changes, adding/removing filters, clearing logs, and all destructive operations.
  • read-only: 29 tools. Status, configuration viewing, and query log reading only. No state changes.

Tools that are not available in your tier are not registered with the MCP server. They will not appear in your AI tool's tool list, keeping the context clean.

Environment Variables

VariableRequiredDefaultDescription
ADGUARD_URLYes--AdGuard Home base URL (e.g., http://192.168.1.1:3000)
ADGUARD_USERNAMEYes--Admin username
ADGUARD_PASSWORDYes--Admin password
ADGUARD_ACCESS_TIERNofullread-only for read-only tools only, full for all tools
ADGUARD_CATEGORIESNo(all)Comma-separated category allowlist (e.g., dns,filtering,stats)
ADGUARD_TOOL_BLACKLISTNo(none)Comma-separated list of tool names to exclude (e.g., dns_clear_cache,stats_reset)
ADGUARD_TOOL_WHITELISTNo(none)Comma-separated list of tool names to force-include, bypassing access tier and category filters
DEBUGNofalseEnable debug logging to stderr
MCP_TRANSPORTNostdioTransport mode: stdio (default) or http
MCP_PORTNo3000HTTP server port (only used when MCP_TRANSPORT=http)
MCP_HOSTNo0.0.0.0HTTP server bind address (only used when MCP_TRANSPORT=http)
MCP_EXCLUDE_TOOL_TITLESNofalseSet true to omit tool titles from registration (saves tokens)

Available Categories

global, dns, querylog, stats, filtering, safebrowsing, parental, safesearch, clients, dhcp, rewrites, tls, blocked_services, access, install, mobile_config

Tools

Global (6 tools)
ToolDescription
global_get_statusRetrieve server status including version, DNS addresses, protection state, and ports
global_get_profileRetrieve user profile (name, language, theme)
global_check_versionCheck for AdGuard Home updates and compare with current version
global_set_protectionEnable or disable DNS protection globally, with optional duration for temporary disable
global_update_profileUpdate user profile settings (name, language, theme)
global_begin_updateInitiate an AdGuard Home software update
DNS (4 tools)
ToolDescription
dns_get_infoRetrieve full DNS configuration including upstreams, cache settings, blocking mode, and DNSSEC
dns_test_upstreamTest upstream DNS server configuration to verify servers are reachable
dns_set_configUpdate DNS server configuration (19 optional fields for partial update)
dns_clear_cacheClear the DNS resolver cache
Query Log (4 tools)
ToolDescription
querylog_getSearch DNS query log with optional filtering by response status, search term, and pagination
querylog_get_configRetrieve query log configuration settings
querylog_set_configUpdate query log configuration (enabled, interval, anonymization)
querylog_clearClear the entire DNS query log
Statistics (4 tools)
ToolDescription
stats_getRetrieve DNS statistics including top domains, blocked counts, and client activity
stats_get_configRetrieve statistics configuration settings
stats_resetReset all DNS statistics
stats_set_configUpdate statistics configuration (enabled, interval, ignored domains)
Filtering (8 tools)
ToolDescription
filtering_get_statusRetrieve filtering configuration including blocklists, allowlists, and user rules
filtering_check_hostTest whether a hostname would be blocked by current filtering rules
filtering_set_configUpdate global filtering configuration (enabled state and update interval)
filtering_add_urlAdd a new filter URL (blocklist or allowlist)
filtering_remove_urlRemove a filter URL from blocklist or allowlist
filtering_set_urlUpdate an existing filter URL (rename, change URL, or enable/disable)
filtering_refreshForce refresh of filter lists to fetch latest updates
filtering_set_rulesSet custom filtering rules (replaces all existing custom rules)
Safe Browsing (2 tools)
ToolDescription
safebrowsing_get_statusRetrieve safe browsing (malware/phishing protection) status
safebrowsing_setEnable or disable safe browsing protection
Parental (2 tools)
ToolDescription
parental_get_statusRetrieve parental filtering status
parental_setEnable or disable parental filtering (content restrictions)
Safe Search (2 tools)
ToolDescription
safesearch_get_statusRetrieve safe search settings showing per-engine enforcement status
safesearch_set_settingsUpdate safe search settings with per-engine configuration (Bing, DuckDuckGo, Google, Pixabay, Yandex, YouTube)
Clients (5 tools)
ToolDescription
clients_getRetrieve all configured and auto-detected clients with their settings
clients_searchSearch for specific clients by their IDs (IP, MAC, CIDR, or client ID)
clients_addAdd a new persistent client with per-client settings
clients_updateUpdate an existing persistent client by name
clients_deleteDelete a persistent client by name
DHCP (9 tools)
ToolDescription
dhcp_get_statusRetrieve DHCP server configuration, static leases, and active leases
dhcp_get_interfacesRetrieve available network interfaces for DHCP server binding
dhcp_find_activeScan for competing DHCP servers on a network interface
dhcp_set_configUpdate DHCP server configuration (enabled state, interface, IPv4/IPv6 settings)
dhcp_add_static_leaseAdd a static DHCP lease mapping a MAC address to an IP
dhcp_remove_static_leaseRemove a static DHCP lease
dhcp_update_static_leaseUpdate a static DHCP lease (remove + add pattern)
dhcp_resetReset DHCP configuration to defaults
dhcp_reset_leasesClear all DHCP leases
Rewrites (6 tools)
ToolDescription
rewrites_listRetrieve all configured DNS rewrite rules
rewrites_get_settingsRetrieve DNS rewrite module enabled/disabled state
rewrites_addAdd a new DNS rewrite rule
rewrites_updateUpdate a DNS rewrite rule (remove + add pattern)
rewrites_deleteDelete a DNS rewrite rule
rewrites_set_settingsEnable or disable the DNS rewrite module
TLS (3 tools)
ToolDescription
tls_get_statusRetrieve TLS configuration and certificate validation status
tls_validateValidate TLS configuration without applying changes
tls_set_configUpdate TLS configuration including certificates and HTTPS/DoH/DoT settings
Blocked Services (3 tools)
ToolDescription
blocked_services_get_allList all available services that can be blocked, organized by group
blocked_services_getRetrieve currently blocked services list and schedule
blocked_services_updateUpdate the list of blocked services and optional schedule
Access (2 tools)
ToolDescription
access_get_listRetrieve access control lists: allowed clients, disallowed clients, and blocked hosts
access_set_listSet access control lists for allowed clients, disallowed clients, and blocked hosts
Install (3 tools)
ToolDescription
install_get_addressesRetrieve network interface details and ports for initial setup
install_check_configValidate install configuration without applying (checks web/DNS binding, credentials)
install_apply_configApply initial setup configuration (web/DNS binding and admin credentials)
Mobile Config (2 tools)
ToolDescription
mobile_config_get_dohGenerate Apple .mobileconfig profile for DNS-over-HTTPS
mobile_config_get_dotGenerate Apple .mobileconfig profile for DNS-over-TLS

Verify It Works

After configuring your MCP client, ask your AI assistant:

"What's my AdGuard Home server status?"

If the connection is working, the assistant will call global_get_status and return your server version, DNS addresses, protection state, and port configuration.

Usage Examples

  • "What's the current DNS protection status?" -- calls global_get_status to show version, addresses, and protection state.
  • "Show me all DNS rewrite rules" -- calls rewrites_list to display all configured DNS rewrites.
  • "Add a DNS rewrite for local.example.com pointing to 192.168.1.100" -- calls rewrites_add to create a new rewrite rule.

Troubleshooting

Connection errors

  • Verify ADGUARD_URL is reachable from the machine running the MCP server
  • Ensure the URL includes the port if non-standard (e.g., http://192.168.1.1:3000)
  • Check that AdGuard Home is running and accessible

Authentication failures

  • Verify ADGUARD_USERNAME and ADGUARD_PASSWORD are correct
  • Check that the user has admin privileges in AdGuard Home

Tools not showing up

  • Check your ADGUARD_ACCESS_TIER setting -- read-only mode only exposes read tools
  • Check ADGUARD_CATEGORIES -- only tools in listed categories are registered
  • Verify the server started without errors by checking stderr output

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode (auto-reload)
npm run dev

# Open the MCP Inspector for interactive testing
npm run inspect

License

MIT

Reviews

No reviews yet

Sign in to write a review