Skip to main content
Glama

DNS MCP Server

A Python MCP server providing comprehensive DNS lookup capabilities.

Features

  • dns_lookup: Query any DNS record type (A, AAAA, MX, TXT, NS, SOA, CNAME, SRV, CAA, DNSSEC records)

  • dns_reverse: Reverse DNS lookup (PTR) for IPv4/IPv6 addresses

  • dns_bulk: Query multiple domains in one call

  • dns_reverse_bulk: Reverse lookup for multiple IPs

Related MCP server: BasicSec MCP Server

Quick Start

docker compose up -d

The server will be available at https://localhost:8088/mcp.

Self-signed certificates are automatically generated on first startup.

Configuration

Environment variables:

Variable

Default

Description

HTTPS_PORT

8088

External HTTPS port

DOMAIN

localhost

Domain for certificate generation

MCP_HOST

0.0.0.0

Server bind address

MCP_PORT

8000

Server port

DNS_TIMEOUT

5

Query timeout in seconds

DNS_RETRIES

3

Max retry attempts

DEFAULT_RESOLVER

(system)

Default DNS resolver IP

LOG_LEVEL

INFO

Logging level

Claude Desktop Integration

To use this server with Claude Desktop, you'll need mcp-proxy to bridge the HTTP transport.

1. Install mcp-proxy

pip install mcp-proxy
# or
uv tool install mcp-proxy

2. Start the server

docker compose up -d

3. Configure Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "dns-lookup": {
      "command": "mcp-proxy",
      "args": [
        "--transport=streamablehttp",
        "--no-verify-ssl",
        "https://localhost:8088/mcp"
      ]
    }
  }
}

Note: Use the full path to mcp-proxy if Claude shows ENOENT errors (run which mcp-proxy to find it).

4. Restart Claude Desktop

The DNS tools will now be available in Claude Desktop.

Available Tools

Tool

Description

dns_lookup

Query DNS records (A, AAAA, MX, TXT, NS, etc.)

dns_reverse

Reverse DNS lookup for an IP address

dns_bulk

Query multiple domains at once

dns_reverse_bulk

Reverse lookup for multiple IPs

Development

Setup

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Run tests

pytest

Run locally (stdio mode)

dns-mcp-server

Run locally (HTTP mode)

dns-mcp-server-http

License

MIT

Available Tools

4 tools
dns_bulkB

Query DNS records for multiple domains in one call.

Inputs: queries (required), resolver.

dns_lookupA

Query DNS records for a domain. Supports all record types including DNSSEC.

Inputs: domain (required), resolver, record_types.

dns_reverseC

Reverse DNS lookup (PTR) for an IP address.

Inputs: ip (required), resolver.

dns_reverse_bulkA

Reverse DNS lookup for multiple IP addresses.

Inputs: ips (required), resolver.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: single forward lookup, single reverse lookup, bulk forward lookup, and bulk reverse lookup. There is no overlap between them, and an agent can easily choose the right one based on the operation and cardinality.

    Naming Consistency4/5

    The naming follows a predictable pattern: 'dns_' prefix with an action and optional '_bulk' suffix. However, 'dns_bulk' deviates from the pattern used by 'dns_lookup' — a more consistent name would be 'dns_lookup_bulk'.

    Tool Count5/5

    Four tools is well-scoped for a DNS lookup server. The set covers the essential operations without unnecessary bloat.

    Completeness5/5

    The domain is DNS queries, and the tools cover both forward and reverse lookups in singular and bulk forms. All record types are supported, including DNSSEC, so there are no obvious gaps for a read-only DNS lookup server.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables comprehensive DNS operations including lookups for various record types, reverse DNS queries, batch processing, and DNS resolution tracing. Supports multiple DNS servers with configurable caching and robust error handling.
      4
      11 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables DNS and email security analysis through passive and active scanning capabilities. Provides comprehensive domain security checks including SPF, DMARC, DNSSEC validation, MX record analysis, and SMTP connectivity testing.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Provides comprehensive tools for real-time DNS queries across 53 record types, global propagation checks, and SSL certificate analysis. It also enables domain security scans for SPF/DKIM/DMARC configurations and HTTP uptime monitoring.
      8
      89 npm
      23
      Apache 2.0
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      A comprehensive DNS query server that enables querying all types of DNS records, including A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, CAA, and DNSSEC checks, as well as advanced tools like WHOIS-style lookup and DNS delegation tracing.
      1
      -