agentic-dns
agentic-dns
面向 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 statusRelated MCP server: dns-mcp
60 秒 AI 代理上手
agentic-dns 为 AI 代理提供开箱即用的 MCP JSON-RPC 协议支持。
1. Claude Code
claude mcp add agentic-dns agentic-dns mcp2. 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 工具(
dig、ss、tcpdump、nft、sqlite3、socat、jq)。空闲时零内存占用。原生模型上下文协议(MCP):向 AI 代理暴露
dns_status、dns_query、dns_trace、dns_health、dns_routes、dns_pihole_log和dns_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.
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