domaindetails.com

domaindetails npm Package

Domain information lookup tool for Node.js. Use as a CLI, import as a library, or run as an MCP server.

Quick Start

Try it now (no installation)

npx domaindetails example.com

Install globally

npm install -g domaindetails

Add to your project

npm install domaindetails

Three Ways to Use

CLI Tool

Quick domain lookups from the command line. Perfect for scripts and automation.

npx domaindetails google.com
npx domaindetails example.com --whois
npx domaindetails github.io --raw

Library

Import into your Node.js projects for programmatic domain lookups.

import { lookup } from 'domaindetails';

const result = await lookup('example.com');
console.log(result);

MCP Server

Run as an MCP server for Claude Desktop, Claude Code, Cursor, Windsurf, and other AI clients.

npx domaindetails --mcp

Or use the dedicated domaindetails-mcp package.

MCP Integration

Claude Desktop

Add to your Claude Desktop configuration:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "domaindetails": {
      "command": "npx",
      "args": ["-y", "domaindetails", "--mcp"]
    }
  }
}

Claude Code

Add using the Claude CLI:

claude mcp add domaindetails -- npx -y domaindetails --mcp

Or manually add to ~/.claude/claude_desktop_config.json

Cursor

Add to your Cursor MCP configuration at ~/.cursor/mcp.json:

{
  "mcpServers": {
    "domaindetails": {
      "command": "npx",
      "args": ["-y", "domaindetails", "--mcp"]
    }
  }
}

Windsurf

Add to your Windsurf MCP configuration at ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "domaindetails": {
      "command": "npx",
      "args": ["-y", "domaindetails", "--mcp"]
    }
  }
}

Other MCP Clients

For any MCP-compatible client, use:

  • Command: npx
  • Args: ["-y", "domaindetails", "--mcp"]

CLI Options

OptionDescription
--help, -hShow help message
--whoisUse WHOIS instead of RDAP as primary method
--rawInclude raw protocol response data
--mcpStart as MCP server for Claude Desktop

Library API

lookup(domain, options)

Main lookup function with RDAP primary, WHOIS fallback.

import { lookup } from 'domaindetails';

const result = await lookup('example.com', {
  preferWhois: false,  // Use WHOIS as primary method
  includeRaw: false    // Include raw protocol response
});

DomainLookup class

Full-featured client for multiple lookups with shared configuration.

import { DomainLookup } from 'domaindetails';

const client = new DomainLookup();

// Multiple lookups with same client
const result1 = await client.lookup('example.com');
const result2 = await client.rdap('google.com');
const result3 = await client.whois('github.com');

Protocol-specific functions

Use rdap() or whois() for protocol-specific lookups.

import { rdap, whois } from 'domaindetails';

// RDAP only
const rdapResult = await rdap('example.com');

// WHOIS only
const whoisResult = await whois('example.com');

Response Format

{
  "domain": "example.com",
  "found": true,
  "method": "rdap",
  "timestamp": "2025-01-21T10:30:00Z",
  "status": ["client transfer prohibited"],
  "nameservers": ["ns1.example.com", "ns2.example.com"],
  "rdap": {
    "registration_date": "1995-08-14T04:00:00Z",
    "expiration_date": "2026-08-13T04:00:00Z",
    "last_changed_date": "2025-11-25T18:49:24Z",
    "contacts": [...],
    "dnssec": { "delegationSigned": true }
  }
}

Features

RDAP First

Uses modern RDAP protocol for structured domain data

WHOIS Fallback

Automatically falls back to WHOIS when RDAP fails

50+ TLDs

Built-in support for common gTLDs and ccTLDs

IANA Bootstrap

Fetches registry info from IANA for unsupported TLDs

TypeScript Ready

Full TypeScript support with type definitions

Zero Config

Works out of the box with no configuration needed

Ready to Get Started?

Start looking up domain information in seconds.

npx domaindetails example.com