Skip to main content
Glama

dns-mcp

Mentioned in Awesome MCP Servers r0bin2u/dns-mcp MCP server

Сервер Model Context Protocol, который позволяет любому MCP-клиенту (Claude Desktop, Claude Code, Cursor и т. д.) выполнять DNS, WHOIS и IP-геолокацию прямо во время диалога.

Спросите Claude: "почему foo.com недоступен из Токио?", и он сможет получить записи, проверить WHOIS и определить геолокацию IP, не покидая чат.

Функции

  • [x] resolve_dns — прямой поиск через DNS-over-HTTPS (A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA)

  • [x] reverse_dns — PTR-запрос для IPv4 или IPv6

  • [x] whois_domain — структурированная информация о регистрации через RDAP (современный WHOIS)

  • [x] geo_ip — страна / город / ASN / ISP для публичного IP

  • [ ] Массовые запросы / передача зон

  • [ ] Вывод проверки DNSSEC

  • [ ] Локальный кэш (для сокращения повторных запросов к вышестоящим серверам)

API-ключи не требуются. Все четыре инструмента обращаются к публичным бесплатным конечным точкам:

Инструмент

Вышестоящий сервис

resolve_dns, reverse_dns

dns.google (DNS-over-HTTPS, JSON)

whois_domain

rdap.org (RDAP bootstrap, перенаправляет в реестр TLD)

geo_ip

ip-api.com (HTTP, бесплатный уровень 45 запросов/мин)

Related MCP server: intodns-mcp

Быстрый старт

Установка

pipx install dns-mcp
# or
uv tool install dns-mcp

Claude Desktop

Добавьте в claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):

{
  "mcpServers": {
    "dns": {
      "command": "dns-mcp"
    }
  }
}

Перезапустите Claude Desktop; четыре инструмента должны появиться в меню инструментов.

Claude Code

claude mcp add dns dns-mcp

Codex CLI

Добавьте в ~/.codex/config.toml:

[mcp_servers.dns]
command = "dns-mcp"

Перезапустите Codex. После этого четыре инструмента станут доступны в любой сессии Codex.

Запуск из исходного кода

git clone https://github.com/r0bin2u/dns-mcp && cd dns-mcp
uv sync
uv run dns-mcp

Примеры запросов

  • "Какие A и MX записи у github.com?"

  • "Кто зарегистрировал cloudflare.com и когда истекает срок регистрации?"

  • "Определи геолокацию 140.82.121.4 — какая страна и провайдер?"

  • "Мои пользователи в Токио говорят, что foo.com работает медленно. Разреши его, а затем определи геолокацию IP."

  • "Я получил письмо от support@paypa1-security.com. Этот домен подозрительный?"

Разработка

uv sync
uv run pytest
uv run ruff check .

Интерактивная отладка с помощью MCP Inspector:

npx @modelcontextprotocol/inspector uv run dns-mcp

Примечание о ip-api.com

Бесплатный уровень ip-api.com требует использования HTTP (не HTTPS). Это подходит для геолокации произвольных публичных IP-адресов — учетные данные не передаются — но означает, что запрос виден в сети. Если это вызывает беспокойство в вашей среде, замените его на HTTPS-альтернативу (например, ipwho.is, ipinfo.io с токеном), отредактировав IPGEO_URL в src/dns_mcp/__init__.py.

Лицензия

MIT — см. LICENSE.

Available Tools

4 tools
geo_ipA

Locate an IP address geographically. Returns country, city, ASN, and ISP.

Args:
    ip: Public IPv4 or IPv6 address. Private/reserved ranges are rejected.
ParametersJSON Schema
NameRequiredDescriptionDefault
ipYes

TDQS

A4.4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
record_typeNoA

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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".
ParametersJSON Schema
NameRequiredDescriptionDefault
ipYes

TDQS

A3.8/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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".
ParametersJSON Schema
NameRequiredDescriptionDefault
domainYes

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

  1. 4 tool updatesv0.1.0
    • First observedgeo_ip
    • First observedresolve_dns
    • First observedreverse_dns
    • First observedwhois_domain

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool addresses a distinct DNS function: geolocation, forward resolution, reverse resolution, and registration lookup. No overlapping purposes.

Naming Consistency5/5

All tools use a consistent verb_noun pattern in snake_case (e.g., geo_ip, resolve_dns), making their intent immediately clear.

Tool Count5/5

Four tools is well-scoped for a DNS utility server—enough to cover essential operations without redundancy or clutter.

Completeness4/5

The set provides forward/reverse DNS, geolocation, and WHOIS. Missing advanced features like bulk queries or DNSSEC validation, but core workflows are complete.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server for DNS lookups, reverse DNS, WHOIS, and domain checks. Zero auth, zero config.
    5
    47 npm
    3
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    MCP 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.
    45
    100 npm
    2
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    MCP server for live IP and domain reputation checks via DNS lookups, providing abuse scores and network type without requiring an API key.
    2
    MIT