Skip to main content
Glama

dns-mcp

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

모든 MCP 클라이언트(Claude Desktop, Claude Code, Cursor 등)가 대화 중에 DNS, WHOIS 및 IP 지리적 위치 조회를 수행할 수 있도록 하는 Model Context Protocol 서버입니다.

Claude에게 *"왜 foo.com에 도쿄에서 접속할 수 없나요?"*라고 물어보면, 채팅을 나가지 않고도 실제로 레코드를 조회하고, WHOIS를 확인하며, IP의 지리적 위치를 파악할 수 있습니다.

기능

  • [x] resolve_dns — DNS-over-HTTPS를 통한 정방향 조회 (A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA)

  • [x] reverse_dns — IPv4 또는 IPv6에 대한 PTR 조회

  • [x] whois_domain — RDAP(최신 WHOIS)를 통한 구조화된 등록 정보

  • [x] geo_ip — 공용 IP에 대한 국가 / 도시 / ASN / ISP 정보

  • [ ] 대량 / 영역 전송 쿼리

  • [ ] DNSSEC 검증 출력

  • [ ] 로컬 캐시 (반복적인 업스트림 호출 감소)

API 키가 필요하지 않습니다. 네 가지 도구 모두 공개된 무료 엔드포인트를 사용합니다:

도구

업스트림

resolve_dns, reverse_dns

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

whois_domain

rdap.org (RDAP 부트스트랩, 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

예시 프롬프트

  • "github.com의 A 및 MX 레코드는 무엇인가요?"

  • "누가 cloudflare.com을 등록했으며 언제 만료되나요?"

  • "140.82.121.4의 지리적 위치를 파악하세요 — 어느 국가이고 ISP는 어디인가요?"

  • "도쿄에 있는 제 사용자들이 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의 지리적 위치를 파악하는 데는 문제가 없으며(자격 증명이 전송되지 않음), 다만 요청이 네트워크상에서 노출될 수 있습니다. 환경상 이 점이 우려된다면 src/dns_mcp/__init__.py에서 IPGEO_URL을 수정하여 HTTPS 대안(예: ipwho.is, 토큰이 있는 ipinfo.io)으로 교체하십시오.

라이선스

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.

Inputs: ip (required).

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.

Inputs: name (required), record_type.

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".

Inputs: ip (required).

whois_domainA

Look up domain registration info via RDAP (the modern structured WHOIS).

Args:
    domain: Domain name, e.g. "github.com".

Inputs: domain (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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.

    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
      72 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
      160 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