Whois Mcp Server

io.github.cyanheads由 GitHub 账号 cyanheads 发布v0.2.1更新于 Oct 24, 2026

Domain registry records and status, DNS records, and IP/ASN resolution over RDAP and DoH.

概览

AI 生成的概览

通过 RDAP 和 DNS-over-HTTPS 查询域名注册信息、DNS 记录、IP 网段与 ASN,无需 API 密钥。

可以做什么
  • 查询域名注册记录:注册商、创建与到期日期、名称服务器、EPP 状态、DNSSEC,可选附带注册商转介详情
  • 检查域名是否存在注册记录,返回 registered、not_found 或 unknown
  • 通过 DNS-over-HTTPS 获取 DNS 记录(A、AAAA、MX、TXT、NS、CNAME、SOA、CAA、PTR)及 TTL
  • 将 IP 地址或 CIDR 网段解析为组织、国家、滥用联系方式和反向 DNS,可选附带路由信息
  • 将 ASN 解析为组织名称、国家和 RIR
  • 一次调用生成域名档案,把注册信息与 DNS 合并为一条规范化记录
适用场景
适合需要调查域名、IP 或 ASN 的场景:查询域名归属与注册情况、核对 MX 或 CAA 等 DNS 配置、初步研判可疑域名,或把 IP 对应到网络运营方。它只做公开数据的只读查询,适合调研与排障,不涉及修改记录。
运行要求
以 npm 包形式在本地运行,可通过 npx 或 bunx 启动(需 Bun v1.4.0+ 或 Node.js v24+),也可使用 Docker 镜像。无需 API 密钥或账号。需要访问公开的 RDAP、DoH 与 RIPEstat 端点的出站 HTTPS 网络。可选环境变量用于调整超时、重试、传输方式、HTTP 主机与端口及日志级别。
安装前请注意
所有查询均为只读,并会发往公开的第三方服务(IANA bootstrap、注册局与 RIR 的 RDAP 端点、Cloudflare 与 NextDNS 的 DoH、可选的 RIPEstat),因此被查询的域名和 IP 对这些提供方可见。若改用 HTTP 传输,MCP_AUTH_MODE 默认为 none,在暴露到本机之外前应设为 jwt 或 oauth。可用性查询结果并不代表该域名一定可以注册。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Whois Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@cyanheads/whois-mcp-server

Look up domain registration, check registry record status, fetch DNS records, and resolve IPs and ASNs over RDAP and DNS-over-HTTPS via MCP. STDIO or Streamable HTTP.

6 Tools


Overview

Domain and network intelligence via RDAP and DNS-over-HTTPS. Look up domain registrations, check registry record status, fetch DNS records, and resolve IPs and ASNs to their registries. No API key required.

Tools

ToolDescription
whois_lookup_domainFull domain registration record — registrar, created/expiry dates, nameservers, EPP status, DNSSEC, registrant org
whois_check_availabilityCheck registry record presence; missing records do not establish registration eligibility
whois_get_dnsDNS owner records via DNS-over-HTTPS (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, PTR)
whois_lookup_ipIP or CIDR netblock, org, country, abuse contact, and reverse DNS via RIR RDAP
whois_lookup_asnResolve an ASN to its org name, country, and RIR source
whois_get_dossierOne-call domain triage — registration + DNS in parallel, normalized into a single record with factual signals

Capability reference

whois_lookup_domain tool

  • Takes a fully qualified domain name and picks the registry's RDAP server through IANA bootstrap.
  • Returns registrar, dates, nameservers, EPP status, DNSSEC, and registrant_redacted; DNSSEC and privacy stay null when the registry gives no evidence. Fails with rdap_no_coverage, domain_not_found, or rdap_invalid_domain_response (the response doesn't match the queried domain).
  • include_registrar: true follows one registrar RDAP referral and adds registrar_detail (found, no_referral, or failed, plus source URL). Off by default; limited by RDAP_TIMEOUT_MS, and a failure keeps the registry result.

whois_check_availability tool

  • Takes a fully qualified domain name.
  • Returns registration_status: registered | not_found | unknown. available is false for a found registration and null otherwise, never true: a 404 means no record, not that the name can be registered.
  • Known ICANN subdomains return non_registrable_domain with their registrable parent.

whois_get_dns tool

  • Takes an ASCII DNS name (underscore labels like _dmarc.example.com are fine), up to 253 characters with 1–63-character labels. Optional types: A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, PTR; defaults to A, AAAA, MX, TXT, NS.
  • Returns records with TTLs and query_sources: [{type, source}], including empty answers and NXDOMAIN. Legacy source is cloudflare if any query got a successful Cloudflare response, otherwise nextdns.
  • Resolver failure codes and truncated responses return errors after retries and fallback. CAA queries go to NextDNS.

whois_lookup_ip tool

  • Takes an IPv4/IPv6 address with an optional CIDR prefix (0–32 / 0–128). Echoes the original ip.
  • Returns org, country, abuse contact, provider CIDRs in cidrs (cidr only when there is exactly one), and a best-effort reverse DNS lookup: ptr_status: found | not_found | failed, with ptr_source_error on failure while the RDAP data is kept.
  • include_routing: true adds routing (found | not_found | failed) with the RIS-observed prefix and origin_asns, from RIPEstat Network Info. Off by default; a routing failure keeps the RDAP and PTR results.
  • Fails with invalid_ip, ip_not_found, ip_no_rdap_route (no RIR covers the address; not retryable), or private_range for 0.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 255.0.0.0/8, ::1/128, fc00::/7, and fe80::/10.

whois_lookup_asn tool

  • Takes an ASN from 1 to 4294967295, with an optional AS prefix (e.g., AS15169, AS 15169, +15169). Out-of-range numbers fail with invalid_asn.
  • Returns name, org_name, country, rir, start_autnum, and end_autnum; fails with asn_not_found when no record exists.

whois_get_dossier tool

  • Takes a fully qualified domain name and runs the registration and A/MX/NS/TXT lookups in parallel.
  • Returns registration, DNS, domain age, privacy status, and inferred NS/MX providers. A failed lookup leaves the other's data in place and sets rdap_source_error or dns_source_error; both_legs_failed means neither succeeded.
  • A null MX (0 .) means the domain accepts no mail.

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

RDAP / DNS-specific:

  • RDAP over HTTPS — no port-43 TCP dependency
  • IANA bootstrap auto-selection — correct registry RDAP server picked per TLD, RIR, or ASN range; bootstrap JSON cached in-memory for 24h
  • DNS-over-HTTPS via Cloudflare and NextDNS — dual-provider with per-type routing (NextDNS for CAA; Cloudflare for all others) and automatic fallback
  • No API keys required — all sources (IANA, registry RDAP endpoints, RIR RDAP, Cloudflare DoH, NextDNS DoH, optional RIPEstat Network Info) are public and keyless

Agent-friendly output:

  • Coverage signaled two ways — rdap_coverage: false returned as data by whois_check_availability and whois_get_dossier, while whois_lookup_domain throws rdap_no_coverage for the same case
  • Privacy redaction is true when the registry shows it and null when there's no evidence
  • Partial failure model — whois_get_dossier marks a failed lookup with a source_error field and continues; only both failing is an error
  • Factual signals, not scores — age_days, privacy_redacted, ns_provider, mx_provider are real data, not synthesized risk scores

Getting started

No API keys or accounts required. Add the following to your MCP client configuration file.

json
{  "mcpServers": {    "whois-mcp-server": {      "type": "stdio",      "command": "bunx",      "args": ["@cyanheads/whois-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info"      }    }  }}

Or with npx (no Bun required):

json
{  "mcpServers": {    "whois-mcp-server": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@cyanheads/whois-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info"      }    }  }}

Or with Docker:

json
{  "mcpServers": {    "whois-mcp-server": {      "type": "stdio",      "command": "docker",      "args": [        "run", "-i", "--rm",        "-e", "MCP_TRANSPORT_TYPE=stdio",        "ghcr.io/cyanheads/whois-mcp-server:latest"      ]    }  }}

For Streamable HTTP, set the transport and start the server:

sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http# Server listens at http://127.0.0.1:3010/mcp

Prerequisites

  • Bun v1.4.0 or higher (or Node.js v24+).
  • No API keys required — all data sources are public.

Installation

  1. Clone the repository:
sh
git clone https://github.com/cyanheads/whois-mcp-server.git
  1. Navigate into the directory:
sh
cd whois-mcp-server
  1. Install dependencies:
sh
bun install
  1. Configure environment:
sh
cp .env.example .env# All vars are optional — defaults work for most use cases

Configuration

VariableDescriptionDefault
RDAP_TIMEOUT_MSHTTP timeout for RDAP requests in milliseconds.5000
DOH_TIMEOUT_MSHTTP timeout for DNS-over-HTTPS requests in milliseconds.3000
RDAP_MAX_RETRIESMax retry attempts on transient RDAP failures.2
DOH_MAX_RETRIESMax retry attempts on transient DoH failures.2
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for HTTP server.3010
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (RFC 5424).info
OTEL_ENABLEDEnable OpenTelemetry instrumentation.false

See .env.example for the full list of optional overrides.


Running the server

Local development

  • Build and run:

    sh
    bun run rebuildbun run start:stdio# orbun run start:http
  • Run checks and tests:

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker build -t whois-mcp-server .docker run --rm -p 3010:3010 whois-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/whois-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.


Project structure

PathPurpose
src/index.tsEntry point — starts the app.
src/app.tscreateApp() options — registers tools, inits services, declares the session mode.
src/config/Server-specific environment variable parsing and validation (Zod).
src/services/rdap/RDAP client — IANA bootstrap cache, domain/IP/ASN lookup, retry.
src/services/doh/DNS-over-HTTPS client — Cloudflare primary, NextDNS fallback.
src/services/routing/Optional RIPEstat RIS routing observations with a bounded exchange.
src/mcp-server/tools/Tool definitions (*.tool.ts).
tests/Vitest tests mirroring src/.
docs/Design and API reference documents.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging
  • Register new tools via src/app.ts's tools array
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

来源:README.md,提交 104c879

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

5
  1. v0.2.1最新Oct 16, 2026
  2. v0.2.0Oct 13, 2026
  3. v0.1.6Sep 30, 2026
  4. v0.1.5Sep 21, 2026
  5. v0.1.4Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分