WhoisXML API MCP Server
WhoisXML API
Docker Container
WhoisXML API
Docker Container
  • Introduction
  • Quickstart
  • Installation Guide
    • Docker Installation
    • npx Installation
    • Binary Installation
  • AI Client Configuration
    • Claude Desktop
    • Claude Code
    • Cursor
    • Gemini
    • Microsoft Security Copilot
  • Prerequisites
    • Docker Installation & Usage
    • Node.js Usage Guide
  • Reference
    • Server Configuration Reference
    • Tools Reference
    • HTTP Server Mode
  • Troubleshooting
    • Docker Troubleshooting
    • npx Troubleshooting
    • Binary Troubleshooting
    • AI Client Troubleshooting
    • HTTP Debugging & Troubleshooting
  • Downloads

Server Configuration Reference

This guide explains all the ways you can configure the WhoisXML API MCP Server, including which command-line flags and environment variables you can use, plus examples for different ways to set it up.

Command-Line Flags

The MCP server accepts the following command-line flags:

  • --api-base-url

    • Type: string
    • Default: https://www.whoisxmlapi.com
    • Description: Custom API base URL for WhoisXMLAPI service
    • Example: --api-base-url https://api.custom.com
  • --timeout

    • Type: duration
    • Default: 10s
    • Description: Timeout for API requests to WhoisXMLAPI
    • Example: --timeout 30s
  • --disabled-tools

    • Type: string
    • Default: (none)
    • Description: Comma-separated list of tools to disable
    • Example: --disabled-tools threat_intelligence,reverse_whois
  • --http

    • Type: boolean
    • Default: false
    • Description: Enable HTTP server mode with streamable HTTP transport
    • Example: --http
  • --http-port

    • Type: integer
    • Default: 3000
    • Description: Port for HTTP server (when --http is enabled)
    • Example: --http-port 8080
  • --defer-loading

    • Type: boolean
    • Default: false
    • Description: Mark all tools except tool_search with defer_loading for dynamic tool discovery. Requires tool_search to be enabled
    • Example: --defer-loading
  • --help

    • Type: boolean
    • Default: false
    • Description: Display help information
    • Example: --help
  • --version

    • Type: boolean
    • Default: false
    • Description: Display version information
    • Example: --version

Usage Examples

Basic usage:

# Use with environment variable
WHOISXMLAPI_TOKEN=your-token mcp-whoisxmlapi

# Custom timeout
mcp-whoisxmlapi --timeout 30s

# Disable specific tools
mcp-whoisxmlapi --disabled-tools threat_intelligence,reverse_whois

# Enable HTTP server mode
mcp-whoisxmlapi --http --http-port 3000

Docker usage:

# Basic Docker with flags
docker run --rm -e WHOISXMLAPI_TOKEN=your-token \
  whoisxmlapidotcom/mcp-whoisxmlapi:v1 \
  --timeout 30s --disabled-tools threat_intelligence

# HTTP mode with Docker
docker run --rm -p 3000:3000 \
  -e WHOISXMLAPI_TOKEN=your-token \
  whoisxmlapidotcom/mcp-whoisxmlapi:v1 \
  --http --http-port 3000

npx usage (recommended):

# Using npx (no installation required)
npx @whoisxmlapidotcom/mcp-whoisxmlapi --timeout 30s

# Always runs latest version
npx @whoisxmlapidotcom/mcp-whoisxmlapi --timeout 30s --http

Environment Variables

Environment variables provide an alternative way to configure the server and are often preferred for sensitive information like API tokens.

Required Variables

  • WHOISXMLAPI_TOKEN
    • Description: Your WhoisXMLAPI authentication token
    • Type: string
    • Example: "wxt-abc123def456..."

Optional Variables

  • WHOISXMLAPI_HTTP_DEBUG

    • Description: Path to debug log file for HTTP request/response logging. Use "stderr" or "-" to log to stderr instead of a file.
    • Type: string
    • Default: (none)
    • Example: "/tmp/whoisxmlapi-debug.log" or "stderr" or "-"
  • WHOISXMLAPI_TOOL_SETS

    • Description: Default named tool set or sets for connections that do not pick one: core, security, brand, sales or all, comma-separated (the union). An unknown name stops the server at start. See Tool sets
    • Type: string
    • Default: none (every tool)
  • WHOISXMLAPI_DISABLED_TOOLS

    • Description: Comma-separated list of tools to disable
    • Type: string
    • Default: (none)
    • Example: "threat_intelligence,reverse_whois"
  • WHOISXMLAPI_TIMEOUT

    • Description: API request timeout (alternative to --timeout flag)
    • Type: duration
    • Default: 10s
    • Example: "30s"
  • WHOISXMLAPI_FULL_ANSWERS

    • Description: Restores the full answers that were the defaults before the lean-answer change. Unset, the server sends shorter answers: whois leaves out raw registry and registrar text, subdomain_lookup returns 50 rows per page and domain_and_subdomain_discovery returns 100 names per page (both when the cache is on), subdomain_lookup also shows a domain's whole set, when one request holds it, most recently seen first, dns_history, domain_info and ip_netblocks leave out empty fields, ssl_certificates adds a storedCopyNote to a stored certificate saying when it was fetched, and account_balance lists only products that have credits or that a tool on this server uses. Set to 1, true or yes and every one of those goes back to its earlier behaviour. Each can also be restored for one call: remove_raw_text: false (whois), limit (subdomain_lookup, up to 500; domain_and_subdomain_discovery, up to 10000) and order: "name" (subdomain_lookup), include_empty: true (dns_history, domain_info, ip_netblocks), use_fresh_data: true (ssl_certificates: the certificate the site serves now, no note), all_products: true (account_balance).
    • Type: string ("true", "1" or "yes" to enable)
    • Default: (none)
    • Example: "true"
  • WHOISXMLAPI_DNS_LOOKUP_RETRY_EMPTY

    • Description: Whether dns_lookup asks an answer with no records once more (a second credit; the answer says noRecords if it is still empty). Set to 0, false or no and a call sends one request unless it passes retry_empty: true; any other value, or unset, keeps the retry. An explicit retry_empty in the call wins. Read on every call.
    • Type: string ("0", "false" or "no" to turn the retry off)
    • Default: (none: the retry is on)
    • Example: "false"
  • WHOISXMLAPI_DNS_HISTORY_MAX_PAGES

    • Description: The most requests one dns_history call makes (each costs 5 credits) when its pages argument asks for several. A whole number from 1 to 20; 1 keeps every call at one request, and a call asking for more reads one page and says "server page limit" in paging.stopped. Any other value keeps 20. Read on every call.
    • Type: integer (1 to 20)
    • Default: 20
    • Example: "1"
  • WHOISXMLAPI_CACHE_HINT_TTL_MS

    • Description: How long, in milliseconds, clients on protocol version 2026-07-28 and later may reuse a list or reference answer (ttlMs, always with the private scope). Unset, tools/list gets 300000 (5 minutes) and prompts/list, resources/list and resources/read get 3600000 (1 hour). Set to 0 to send ttlMs: 0 on every request, as before the hints existed; any other whole number of milliseconds replaces both figures. A negative or non-numeric value keeps the defaults. Read at start. See Cache hints.
    • Type: integer (milliseconds)
    • Default: (none: 300000 for tools/list, 3600000 for the others)
    • Example: "0"
  • WHOISXMLAPI_DEFER_LOADING

    • Description: Mark all tools except tool_search with defer_loading for dynamic tool discovery. Requires tool_search to be enabled
    • Type: string ("true" or "1" to enable)
    • Default: (none)
    • Example: "true"

Environment Variable Priority

Command-line flags take precedence over environment variables. For example, --timeout 30s will override WHOISXMLAPI_TIMEOUT=20s.

Setting Environment Variables

Shell (Linux/macOS):

# Temporary (current session only)
export WHOISXMLAPI_TOKEN="your-token-here"
export WHOISXMLAPI_HTTP_DEBUG="/tmp/whoisxmlapi-debug.log"  # or "stderr" to log to stderr
export WHOISXMLAPI_TIMEOUT="30s"

# Permanent (add to ~/.bashrc, ~/.zshrc, or ~/.profile)
echo 'export WHOISXMLAPI_TOKEN="your-token-here"' >> ~/.bashrc
echo 'export WHOISXMLAPI_HTTP_DEBUG="/tmp/debug.log"' >> ~/.bashrc
source ~/.bashrc

Windows:

# PowerShell (temporary)
$env:WHOISXMLAPI_TOKEN="your-token-here"
$env:WHOISXMLAPI_HTTP_DEBUG="C:\temp\debug.log"

# Command Prompt (temporary)
set WHOISXMLAPI_TOKEN=your-token-here
set WHOISXMLAPI_HTTP_DEBUG=C:\temp\debug.log

# Permanent: Use System Properties > Environment Variables

Docker:

# Using -e flag
docker run --rm -i \
  -e WHOISXMLAPI_TOKEN=your-token-here \
  -e WHOISXMLAPI_HTTP_DEBUG=/tmp/debug.log \
  -e WHOISXMLAPI_TIMEOUT=30s \
  whoisxmlapidotcom/mcp-whoisxmlapi:v1

MCP Client Configuration Examples

These examples show how to configure the MCP server in various AI clients using different installation methods.

Docker Configuration (Recommended)

Basic Docker setup:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--env", "WHOISXMLAPI_TOKEN",
        "whoisxmlapidotcom/mcp-whoisxmlapi:v1"
      ],
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here"
      }
    }
  }
}

Docker with advanced options:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--memory=512m",
        "--cpus=1.0",
        "--env", "WHOISXMLAPI_TOKEN",
        "--env", "WHOISXMLAPI_HTTP_DEBUG",
        "--env", "WHOISXMLAPI_DISABLED_TOOLS",
        "-v", "/tmp:/tmp",
        "whoisxmlapidotcom/mcp-whoisxmlapi:v1",
        "--timeout", "30s"
      ],
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here",
        "WHOISXMLAPI_HTTP_DEBUG": "/tmp/whoisxmlapi-debug.log",
        "WHOISXMLAPI_DISABLED_TOOLS": "threat_intelligence"
      }
    }
  }
}

npx Configuration (Recommended)

Using npx (no installation required):

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "npx",
      "args": [
        "-y",
        "@whoisxmlapidotcom/mcp-whoisxmlapi"
      ],
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here"
      }
    }
  }
}

Why npx?

  • No installation required - Runs directly without package management
  • Always latest version - Automatically fetches the current release
  • Zero maintenance - No updates or dependency management needed

Alternative: Using global installation:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "mcp-whoisxmlapi",
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here"
      }
    }
  }
}

npx with custom options:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "npx",
      "args": [
        "-y",
        "@whoisxmlapidotcom/mcp-whoisxmlapi",
        "--timeout", "30s",
        "--disabled-tools", "threat_intelligence"
      ],
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here",
        "WHOISXMLAPI_HTTP_DEBUG": "/tmp/debug.log"
      }
    }
  }
}

Binary Configuration

Basic binary setup:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "/usr/local/bin/mcp-whoisxmlapi",
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here"
      }
    }
  }
}

Binary with custom options:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "/usr/local/bin/mcp-whoisxmlapi",
      "args": [
        "--timeout", "30s",
        "--disabled-tools", "threat_intelligence,reverse_whois",
        "--api-base-url", "https://custom-api.example.com"
      ],
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here",
        "WHOISXMLAPI_HTTP_DEBUG": "/tmp/whoisxmlapi-debug.log"
      }
    }
  }
}

Use Absolute Paths

Always use absolute paths for binary installations (e.g., /usr/local/bin/mcp-whoisxmlapi) rather than relative paths or just the binary name.

Tool Management

Disabling Specific Tools

You can disable specific tools to reduce functionality, improve startup performance, or work around client limitations.

Why Disable Tools?

  • Some MCP clients have limits on the number of tools (usually thirty to forty)
  • Reduce memory usage and startup time
  • Disable tools not relevant to your use case
  • Troubleshoot specific tool-related issues

Available tool names: See Tools Reference for the complete list.

Methods to disable tools:

  1. Environment variable:

    WHOISXMLAPI_DISABLED_TOOLS="threat_intelligence,reverse_whois,whois_history"
    
  2. Command-line flag:

    mcp-whoisxmlapi --disabled-tools threat_intelligence,reverse_whois
    

Configuration examples:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "mcp-whoisxmlapi",
      "args": ["--disabled-tools", "threat_intelligence,reverse_whois"],
      "env": {
        "WHOISXMLAPI_TOKEN": "your-token",
        "WHOISXMLAPI_DISABLED_TOOLS": "whois_history"
      }
    }
  }
}

Deferred Loading (Tool Search)

By default, the server registers all 41 API tools with your MCP client at startup. When you enable deferred loading with the --defer-loading flag, the server only registers a single lightweight tool_search tool instead. Your AI client then uses tool_search to dynamically discover and load the specific tools it needs on demand.

Why Use Deferred Loading?

  • Reduced context usage — only the tools actually needed are loaded into the AI's context window
  • Works well with tool limits — clients that cap the number of tools won't be overwhelmed
  • No change to functionality — all 41 API tools remain available, they're just discovered on demand

Methods to enable deferred loading:

  1. Command-line flag:

    mcp-whoisxmlapi --defer-loading
    
  2. Environment variable:

    WHOISXMLAPI_DEFER_LOADING=true
    

Configuration examples:

Using npx:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "npx",
      "args": [
        "-y",
        "@whoisxmlapidotcom/mcp-whoisxmlapi",
        "--defer-loading"
      ],
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here"
      }
    }
  }
}

Using Docker:

{
  "mcpServers": {
    "whoisxmlapi": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--env", "WHOISXMLAPI_TOKEN",
        "whoisxmlapidotcom/mcp-whoisxmlapi:v1",
        "--defer-loading"
      ],
      "env": {
        "WHOISXMLAPI_TOKEN": "your-api-token-here"
      }
    }
  }
}

Client Compatibility

Deferred loading requires an MCP client that supports the defer_loading tool annotation. Compatible clients include Claude Code and other clients that implement MCP tool annotations. Clients that don't support this annotation will still see all tools registered normally.

HTTP Server Mode

For web applications or multiple client scenarios:

# Enable HTTP mode
mcp-whoisxmlapi --http --http-port 3000

# Docker HTTP mode
docker run --rm -p 3000:3000 \
  -e WHOISXMLAPI_TOKEN=your-token \
  whoisxmlapidotcom/mcp-whoisxmlapi:v1 \
  --http --http-port 3000

For complete HTTP server configuration details, see HTTP Server Mode.

Security Considerations

API Token Security

  • Never commit tokens to version control
  • Use environment variables for token storage
  • Rotate tokens regularly for enhanced security
  • Use separate tokens for different environments (dev/staging/prod)

Container Security (Docker)

  • No filesystem access by default - container is isolated
  • Limited environment - only explicitly passed variables are available
  • Network isolation - only internet access for API calls
  • Volume mounts - only mount necessary directories for debugging

Validation and Testing

Verify Configuration

# Test server startup
mcp-whoisxmlapi --help

# Test with token
WHOISXMLAPI_TOKEN=your-token mcp-whoisxmlapi --help

# Test specific configuration
docker run --rm -e WHOISXMLAPI_TOKEN=your-token \
  whoisxmlapidotcom/mcp-whoisxmlapi:v1 \
  --timeout 5s --disabled-tools threat_intelligence

Configuration Validation

Most configuration issues are JSON syntax errors:

# Validate JSON configuration
python -m json.tool your-config.json
# or
jq . your-config.json

Remove tokens

Whenever sharing configuration files, remove the WHOISXMLAPI_TOKEN before validating with online tools.

Related Documentation

Installation and Setup

  • Installation Guide - Choose installation method
  • AI Client Configuration - Client-specific setup
  • Tools Reference - Available tools and usage

Advanced Features

  • HTTP Server Mode - Streamable HTTP transport configuration
  • HTTP Debugging - Request/response logging

Troubleshooting

  • General Troubleshooting - Common issues
  • Docker Troubleshooting - Container issues
  • npx Troubleshooting - npx and Node.js issues
  • Binary Troubleshooting - Binary installation issues
Last Updated: 11/24/26, 3:00 AM
Next
Tools Reference