Domain Tools (WHOIS + DNS) MCP server

Provides DNS and WHOIS query capabilities for AI assistants. It enables AI models to perform DNS lookups both via local DNS resolvers and remote DNS-over-HTTPS services.
Back to servers
Setup instructions
Provider
Patrick D'appollonio
Release date
May 19, 2025
Stats
7 stars

mcp-domaintools is a Model Context Protocol (MCP) server that provides network and domain analysis capabilities for AI assistants. It enables AI models to perform DNS lookups, WHOIS queries, connectivity testing, TLS certificate analysis, HTTP endpoint monitoring, and hostname resolution, using both local and remote DNS services.

Installation Options

Editor Configuration

Add the following configuration to your editor's settings to use mcp-domaintools:

{
  "mcpServers": {
    "domaintools": {
      "command": "mcp-domaintools",
      "args": [
        // Uncomment and modify as needed:
        // "--remote-server-address=https://your-custom-doh-server.com/dns-query",
        // "--custom-whois-server=whois.yourdomain.com",
        // "--timeout=5s",
        // "--ping-timeout=5s",
        // "--ping-count=4",
        // "--http-ping-timeout=10s",
        // "--http-ping-count=1",
        // "--tls-timeout=10s"
      ],
      "env": {}
    }
  }
}

Using Docker

If you prefer using Docker without installing the binary:

{
  "mcpServers": {
    "domaintools": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/patrickdappollonio/mcp-domaintools:latest"
      ],
      "env": {}
    }
  }
}

Pull and run the Docker image:

docker pull ghcr.io/patrickdappollonio/mcp-domaintools:latest
docker run --rm ghcr.io/patrickdappollonio/mcp-domaintools:latest

For SSE mode with Docker:

docker run --rm -p 3000:3000 ghcr.io/patrickdappollonio/mcp-domaintools:latest --sse --sse-port 3000

Using npm

Install and run via npm:

npm install @patrickdappollonio/mcp-domaintools@latest

Or using npx:

npx -y @patrickdappollonio/mcp-domaintools@latest

Homebrew (macOS and Linux)

brew install patrickdappollonio/tap/mcp-domaintools

Available Tools

Local DNS Query

Performs DNS queries using local OS-defined DNS servers.

Arguments:

  • domain (required): The domain name to query
  • record_type (required): Type of DNS record to query (defaults to A)

Example:

{"domain": "example.com", "record_type": "A"}

Remote DNS Query

Performs DNS queries using remote DNS-over-HTTPS servers.

Arguments:

  • domain (required): The domain name to query
  • record_type (required): Type of DNS record to query (defaults to A)

Example:

{"domain": "example.com", "record_type": "MX"}

WHOIS Query

Performs WHOIS lookups for domain registration information.

Arguments:

  • domain (required): The domain name to query

Example:

{"domain": "example.com"}

Hostname Resolution

Converts a hostname to its corresponding IP addresses.

Arguments:

  • hostname (required): The hostname to resolve
  • ip_version (optional): IP version to resolve (defaults to ipv4)

Example:

{"hostname": "example.com", "ip_version": "both"}

Ping

Performs ICMP ping operations to test connectivity.

Arguments:

  • target (required): The hostname or IP address to ping
  • count (optional): Number of ping packets to send (defaults to 4)

Example:

{"target": "example.com", "count": 10}

HTTP Ping

Tests HTTP endpoints and measures detailed response times.

Arguments:

  • url (required): The URL to ping
  • method (optional): HTTP method to use (defaults to GET)
  • count (optional): Number of HTTP requests to send (defaults to 1)

Example:

{"url": "https://api.github.com/users/octocat", "method": "GET", "count": 3}

TLS Certificate Check

Analyzes TLS certificate validity, expiration, and chain structure.

Arguments:

  • domain (required): The domain name to check
  • port (optional): Port to connect to (defaults to 443)
  • include_chain (optional): Whether to include the full certificate chain (defaults to true)
  • check_expiry (optional): Whether to check certificate expiration (defaults to true)
  • server_name (optional): Server name for SNI

Example:

{"domain": "example.com", "port": 443, "include_chain": true}

Running Modes

Standard Mode (stdio)

Default mode for integration with editors and tools:

mcp-domaintools

Server-Sent Events (SSE) Mode

Run as an HTTP server with SSE support:

mcp-domaintools --sse --sse-port=3000

Configuration Options

General Options

  • --timeout=DURATION: Timeout for DNS queries (default: 5s)
  • --remote-server-address=URL: Custom DNS-over-HTTPS server address
  • --custom-whois-server=ADDRESS: Custom WHOIS server address

Ping Options

  • --ping-timeout=DURATION: Timeout for ping operations (default: 5s)
  • --ping-count=NUMBER: Default number of ping packets (default: 4)

HTTP Ping Options

  • --http-ping-timeout=DURATION: Timeout for HTTP ping operations (default: 10s)
  • --http-ping-count=NUMBER: Default number of HTTP requests (default: 1)

TLS Options

  • --tls-timeout=DURATION: Timeout for TLS certificate checks (default: 10s)

SSE Server Options

  • --sse: Enable SSE server mode
  • --sse-port=PORT: Port to listen on (default: 3000)

Advanced Configuration Examples

# Use custom DNS-over-HTTPS server
mcp-domaintools --remote-server-address=https://dns.quad9.net/dns-query

# Use custom WHOIS server
mcp-domaintools --custom-whois-server=whois.custom.com

# Combine multiple options
mcp-domaintools \
  --timeout=10s \
  --ping-timeout=3s \
  --ping-count=3 \
  --http-ping-timeout=15s \
  --http-ping-count=2 \
  --tls-timeout=30s

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "dns" '{"command":"mcp-domaintools","args":[],"env":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "dns": {
            "command": "mcp-domaintools",
            "args": [],
            "env": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "dns": {
            "command": "mcp-domaintools",
            "args": [],
            "env": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later