whois-mcp-server
Enables domain registration lookup, availability checks, DNS record fetching, and IP/ASN resolution via RDAP and DNS-over-HTTPS through MCP.
README
<div align="center"> <h1>@cyanheads/whois-mcp-server</h1> <p><b>Look up domain registration, check availability, fetch DNS records, and resolve IPs and ASNs via RDAP and DNS-over-HTTPS via MCP. STDIO or Streamable HTTP.</b> <div>6 Tools</div> </p> </div>
<div align="center">
</div>
<div align="center">
</div>
Tools
Six tools covering domain intelligence, DNS, and IP/ASN resolution:
| Tool | Description |
|---|---|
whois_lookup_domain |
Full domain registration record — registrar, created/expiry dates, nameservers, EPP status, DNSSEC, registrant org |
whois_check_availability |
Check whether a domain is registered or available for registration |
whois_get_dns |
DNS records for any hostname via DNS-over-HTTPS (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, PTR) |
whois_lookup_ip |
IP or CIDR netblock, org, country, abuse contact, and reverse DNS via RIR RDAP |
whois_lookup_asn |
Resolve an ASN to its org name, country, and RIR source |
whois_get_dossier |
One-call domain triage — registration + DNS in parallel, normalized into a single record with factual signals |
whois_lookup_domain
Look up a domain's full RDAP registration record.
- RDAP-first via IANA auto-bootstrap — automatically selects the correct registry RDAP server per TLD
- Returns registrar, creation/expiry dates, nameservers, EPP status codes, DNSSEC delegation flag
- Surfaces
registrant_redacted: trueexplicitly when privacy redaction is in effect (standard post-GDPR for gTLDs) - Returns
rdap_coverage: falsefor TLDs without RDAP coverage rather than silently failing - Includes
last_update_of_rdap_dbevent timestamp for data freshness transparency
whois_check_availability
Check whether a domain name is registered or available to register.
- RDAP 404 = available (
available: true) — exploits the RDAP spec's intended behavior - Returns
available: falsewithregistrarandexpiry_datewhen registered - Returns
available: nullwithrdap_coverage: falsefor TLDs without RDAP — cannot determine availability - Optimized for bulk name sweeps — thin response, no unnecessary fields
whois_get_dns
Fetch DNS records via DNS-over-HTTPS.
- Cloudflare
1.1.1.1primary, Google8.8.8.8fallback (used for CAA records where Cloudflare returns raw hex) - Supports A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, PTR — multiple types in one call
- Returns records with TTLs and the resolving source (
cloudflareorgoogle) nxdomain: truein result (not an error) when the domain doesn't exist in DNS
whois_lookup_ip
Look up an IP address or CIDR block via RIR RDAP.
- Auto-routes to the correct RIR (ARIN, RIPE, APNIC, LACNIC, AFRINIC) via IANA IP bootstrap
- Returns netblock CIDR, org name, country, abuse contact email
- Fetches PTR (reverse DNS) via DoH as a best-effort step —
ptr: nullon failure, not an error - Validates and rejects private/reserved ranges (RFC 1918, loopback, link-local) with a clear error
whois_lookup_asn
Resolve an ASN to its org name, country, and RIR.
- Accepts
AS15169or bare integer15169format - Routes to the correct RIR RDAP endpoint via IANA ASN bootstrap
- Returns
name,org,country,rir,start_autnum,end_autnum
whois_get_dossier
One-call domain triage aggregating registration and DNS data in parallel.
- Runs RDAP domain lookup and DoH (A, MX, NS, TXT) in parallel via
Promise.allSettled - Inferred signals:
age_days,privacy_redacted,registrar,ns_provider(from NS records),mx_provider(from MX records) - No synthesized risk scores — factual signals only; the agent decides the verdict
- Partial results surfaced when one leg fails (
source_erroron the failed leg) - Both-legs-fail throws
ServiceUnavailable; individual leg failures are data, not errors
Features
Built on @cyanheads/mcp-ts-core:
- Declarative tool definitions — single file per tool, framework handles registration and validation
- Unified error handling — handlers throw, framework catches, classifies, and formats
- Pluggable auth:
none,jwt,oauth - Swappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1 - Structured logging with optional OpenTelemetry tracing
- STDIO and Streamable HTTP transports
Domain and network intelligence:
- RDAP over HTTPS — no port-43 TCP dependency, runs on Node, Bun, and Cloudflare Workers
- IANA bootstrap auto-selection — correct registry RDAP server picked per TLD, RIR, or ASN range; bootstrap JSON cached (TTL 24h) in tenant state
- DNS-over-HTTPS via Cloudflare and Google — resilient dual-provider with per-type routing (Google for CAA; Cloudflare for all others)
- No API keys required — all sources (IANA, registry RDAP endpoints, RIR RDAP, Cloudflare DoH, Google DoH) are public and keyless
Agent-friendly output:
- Explicit coverage signals —
rdap_coverage: falsetells the agent the TLD lacks RDAP rather than returning a confusing error - Privacy redaction surfaced as a field —
registrant_redacted: truerather than silently absent contact data - Partial failure model —
whois_get_dossiermarks individual legs withsource_errorand continues; only both-legs-fail escalates to an error - Factual signals, not scores —
age_days,privacy_redacted,ns_provider,mx_providerare real data; agents chain into threat-intel or risk servers for enrichment
Getting started
No API keys or accounts required. Add the following to your MCP client configuration file.
{
"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):
{
"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:
{
"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:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp
Prerequisites
- Bun v1.3.0 or higher (or Node.js v24+).
- No API keys required — all data sources are public.
Installation
- Clone the repository:
git clone https://github.com/cyanheads/whois-mcp-server.git
- Navigate into the directory:
cd whois-mcp-server
- Install dependencies:
bun install
- Configure environment:
cp .env.example .env
# All vars are optional — defaults work for most use cases
Configuration
| Variable | Description | Default |
|---|---|---|
RDAP_TIMEOUT_MS |
HTTP timeout for RDAP requests in milliseconds. | 5000 |
DOH_TIMEOUT_MS |
HTTP timeout for DNS-over-HTTPS requests in milliseconds. | 3000 |
RDAP_MAX_RETRIES |
Max retry attempts on transient RDAP failures. | 2 |
DOH_MAX_RETRIES |
Max retry attempts on transient DoH failures. | 2 |
MCP_TRANSPORT_TYPE |
Transport: stdio or http. |
stdio |
MCP_HTTP_PORT |
Port for HTTP server. | 3010 |
MCP_AUTH_MODE |
Auth mode: none, jwt, or oauth. |
none |
MCP_LOG_LEVEL |
Log level (RFC 5424). | info |
OTEL_ENABLED |
Enable OpenTelemetry instrumentation. | false |
See .env.example for the full list of optional overrides.
Running the server
Local development
-
Build and run:
bun run rebuild bun run start:stdio # or bun run start:http -
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
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
| Path | Purpose |
|---|---|
src/index.ts |
createApp() entry point — registers tools and inits services. |
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, Google fallback. |
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/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage (IANA bootstrap cache) - Register new tools via
src/index.tstools array - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
License
Apache-2.0 — see LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。