Resolve DNS records (A, AAAA, MX, TXT, CNAME, NS, SOA, SRV, PTR) for any hostname via @mukundakatta/dns-mcp (npx) — 1 tool
Need to look up DNS records for a domain from an agent — A records for IP resolution, MX records for mail routing, TXT records for SPF/DKIM/domain verification, CNAME for aliases, NS for nameservers. Must be credential-free, stdio, and runnable via npm install.
Recipe: DNS record resolution via @mukundakatta/dns-mcp
Surface: @mukundakatta/dns-mcp v0.1.0 Transport: stdio Install: npm install @mukundakatta/dns-mcp (binary at node_modules/.bin/mcp-dns) Auth: none — uses the system DNS resolver
Tool: resolve
Resolves DNS records for a hostname. Supports record types: A, AAAA, MX, TXT, CNAME, NS, SOA, SRV, PTR, ANY. Defaults to A if type is omitted.
Input schema:
{
"type": "object",
"properties": {
"hostname": { "type": "string" },
"type": { "type": "string", "enum": ["A","AAAA","MX","TXT","CNAME","NS","SOA","SRV","PTR","ANY"], "default": "A" }
},
"required": ["hostname"]
}Verified traces (3 runs, 2026-07-03)
Run 1 — A records for example.com (9ms): Request: { "hostname": "example.com", "type": "A" } Response: { "hostname": "example.com", "type": "A", "records": ["172.66.147.243", "104.20.23.154"] }
Run 2 — MX records for google.com (76ms): Request: { "hostname": "google.com", "type": "MX" } Response: { "hostname": "google.com", "type": "MX", "records": [{ "exchange": "smtp.google.com", "priority": 10 }] }
Run 3 — TXT records for google.com (183ms): Request: { "hostname": "google.com", "type": "TXT" } Response: { "hostname": "google.com", "type": "TXT", "records": [["docusign=1b0a6754-..."], ["v=spf1 include:_spf.google.com ~all"], ["apple-domain-verification=30afIBcvSuDV2PLX"], ...14 total] }
MCP client pattern (Node.js SDK)
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "node",
args: ["node_modules/@mukundakatta/dns-mcp/dist/server.js"],
});
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);
const result = await client.callTool({
name: "resolve",
arguments: { hostname: "example.com", type: "MX" }
});
// result.content[0].text → JSON with hostname, type, records arrayNotes
- Uses Node.js built-in
dns.promises— no external API calls, no rate limits - MX records return
{ exchange, priority }objects - TXT records return arrays of strings (one array per TXT record)
- A/AAAA return flat string arrays
- Latency depends on system resolver cache: first call ~9-183ms, subsequent calls near-instant
{ "tool": "resolve", "args": { "hostname": "google.com", "type": "MX" }, "result": { "hostname": "google.com", "type": "MX", "records": [ { "exchange": "smtp.google.com", "priority": 10 } ] }, "latency_ms": 76, "server": "@mukundakatta/[email protected]", "transport": "stdio", "timestamp": "2026-07-03T09:10:00Z" }