Sponsored by Deepsite.site

WHOIS MCP

Created By
ASJordi8 months ago
MCP Server for whois lookups
Content

WHOIS MCP

A WHOIS lookup service implemented as a Model Context Protocol (MCP) server.

Overview

WHOIS MCP is a Java application that provides WHOIS lookup functionality through the Model Context Protocol. It allows users to query WHOIS information for domains using a standardized interface. The server communicates over standard input/output, making it compatible with MCP clients.

Demo

https://github.com/user-attachments/assets/037a30de-c330-4dd4-93c2-2add936b9caf

https://github.com/user-attachments/assets/2a91045a-b922-4832-9500-dc9eacb54ee0

https://github.com/user-attachments/assets/befbb1e0-137c-4534-b7f7-433305a41755

Features

  • Domain validation and sanitization
  • Caching of WHOIS server information
  • Fallback to IANA WHOIS server when specific servers are not found
  • Comprehensive error handling
  • Integration with the Model Context Protocol

Installation

Prerequisites

  • Java 21 or higher
  • Maven 3.6 or higher

Building the Project

  1. Clone the repository:

    git clone https://github.com/asjordi/whois-mcp.git
    cd whois-mcp
    
  2. Build with Maven:

    mvn clean package
    

This will create an executable JAR file in the target directory.

  1. You can open the project in your favorite IDE (e.g., IntelliJ IDEA, Eclipse) for easier development and debugging.

Debugging the Server

To debug the server, you can use the MCP Inspector.

  1. First build the project with:
mvn clean package
  1. Run the MCP Inspector with the following command:
npx @modelcontextprotocol/inspector
  1. Set the following values:
  • Transport: STDIO
  • Command: java
  • Arguments: -jar PATH\\target\\whois-mcp-1.0-SNAPSHOT.jar
  1. Click on the Connect button to start the MCP Inspector and connect to the server.

Usage

Once configured, the WHOIS MCP server will be automatically available to any MCP client that supports the protocol.

Claude

Go to Menu > File > Settings > Developer > Edit Config and add the following to your claude_desktop_config.json file:

{
   "mcpServers": {
      "whois-mcp-server": {
         "command": "java",
         "args": [
            "-jar",
            "PATH\\target\\whois-mcp-1.0-SNAPSHOT.jar"
         ]
      }
   }
}

Save the file and restart the application. You can now use the WHOIS MCP server by sending requests to it.

VSCode

Open settings.json and add the following configuration:

"mcp": {
 "servers": {
   "whois-mcp-server": {
     "type": "stdio",
     "command": "java",
     "args": [
       "-jar",
       "PATH\\whois-mcp\\target\\whois-mcp-1.0-SNAPSHOT.jar"
     ]
   }
 }
}

Save the file and restart the application. Open Copilot and set mode to Agent to use the WHOIS MCP server.

Project Structure

The project is structured around the following key components:

Main Components

  • Main: Entry point of the application that initializes and starts the MCP server.
  • WhoisService: Core service that performs WHOIS queries using the Apache Commons Net library.
  • WhoisCache: Caches WHOIS server information based on domain extensions.
  • DomainValidatorUtil: Validates domain names using the Apache Commons Validator.
  • DomainSanitizer: Sanitizes domain names by removing unnecessary characters and ensuring proper formatting.
  • McpException: Custom exception class for handling errors specific to the WHOIS MCP server.

Flow

  1. The MCP server receives a request with a domain name.
  2. The domain is validated and sanitized.
  3. The appropriate WHOIS server is determined from the cache based on the domain extension.
  4. A WHOIS query is performed against the server.
  5. The result is returned to the client through the MCP protocol.

Whois Server Mapping

WHOIS server mappings are configured in the whois-servers.properties file, which maps top-level domains to their respective WHOIS servers. If this file is not available, a default set of servers is used.

Dependencies

  • Model Context Protocol SDK: For implementing the MCP server
  • SLF4J: For logging
  • Apache Commons Net: For WHOIS client functionality
  • Apache Commons Validator: For domain validation
  • JUnit Jupiter: For testing

Testing

The project includes comprehensive unit tests for all components. Run the tests with:

mvn test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Jordi Ayala - asjordi.dev

Root Zone Database

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Amap Maps高德地图官方 MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Tavily Mcp
Playwright McpPlaywright MCP server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
DeepChatYour AI Partner on Desktop
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.