dns-mcp
dns-mcp
Ein Model Context Protocol-Server, der es jedem MCP-Client (Claude Desktop, Claude Code, Cursor usw.) ermöglicht, DNS-, WHOIS- und IP-Geolokalisierungsabfragen mitten im Gespräch durchzuführen.
Fragen Sie Claude: "Warum ist foo.com von Tokio aus nicht erreichbar?" und er kann tatsächlich die Datensätze abrufen, das WHOIS prüfen und die IP geolokalisieren, ohne den Chat zu verlassen.
Funktionen
[x]
resolve_dns— Forward-Lookup via DNS-over-HTTPS (A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA)[x]
reverse_dns— PTR-Lookup für IPv4 oder IPv6[x]
whois_domain— strukturierte Registrierungsinformationen via RDAP (modernes WHOIS)[x]
geo_ip— Land / Stadt / ASN / ISP für eine öffentliche IP[ ] Bulk- / Zonentransfer-Abfragen
[ ] DNSSEC-Validierungsausgabe
[ ] Lokaler Cache (reduziert wiederholte Upstream-Aufrufe)
Keine API-Schlüssel erforderlich. Alle vier Tools greifen auf öffentliche, kostenlose Endpunkte zu:
Tool | Upstream |
|
|
|
|
|
|
Related MCP server: intodns-mcp
Schnellstart
Installation
pipx install dns-mcp
# or
uv tool install dns-mcpClaude Desktop
Fügen Sie dies zu claude_desktop_config.json hinzu (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"dns": {
"command": "dns-mcp"
}
}
}Starten Sie Claude Desktop neu; die vier Tools sollten im Tool-Menü erscheinen.
Claude Code
claude mcp add dns dns-mcpCodex CLI
Fügen Sie dies zu ~/.codex/config.toml hinzu:
[mcp_servers.dns]
command = "dns-mcp"Starten Sie Codex neu. Die vier Tools sind dann in jeder Codex-Sitzung verfügbar.
Aus dem Quellcode ausführen
git clone https://github.com/r0bin2u/dns-mcp && cd dns-mcp
uv sync
uv run dns-mcpBeispiel-Prompts
"Was sind die A- und MX-Einträge von github.com?"
"Wer hat cloudflare.com registriert und wann läuft die Registrierung ab?"
"Geolokalisiere 140.82.121.4 — welches Land und welcher ISP?"
"Meine Benutzer in Tokio sagen, foo.com sei langsam. Löse es auf und geolokalisiere dann die IP."
"Ich habe eine E-Mail von support@paypa1-security.com erhalten. Ist diese Domain verdächtig?"
Entwicklung
uv sync
uv run pytest
uv run ruff check .Interaktives Debugging mit dem MCP Inspector:
npx @modelcontextprotocol/inspector uv run dns-mcpEin Hinweis zu ip-api.com
Der kostenlose Tarif von ip-api.com erfordert HTTP (nicht HTTPS). Dies ist für die Geolokalisierung beliebiger öffentlicher IPs in Ordnung – es werden keine Anmeldedaten gesendet –, bedeutet aber, dass die Anfrage im Netzwerk sichtbar ist. Wenn dies in Ihrer Umgebung ein Problem darstellt, tauschen Sie es gegen eine HTTPS-Alternative aus (z. B. ipwho.is, ipinfo.io mit einem Token), indem Sie IPGEO_URL in src/dns_mcp/__init__.py bearbeiten.
Lizenz
MIT — siehe LICENSE.
Available Tools
4 toolsgeo_ipA
Locate an IP address geographically. Returns country, city, ASN, and ISP.
Args:
ip: Public IPv4 or IPv6 address. Private/reserved ranges are rejected.
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses that the tool rejects private/reserved ranges and lists return fields, but does not mention rate limits, authentication, or other potential errors.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: the first states the overall purpose, the second details the parameter and its constraints. Every sentence contributes value, and it is concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description coveres purpose, parameter constraints, and return fields. It lacks details on error handling for malformed IPs, but overall is complete enough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (no parameter description), so the description adds essential meaning: the IP must be a public IPv4 or IPv6 address, and private/reserved ranges are rejected. This compensates well for the lack of schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool locates an IP address geographically and returns country, city, ASN, and ISP. This distinguishes it from sibling tools like resolve_dns, reverse_dns, and whois_domain which perform different network lookups.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what the tool returns and that private/reserved IP ranges are rejected. It implies usage for public IPs needing geographic info, but does not explicitly state when not to use it or provide alternative recommendations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resolve_dnsA
Resolve a domain name via DNS-over-HTTPS. Returns answer records and TTL.
Args:
name: Domain to look up, e.g. "github.com".
record_type: DNS record type. One of A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| record_type | No | A |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes the method (DNS-over-HTTPS) and return values (answer records, TTL), but does not mention error handling or potential limitations. Since no annotations are provided, the description carries the full burden and is moderately transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very concise: one sentence overview and an Args list. No redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers the main function and parameters. For a simple tool with no output schema, it is nearly complete. Minor omission: does not explicitly state the default record type (A) though it is in the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The Args section adds meaning beyond the schema: provides an example for 'name' and lists valid record types for 'record_type'. Schema coverage is 0%, so this added detail is valuable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it resolves a domain name via DNS-over-HTTPS and returns answer records and TTL. Distinguishes from sibling tools (geo_ip, reverse_dns, whois_domain) which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. While siblings are distinct, the description lacks explicit usage context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reverse_dnsA
Reverse-resolve an IP address to its PTR record (the hostname it points to).
Args:
ip: IPv4 or IPv6 address, e.g. "140.82.121.4".
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must disclose behavioral traits. It mentions the output is a PTR record/hostname and gives an example, but does not cover error handling, support for private IPs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: one sentence for purpose, one for parameter description. No unnecessary words, and the key information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with no output schema, the description covers the operation and input adequately. It could be improved by explicitly stating the return type, but the mention of 'PTR record (the hostname it points to)' strongly implies the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description adds value by specifying that 'ip' accepts both IPv4 and IPv6 addresses and providing an example. However, it could include more detail such as format requirements.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs reverse DNS resolution, converting an IP address to its PTR record (hostname). This action is distinct from siblings like geo_ip (geolocation), resolve_dns (forward DNS), and whois_domain (domain registration).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied for obtaining a hostname from an IP, but no explicit guidance on when to use this tool versus siblings, or any prerequisites or limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
whois_domainA
Look up domain registration info via RDAP (the modern structured WHOIS).
Args:
domain: Domain name, e.g. "github.com".
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden. While it indicates a read operation, it omits behavioral details like rate limits, data privacy (e.g., redacted info), authentication needs, or response format. The mention of 'modern structured WHOIS' is helpful but insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise with two sentences, front-loaded with the purpose. The Args section is redundant but includes a useful example. It is not overly verbose, though the structure could be slightly improved with a bullet or list.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having only one parameter, no output schema, and no annotations, the description lacks important context such as what the response contains, any usage limitations, or how to handle errors. For a simple lookup tool, more completeness (e.g., a note on RDAP response structure) would be beneficial.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only a title and type for the 'domain' parameter with 0% description coverage. The description adds an example ('e.g. "github.com"') and specifies the format ('Domain name'), which adds significant meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Look up domain registration info via RDAP' using a specific verb ('look up') and resource ('domain registration info'). It distinguishes from sibling tools (geo_ip, resolve_dns, reverse_dns) which focus on IP or DNS data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for obtaining domain registration info via RDAP, but provides no explicit guidance on when to use it vs. alternatives or when not to use it. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
geo_ip - First observed
resolve_dns - First observed
reverse_dns - First observed
whois_domain
TDQS
Scored across 4 tools
Each tool addresses a distinct DNS function: geolocation, forward resolution, reverse resolution, and registration lookup. No overlapping purposes.
All tools use a consistent verb_noun pattern in snake_case (e.g., geo_ip, resolve_dns), making their intent immediately clear.
Four tools is well-scoped for a DNS utility server—enough to cover essential operations without redundancy or clutter.
The set provides forward/reverse DNS, geolocation, and WHOIS. Missing advanced features like bulk queries or DNSSEC validation, but core workflows are complete.
Maintenance
Related MCP Connectors
Free MCP server of security & dev API tools -- supply-chain, CVE, DNS, WHOIS, OFAC, Cosmos SDK.
WHOIS/RDAP lookup, IP geolocation and Punycode conversion. 1400+ TLDs incl. IDN. No API key.
Remote MCP server: 19 domain-hygiene and email-auth tools (DNS, SPF, DMARC, DKIM, TLS).
DNS MCP — DNS and network lookup tools
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for DNS lookups, reverse DNS, WHOIS, and domain checks. Zero auth, zero config.547 npm3MIT
- AlicenseAqualityBmaintenanceMCP server for IntoDNS.ai providing 36 free tools for DNS, DMARC, SPF, DKIM, BIMI, DNSSEC, MTA-STS, FCrDNS, blacklist and email security checks. Citation-grade report snapshots with content hashes. No API key required.45100 npm2MIT
- AlicenseAqualityBmaintenanceMCP server for live IP and domain reputation checks via DNS lookups, providing abuse scores and network type without requiring an API key.2MIT
- AlicenseNot gradedqualityCmaintenanceProvides a no-key IP intelligence API for MCP clients, enabling IP geolocation, VPN/datacenter detection, DNS, WHOIS, blacklist checks, security headers, port scanning, and more.MIT