Skip to main content
Glama
yenyifu

MCP Domain Availability Server

by yenyifu
README.md
# MCP Domain Availability Server

A Model Context Protocol (MCP) server for checking domain name availability using DNS, RDAP, and WHOIS lookups. This server provides AI assistants with the ability to check if domain names are available for registration.

## Features

- **Single Domain Checking**: Check availability of individual domains
- **Bulk Domain Checking**: Check up to 50 domains simultaneously
- **Multi-Protocol Lookups**: Uses DNS-over-HTTPS (DoH), RDAP, and WHOIS for accurate results
- **Robust Error Handling**: Handles timeouts, rate limits, and network errors gracefully
- **Security Limits**: Built-in protection against abuse with request limits and timeouts

## Installation

### For Cursor IDE

Add the following to your `~/.cursor/mcp.json` (or `%APPDATA%\Cursor\mcp.json` on Windows):

```json
{
  "mcpServers": {
    "domain-availability": {
      "command": "npx",
      "args": ["-y", "mcp-domain-availability"]
    }
  }
}
```

Restart Cursor to activate the server.

### For Other MCP Clients

The server can be used with any MCP-compatible client. Install globally:

```bash
npm install -g mcp-domain-availability
```

Then configure your MCP client to run:
```bash
mcp-domain-availability
```

## Usage

### Tool 1: `check_domain_availability`

Check if a single domain is available for registration.

**Input:**
```json
{
  "domain": "example.com"
}
```

**Output:**
```json
{
  "domain": "example.com",
  "available": false,
  "status": "registered",
  "registered": true,
  "details": {
    "availability": "registered",
    "registrar": "Example Registrar",
    "registrationDate": "2020-01-01",
    "expirationDate": "2025-01-01"
  }
}
```

**Possible status values:**
- `unregistered` - Domain is available for registration
- `registered` - Domain is already registered
- `unknown` - Unable to determine status

### Tool 2: `check_multiple_domains`

Check availability for multiple domains at once (up to 50 domains).

**Input:**
```json
{
  "domains": ["example.com", "test.io", "available-domain.xyz"]
}
```

**Output:**
```json
{
  "results": [
    {
      "domain": "example.com",
      "available": false,
      "status": "registered",
      "registered": true,
      "error": null
    },
    {
      "domain": "test.io",
      "available": true,
      "status": "unregistered",
      "registered": false,
      "error": null
    },
    {
      "domain": "available-domain.xyz",
      "available": false,
      "status": "error",
      "registered": false,
      "error": "Network error occurred",
      "errorType": "network"
    }
  ],
  "summary": {
    "total": 3,
    "available": 1,
    "registered": 1,
    "errors": 1,
    "unknown": 0
  }
}
```

## Error Handling

The server handles various error scenarios:

- **Timeout Errors**: Domain checks timeout after 30 seconds
- **Rate Limiting**: Detects and reports rate limit errors from WHOIS/DNS providers
- **Network Errors**: Handles connection failures gracefully
- **Invalid Input**: Validates domain format and length before checking

### Error Response Format

```json
{
  "error": "Error message",
  "domain": "example.com",
  "suggestion": "Helpful suggestion for the user"
}
```

## Requirements

- Node.js >= 18.0.0
- npm or compatible package manager

## Limitations

- **Rate Limiting**: WHOIS and DNS providers may rate limit requests. The server detects and reports these errors.
- **Timeout**: Each domain check has a 30-second timeout to prevent hanging requests.
- **Bulk Limit**: Maximum 50 domains per bulk request to prevent abuse.
- **TLD Support**: Supports all standard TLDs. Some newer or less common TLDs may have limited information available.

## Troubleshooting

### Server not starting

- Verify Node.js version: `node --version` (should be >= 18.0.0)
- Check that the package is installed: `npx -y mcp-domain-availability`
- Review Cursor logs for error messages

### Domain checks failing

- Check your internet connection
- Some domains may be rate-limited - wait a few moments and try again
- Verify domain format is correct (e.g., `example.com`, not `http://example.com`)

### Rate limit errors

If you encounter rate limit errors:
- Wait a few minutes before making more requests
- Reduce the number of domains checked in bulk operations
- Consider checking domains individually with delays between requests

## License

MIT License - see [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

## Acknowledgments

- Built with [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk)
- Domain checking powered by [domainstat](https://www.npmjs.com/package/domainstat)

TDQS

A3.5/5.0

Scored across 2 tools

Disambiguation4/5

The two tools have clearly distinct purposes: one checks a single domain, while the other handles multiple domains. The descriptions reinforce this distinction, making misselection unlikely. However, the similarity in core functionality could cause minor confusion if an agent needs to decide between them for a single domain.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with 'check_' prefix and snake_case naming. The naming is predictable and readable, with no deviations in style or convention across the tool set.

Tool Count3/5

With only 2 tools, the server feels thin for a domain availability service. While the tools cover basic availability checks, the scope is limited, and more operations (e.g., domain suggestion, registration status, or pricing) might be expected. This borderline count could hinder agent workflows.

Completeness2/5

The tool set is significantly incomplete for a domain availability server. It lacks essential operations such as domain suggestion, registration initiation, pricing lookup, or WHOIS details retrieval. Agents will face dead ends when trying to perform common domain-related tasks beyond basic availability checks.

Maintenance

ActivityInactive
ResponsivenessNo issues