Skip to main content
Glama

agentic-dns

License: MIT CI Status Protocol: MCP Docker: GHCR GitHub Stars Release

面向 Agentic AI 系统(Claude、Cursor、Windsurf、Hermes Agent、Copilot)的 POSIX 原生 DNS 路由、诊断与遥测引擎。

agentic-dns 是一个零依赖、超快速的 DNS 编排引擎,使用纯 Bash 和 Rust 编写。它专为开发者工作站、homelab、Kubernetes 节点和自主 AI 代理设计,管理多层 DNS 链路(pihole -> coredns -> dnsdist -> unbound -> dnscrypt -> VPN DNS),执行实时逐跳数据包跟踪(trace),自动绕过故障上游(bypass),并为 AI 编程助手提供 stdio 模型上下文协议(MCP JSON-RPC)服务器。


快速安装选项

选项 1:单行脚本(Linux / macOS)

curl -fsSL https://raw.githubusercontent.com/dedsecorg/agentic-dns/main/install.sh | bash

选项 2:Docker 容器(GHCR)

docker run -d --net=host ghcr.io/dedsecorg/agentic-dns:latest

选项 3:Node.js / npx 包

npx agentic-dns status

Related MCP server: dns-mcp

60 秒 AI 代理上手

agentic-dns 为 AI 代理提供开箱即用的 MCP JSON-RPC 协议支持。

1. Claude Code

claude mcp add agentic-dns agentic-dns mcp

2. Cursor / Windsurf / Copilot

将以下内容添加到你的项目或用户 .mcp.json 文件中:

{
  "mcpServers": {
    "agentic-dns": {
      "command": "agentic-dns",
      "args": [
        "mcp"
      ],
      "env": {
        "PIHOLE_HOST": "127.0.0.1",
        "AGENTIC_DNS_API_PORT": "8099"
      }
    }
  }
}

3. Hermes Agent

运行 hermes mcp add agentic-dns agentic-dns mcp


示例 AI 助手提示词

连接后,你可以让 AI 编程助手:

  • "检查链中是否有任何本地 DNS 解析器宕机或不健康。"

  • "跨回环和出站接口跟踪 github.com 的数据包路径。"

  • "绕过 stubby,将 DNS 流量路由到 unbound。"

  • "从 SQLite 显示最近的 Pi-hole 查询统计信息。"


主要特性

  • 零外部依赖:核心使用 POSIX Bash 执行 + 标准 Unix 工具(digsstcpdumpnftsqlite3socatjq)。空闲时零内存占用。

  • 原生模型上下文协议(MCP):向 AI 代理暴露 dns_statusdns_querydns_tracedns_healthdns_routesdns_pihole_logdns_bypass

  • 实时服务间跟踪(trace:在回环和网络接口上运行后台 tcpdump 抓包,以可视化数据包逐跳推进过程和延迟瓶颈。

  • 自动故障转移(bypass:动态重写 dnsdist 配置并重新加载路由守护进程,从而在毫秒级绕过故障解析器。

  • 加密 DNS 拦截(enforce:应用非破坏性 nftables 规则,将 Private DNS(DoT 端口 853)重定向并丢弃 Google DoQ(UDP/443)。

  • 高性能 Rust 服务器(agentic-dns-server:包含用于处理 DoT/DoH 代理和 REST 遥测的 server/ crate。


6 层架构管道

  [Client / Mobile Device]
            |
            v
      pihole (:53)          <- Ad blocking & FTL SQLite telemetry
            |
            v
     coredns (:5352)        <- Split-horizon mesh zone routing (Tailscale / Nebula)
            |
            v
     dnsdist (:5330)        <- Dynamic load balancing & bypass failover policy
            |
   +--------+--------+
   |                 |
   v                 v
unbound (:5335)   dnscrypt-proxy (:5354) / stubby (:5360)
   |                 |
   v                 v
[VPN / Upstream]  [DoH / DoT Cloud Upstreams]

CLI 命令快速参考

# View active DNS chain status and listening ports
agentic-dns status

# Execute live inter-service packet trace
agentic-dns trace google.com

# Failover failing service to backup
agentic-dns bypass stubby unbound

# Check health of all DNS listeners
agentic-dns health

# View Pi-hole query logs
agentic-dns pihole-log

# Start REST API server on port 8099
agentic-dns api

# Start stdio MCP JSON-RPC Server
agentic-dns mcp

许可证

MIT 许可证 - 免费且开源。

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Connects 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.
    16
    95
    8
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Real-time DNS security analysis for AI assistants via MCP. Enables DNSSEC chain validation, email authentication posture, and registration intelligence directly from chat sessions.
    1
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides network operations tools such as ping, traceroute, DNS queries, and nmap scans via MCP, enabling network diagnostics and monitoring through natural language.
    13
    MIT

Latest Blog Posts

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