home / mcp / whois mcp server

WHOIS MCP Server

A Python-based MCP server that serves WHOIS queries and exposes MCP tools to fetch domain WHOIS information.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ahooop-whois_mcp_server": {
      "command": "whois-mcp-server",
      "args": [],
      "env": {
        "TAVILY_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

You can query domain WHOIS information through a Python-based MCP server that exposes a simple toolset you can call from your MCP client or directly in code. This server handles input validation and supports multiple transport methods, making it easy to integrate into your workflows.

How to use

You can run the MCP server from the command line to start handling requests. Start it with the provided binary and then connect with your MCP client to perform WHOIS lookups. Alternatively, you can use the built-in Python tool to fetch WHOIS data programmatically by calling the query function from your own code.

How to install

pip install whois-mcp-server

Verify the installation by listing the installed package and running a quick import test in Python.

Additional sections

Environment variable for external API access: set the Chinaz API key in your environment to enable API-backed WHOIS data sources. Use one of the following depending on your operating system.

export TAVILY_API_KEY="your_api_key_here"
set TAVILY_API_KEY=your_api_key_here

MCP configuration examples show two local (stdio) options you can use to run the server from an MCP client or an orchestration tool. These configurations are self-contained and do not require a remote URL.

{
  "mcpServers": {
    "whoismcp": {
      "command": "whois-mcp-server"
    }
  }
}

If you prefer to launch through an orchestration wrapper like uvx, use the following setup.

{
  "mcpServers": {
    "whoismcp": {
      "command": "uvx",
      "args": ["whois-mcp-server"]
    }
  }
}

The server provides a programmatic tool called whois_query that you can call from Python to fetch WHOIS data for a given domain.

Security and notes

Ensure you protect the API key and limit access to the MCP endpoints in production. When running locally for testing, use isolated environments or containerized deployments to avoid exposing keys.

Available tools

whois_query

Query a specified domain to retrieve its WHOIS information. Returns a structured result containing a code, message, and data with the WHOIS response.