dns-mcp
dns-mcp is an MCP server for DNS, WHOIS, and IP geolocation lookups.
resolve_dns: Look up DNS records (A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA) for a domain via DNS-over-HTTPS, returning answer records and TTL values.reverse_dns: Resolve an IPv4 or IPv6 address to its hostname via PTR record lookup.whois_domain: Retrieve structured domain registration info (registrar, dates, status, etc.) using RDAP, the modern WHOIS replacement.geo_ip: Geolocate a public IPv4 or IPv6 address to get its country, city, ASN, and ISP (private/reserved ranges are rejected).
Allows DNS resolution using Google's DNS-over-HTTPS API, supporting A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA records and reverse DNS lookups.
dns-mcp
A Model Context Protocol server that lets any MCP client (Claude Desktop, Claude Code, Cursor, etc.) do DNS, WHOIS, and IP geolocation lookups mid-conversation.
Ask Claude "why is foo.com unreachable from Tokyo?" and it can actually dig the records, check the WHOIS, and geo-locate the IP without leaving the chat.
Features
resolve_dns— forward lookup via DNS-over-HTTPS (A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA)reverse_dns— PTR lookup for IPv4 or IPv6whois_domain— structured registration info via RDAP (modern WHOIS)geo_ip— country / city / ASN / ISP for a public IPBulk / zone transfer queries
DNSSEC validation output
Local cache (reduce repeated upstream calls)
No API keys required. All four tools hit public free endpoints:
Tool | Upstream |
|
|
|
|
|
|
Related MCP server: intodns-mcp
Quick Start
Install
pipx install dns-mcp
# or
uv tool install dns-mcpClaude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"dns": {
"command": "dns-mcp"
}
}
}Restart Claude Desktop; the four tools should show up in the tool menu.
Claude Code
claude mcp add dns dns-mcpCodex CLI
Add to ~/.codex/config.toml:
[mcp_servers.dns]
command = "dns-mcp"Restart Codex. The four tools are then available in any Codex session.
Run from source
git clone https://github.com/r0bin2u/dns-mcp && cd dns-mcp
uv sync
uv run dns-mcpExample Prompts
"What are github.com's A and MX records?"
"Who registered cloudflare.com and when does it expire?"
"Geolocate 140.82.121.4 — which country and ISP?"
"My users in Tokyo say foo.com is slow. Resolve it, then geo-locate the IP."
"I got an email from support@paypa1-security.com. Is that domain suspicious?"
Development
uv sync
uv run pytest
uv run ruff check .Interactive debugging with the MCP Inspector:
npx @modelcontextprotocol/inspector uv run dns-mcpA note on ip-api.com
The free tier of ip-api.com requires HTTP (not HTTPS). This is fine for geolocating arbitrary public IPs — no credentials are sent — but it means the request is visible on the wire. If that's a concern in your environment, swap in a HTTPS alternative (e.g. ipwho.is, ipinfo.io with a token) by editing IPGEO_URL in src/dns_mcp/__init__.py.
License
MIT — see 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. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
geo_ip - First observed
resolve_dns - First observed
reverse_dns - First observed
whois_domain
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Public MCP server for summaries, DNS lookup, catalog, replies, and JSON checks.
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.5593MIT
- AlicenseAqualityAmaintenanceMCP 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.451192MIT
- AlicenseAqualityBmaintenanceMCP server for live IP and domain reputation checks via DNS lookups, providing abuse scores and network type without requiring an API key.2MIT
- FlicenseNot gradedqualityCmaintenanceFastMCP server for DNS lookups and WHOIS domain research. It supports multiple record types and comprehensive domain investigation including parallel lookups and reverse IP resolution.-
Appeared in Searches
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/r0bin2u/dns-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server