agentic-dns
Provides access to Pi-hole DNS query logs and telemetry, allowing AI agents to inspect recent queries and ad-blocking statistics from Pi-hole's FTL SQLite database.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agentic-dnsCheck if any local DNS resolvers are down"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agentic-dns
Agentic AI-Native DNS Routing, Diagnostics & Telemetry. Manages a complete DNS resolution chain (Pi-hole -> CoreDNS -> dnsdist -> Unbound/Stubby/DNSCrypt -> VPN DNS) with CLI, REST API, stdio MCP, and a Rust DoT/mTLS proxy server. Pure POSIX Bash + standard Unix tools -- zero Python/Node dependencies.
OCI Container (GHCR)
Pre-built multi-architecture images (linux/amd64, linux/arm64) for ephemeral agent sandboxes and headless runners.
Pulling the Image
# Pinned release
docker pull ghcr.io/dedsecorg/agentic-dns:1.6.0
# Moving major release
docker pull ghcr.io/dedsecorg/agentic-dns:v1
# Latest tracking branch
docker pull ghcr.io/dedsecorg/agentic-dns:latestRunning the Resolver Health & Trace Tools
# Quick health check
docker run --rm \
--cap-add=NET_ADMIN \
ghcr.io/dedsecorg/agentic-dns:v1 status
# Run trace check against host resolver
docker run --rm \
--cap-add=NET_ADMIN \
--network=host \
ghcr.io/dedsecorg/agentic-dns:v1 trace api.anthropic.comWhy This Exists
Modern networks run multiple DNS layers simultaneously: Pi-hole for blocking, CoreDNS for split-horizon, dnsdist for load balancing, Unbound for recursive resolution, Stubby/DNSCrypt for DoT/DoH, plus VPN-provided DNS. When any layer fails or VPNs rotate DNS, resolution breaks silently.
agentic-dns treats the DNS chain as managed infrastructure:
Discovers topology -- detects running services, VPN DNS endpoints, listening ports
Health-checks each hop -- active DNS queries against every resolver
Auto-reconfigures -- rewrites dnsdist/CoreDNS upstreams when VPN DNS changes
Exposes telemetry -- REST API, MCP server, structured logs for AI agents
Provides DoT/mTLS proxy -- Rust server terminates TLS, forwards to chain
Related MCP server: dns-mcp
Architecture
+------------------+
| Client Query |
+--------+---------+
|
v
+------------------+
| Pi-hole (53) | -- blocking, cache
| forwarder |
+--------+---------+
|
v
+------------------+
| CoreDNS (5352) | -- split-horizon, local zones
+--------+---------+
|
v
+------------------+
| dnsdist (5330) | -- load balance, retry, Lua policy
+--------+---------+
+--------+--------+--------+
| | |
v v v
+------------+ +------------+ +------------+
| Unbound | | Stubby | | DNSCrypt |
| (5335) | | (5360) | | (5354) |
| recursive | | DoT proxy | | DoH proxy |
+-----+------+ +-----+------+ +-----+------+
| | |
+--------+--------+----------------+
|
v
+------------------+
| VPN DNS | -- discovered dynamically
| (Proton/Nord/ |
| Tailscale) |
+------------------+
+------------------+
| agentic-dns- | -- Rust DoT/mTLS proxy
| server (853) | on 127.0.0.1 or Tailscale
+------------------+Installation
Manual
git clone https://github.com/dedsecorg/agentic-dns
cd agentic-dns
sudo -S -p '' -S -p '' ./install.shInstalls:
/usr/local/bin/agentic-dns-- main CLI/usr/local/bin/agentic-dns-server-- Rust DoT/mTLS proxy (prebuilt or cargo build)/etc/agentic-dns/-- configs for dnsdist, CoreDNS, Unbound, Stubby, DNSCrypt/etc/systemd/system/agentic-dns.service-- systemd unit/etc/systemd/system/agentic-dns-server.service-- Rust server unit
Smithery (for MCP clients)
npx -y @smithery/cli install @dedsecorg/agentic-dnsCommands
Command | Description |
| Show all DNS services, addresses, types, health |
| Resolve through full chain |
| Trace DNS path with live packet capture at each hop |
| List current dnsdist routing rules |
| Add upstream to dnsdist |
| Remove upstream from dnsdist |
| Bypass failing service (auto-switch to backup) |
| Intercept phone encrypted DNS -> Pi-hole |
| Show recent Pi-hole DNS query log |
| Check health of all DNS services |
| Show service tags |
| Start REST API server on port 8099 |
| Start stdio MCP JSON-RPC server |
| Start Rust DoT/mTLS proxy server |
DNS Chain Services
Service | Port | Role | Upstream |
Pi-hole | 53 | Blocking, cache, DHCP | CoreDNS |
CoreDNS | 5352 | Split-horizon, local zones | dnsdist |
dnsdist | 5330 | Load balancer, Lua policy | Unbound, DNSCrypt |
Unbound | 5335 | Recursive resolver | VPN DNS |
Stubby | 5360 | DoT proxy (TLS) | VPN DNS |
DNSCrypt | 5354 | DoH proxy | Cloudflare/Quad9 DoH |
agentic-dns-server | 853 | DoT/mTLS proxy (Rust) | Chain entry |
VPN DNS Discovery
Automatically detects VPN DNS endpoints:
ProtonVPN --
protonvpn statusor NetworkManagerproton0interfaceNordVPN -- WireGuard config or
nordvpn statusTailscale --
tailscale status --jsonmagic DNSWireGuard --
wg showallowed IPs
Set manually: VPN_DNS=10.2.0.1 agentic-dns status
Configuration
/etc/agentic-dns/ -- Service Configs
Generated by install.sh, editable for custom zones/upstreams:
dnsdist.conf-- routing rules, load balancing, Lua policiesCorefile-- CoreDNS zones, pluginsunbound.conf-- recursive resolver settingsstubby.yml-- DoT upstream certificatesdnscrypt-proxy.toml-- DoH server stamps
Environment Variables
Variable | Default | Description |
| 127.0.0.1 | Pi-hole API address |
| /etc/pihole/pihole-api-key.txt | Pi-hole API key |
| 8099 | REST API port |
| auto | Override VPN DNS |
| agentic-dns-server | Rust server binary |
MCP Integration
Start read-write MCP server:
agentic-dns mcpTools exposed:
dns_status-- all services health + configdns_query-- resolve domain through chaindns_trace-- packet capture at each hopdns_route_add-- add dnsdist upstreamdns_route_remove-- remove dnsdist upstreamdns_bypass-- failover servicedns_enforce-- phone DNS interceptiondns_pihole_log-- Pi-hole query log
REST API
agentic-dns api
# or
curl http://localhost:8099/api/v1/statusEndpoints:
GET /api/v1/status-- full service statusGET /api/v1/query?domain=example.com-- resolveGET /api/v1/trace?domain=example.com-- traceGET /api/v1/health-- health checksGET /api/v1/pihole/log-- Pi-hole logsPOST /api/v1/route-- add upstreamDELETE /api/v1/route/:name-- remove upstreamPOST /api/v1/bypass-- failover
Phone DNS Interception (Android)
# On server (run as root)
agentic-dns enforce on 100.87.74.22
# On Android: set DNS to server Tailscale IP (100.74.31.18)
# All DoT (port 853) from phone -> Pi-hole -> chainUses nftables/iptables TPROXY + agentic-dns-server DoT proxy to transparently intercept encrypted DNS (port 853) and force through Pi-hole.
Rust DoT/mTLS Server
agentic-dns-server -- standalone binary:
Terminates TLS on 853 (DoT) or 443 (DoH)
Validates client certs (mTLS optional)
Forwards to local DNS chain
Metrics on
:9090/metrics(Prometheus)Zero-copy, async, ~2MB RAM
Build:
cd server && cargo build --release
# or download prebuilt from releasesRequirements
Linux (systemd, nftables/iptables)
Pi-hole, CoreDNS, dnsdist, Unbound, Stubby, DNSCrypt-Proxy installed
dig,ss,jq,bash4.4+Rust 1.75+ (for server build)
CAP_NET_ADMIN,CAP_NET_BIND_SERVICE(for server)
License
MIT -- see LICENSE.
Related
agentic-route -- kernel policy routing reconciler (same author)
hermes-dns -- private fork with real IPs, same engine
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Related MCP Connectors
- SpanlyOAuthcom.spanly
MCP observability. Query live traffic, errors, duration, and alerts from your AI agent.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
Let AI agents query data and act across all your business apps via MCP.
Related MCP Servers
- AlicenseAqualityCmaintenanceConnects AI assistants to Pi-hole network-wide ad blocker, enabling monitoring of DNS traffic statistics, controlling blocking settings, managing whitelist/blacklist domains, viewing query logs, and performing maintenance tasks through natural language.16958MIT
- FlicenseNot gradedqualityBmaintenanceReal-time DNS security analysis for AI assistants via MCP. Enables DNSSEC chain validation, email authentication posture, and registration intelligence directly from chat sessions.1-
- AlicenseNot gradedqualityBmaintenanceProvides network operations tools such as ping, traceroute, DNS queries, and nmap scans via MCP, enabling network diagnostics and monitoring through natural language.13MIT
- FlicenseAqualityDmaintenanceProvides DNS lookup and email authentication diagnostic tools (SPF, DKIM, DMARC, MX, etc.) for use with MCP-compatible clients. Enables natural language queries to check DNS records and email health.7-
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/dedsecorg/agentic-dns'
If you have feedback or need assistance with the MCP directory API, please join our Discord server