npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

domaindetails

v1.2.0

Published

Domain information lookup tool - CLI, library, and MCP server. Look up RDAP, WHOIS, and comprehensive domain information.

Readme

DomainDetails

Domain information lookup tool - CLI, library, and MCP server.

Look up RDAP, WHOIS, and comprehensive domain information using modern protocols with automatic fallback.

Features

  • CLI Tool: Quick domain lookups from the command line
  • Library: Import into your Node.js projects
  • MCP Server: Integration with Claude Desktop and other MCP clients
  • 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

Installation

npm install domaindetails

Or use directly with npx:

npx domaindetails example.com

Usage

CLI

# Basic lookup
npx domaindetails example.com

# Prefer WHOIS over RDAP
npx domaindetails example.com --whois

# Include raw protocol data
npx domaindetails example.com --raw

# Show help
npx domaindetails --help

Library

import { lookup, DomainLookup } from 'domaindetails';

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

// With options
const client = new DomainLookup();
const result = await client.lookup('google.com', {
  preferWhois: false,
  includeRaw: true
});

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

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

MCP Server

Start the MCP server for use with AI assistants and IDEs:

npx domaindetails --mcp

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 to your Claude Code MCP settings:

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

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

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

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"]

Or use the standalone MCP package:

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

API Reference

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
});

rdap(domain, options)

RDAP-only lookup.

import { rdap } from 'domaindetails';

const result = await rdap('example.com');

whois(domain, options)

WHOIS-only lookup.

import { whois } from 'domaindetails';

const result = await whois('example.com');

DomainLookup Class

Full-featured client for multiple lookups.

import { DomainLookup } from 'domaindetails';

const client = new DomainLookup();

// Multiple lookups with same client
const result1 = await client.lookup('example.com');
const result2 = await client.lookup('google.com');
const result3 = await client.rdap('github.com');
const result4 = await client.whois('twitter.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": "2025-08-13T04:00:00Z",
    "contacts": [...]
  }
}

Supported TLDs

Generic TLDs: com, net, org, info, biz, name, pro, xyz, top, site, online, tech, store, app, dev, io, ai, co, me, tv, cc

Country Code TLDs: uk, ca, au, de, fr, nl, be, ch, at, it, es, se, no, dk, fi, ie, pl, cz, sk, hu, ro, bg, hr, si, lv, lt, ee

For unsupported TLDs, the library fetches registry information from IANA's bootstrap service.

MCP Tools

When used as an MCP server, the following tool is available:

domain_lookup

Look up comprehensive domain information.

Parameters:

  • domain (string, required): The domain name to look up
  • prefer_whois (boolean, optional): Use WHOIS as primary method
  • include_raw (boolean, optional): Include raw protocol response

Development

# Clone repository
git clone https://github.com/simplebytes-com/domaindetails-mcp.git
cd domaindetails-mcp

# Install dependencies
npm install

# Build
npm run build

# Test CLI
node build/cli.js example.com

# Test MCP server
node build/mcp-server.js

License

MIT

Support

  • GitHub Issues: https://github.com/simplebytes-com/domaindetails-mcp/issues
  • Website: https://domaindetails.com

Related Projects