WHOIS MCP Server

WHOIS MCP Server

A Python-based server that provides tools for querying domain WHOIS information through the Chinaz API. It enables Claude and other MCP clients to retrieve domain registration details using standardized tools.

Category
Visit Server

README

WHOIS MCP Server

PyPI version Python 3.8+ License: MIT

一个基于 Python 和模型上下文协议(MCP)实现的 WHOIS 查询服务器。提供 MCP 工具来查询域名的 WHOIS 信息。

功能特点

  • 🌐 域名 WHOIS 信息查询
  • 🔧 基于 FastMCP 框架
  • 📡 支持 Chinaz API 接口
  • 🛡️ 内置输入验证和错误处理
  • 🚀 支持多种传输协议(stdio/sse)

快速开始

安装

pip install whois-mcp-server

使用

命令行方式

# 启动 MCP 服务器
whois-mcp-server

Python 代码方式

from whois_mcp.__main__ import whois_query

# 查询域名 WHOIS 信息
result = whois_query("example.com")
print(result)

MCP 工具文档

whois_query

查询指定域名的 WHOIS 信息。

参数

  • domain (str): 要查询的域名,如 "example.com"

返回格式

{
  "code": 0,
  "message": "success",
  "data": {
    // WHOIS 查询结果
  }
}

使用示例

from whois_mcp.__main__ import whois_query

# 查询 qq.com 的 WHOIS 信息
result = whois_query("qq.com")
if result["code"] == 0:
    print("查询成功:", result["data"])
else:
    print("查询失败:", result["message"])

环境配置

API Key 设置

设置 Chinaz API Key 环境变量:

export TAVILY_API_KEY="your_api_key_here"

或在 Windows 中:

set TAVILY_API_KEY=your_api_key_here

MCP 服务器配置

在 Claude Desktop 中配置

修改您的 claude-desktop-config.json 文件:

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

使用 uvx 运行

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

开发

从源码安装

git clone https://github.com/your-username/whois-mcp-server.git
cd whois-mcp-server
pip install -e .

运行测试

pytest tests/

代码格式化

black whois_mcp/
flake8 whois_mcp/

项目结构

whois-mcp-server/
├── whois_mcp/
│   ├── __init__.py
│   └── __main__.py
├── tests/
│   ├── __init__.py
│   └── test_whois.py
├── pyproject.toml
├── MANIFEST.in
├── LICENSE
└── README.md

依赖项

  • Python 3.8+
  • requests>=2.25.0
  • mcp>=1.0.0
  • fastmcp>=0.1.0

许可证

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。

贡献

欢迎提交 Pull Requests 和 Issues!

在提交代码前,请确保:

  1. 代码符合 PEP 8 规范
  2. 添加适当的测试用例
  3. 更新相关文档

支持

如有问题,请通过 GitHub Issues 提交。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured