Skip to main content
Glama
drdanielbender

Porkbun Domain Availability MCP Server

README.md
# Porkbun Domain Availability MCP Server

A Model Context Protocol (MCP) server that provides tools to check domain availability using the Porkbun API v3.

## Features

- **Single Domain Check**: Check the availability of a single domain name
- **Bulk Domain Check**: Check availability of multiple domains (up to 10 at once)
- **Rate Limiting**: Respects Porkbun's rate limits with built-in delays
- **Error Handling**: Comprehensive error handling with detailed messages

## Tools

### 1. `check_domain_availability`
Checks the availability of a single domain name and returns detailed pricing information.

**Parameters**:
- `domain` (string): The domain name to check for availability

**Returns**: 
- Domain availability status
- Pricing information
- Premium domain status
- First-year promotions
- Renewal and transfer pricing
- Rate limit information

### 2. `bulk_check_domains_availability`
⚠️ **WARNING**: Checks the availability of multiple domain names at once. Due to Porkbun API rate limits (1 check per 10 seconds), this tool has a very long runtime. For example: 5 domains = ~50 seconds, 10 domains = ~100 seconds (1.7 minutes). The bulk tool provides better user experience and consolidated results compared to making multiple single domain check calls.

**Parameters**:
- `domains` (array): Array of domain names to check (maximum 10)

**Returns**: 
- Bulk results with availability status for each domain
- Pricing information for available domains
- Individual error messages for failed checks

## Prerequisites

- [Node.js](https://nodejs.org/) (v18 or later recommended)
- Porkbun API credentials ([generate here](https://porkbun.com/account/api))

## Setup

### 1. Install Dependencies

```bash
npm install
```

### 2. Configure API Credentials

Set your Porkbun API credentials using environment variables or a `.env` file:

#### Option A: Environment Variables
```bash
export PORKBUN_API_KEY="your_api_key"
export PORKBUN_SECRET_API_KEY="your_secret_key"
```

#### Option B: Create a .env file
Create a `.env` file in the project root directory:
```
PORKBUN_API_KEY=your_api_key
PORKBUN_SECRET_API_KEY=your_secret_key
```

#### Option C: Custom .env Location
Pass a custom path when running the server:
```bash
node build/index.js --dotenv-path /path/to/your/.env
```

## Building

Compile the TypeScript code:
```bash
npm run build
```

This creates the executable JavaScript file in the `build/` directory.

## Running the Server

### Standard Start
```bash
npm start
```

### Custom .env Path
```bash
node build/index.js --dotenv-path /path/to/your/.env
```

### Development Mode
```bash
npm run dev
```

The server communicates using the MCP `stdio` transport (standard input/output).

## Usage with Claude Desktop

To use this server with Claude Desktop, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "porkbun-domain-availability": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-porkbun-domain-availability/build/index.js",
        "--dotenv-path",
        "/absolute/path/to/mcp-porkbun-domain-availability/.env"
      ]
    }
  }
}
```

Replace the placeholder paths with the actual absolute paths on your system. Save the configuration file and restart Claude Desktop.

## API Information

This server uses the Porkbun API v3. For more information about the API:

- [Porkbun API Documentation](https://porkbun.com/api/json/v3/documentation)
- [Domain Check Endpoint](https://porkbun.com/api/json/v3/documentation#Domain%20Check)

## Rate Limiting

The Porkbun API has rate limits for domain checks. This server:
- Implements automatic delays between requests (10 second)
- Limits bulk checks to 10 domains maximum
- Provides rate limit information in responses

## Error Handling

The server provides detailed error messages for:
- Missing or invalid API credentials
- Network connectivity issues
- API rate limit violations
- Invalid domain names
- Server errors

## License

MIT License - see project repository for details.

TDQS

A4.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one handles bulk checks for up to 10 domains with consolidated results, while the other checks a single domain with pricing details. There is no overlap or ambiguity between them, as each serves a specific use case within the domain availability domain.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with snake_case naming: 'bulk_check_domains_availability' and 'check_domain_availability'. The naming is predictable and readable, clearly indicating the action (check) and the target (domain availability), with 'bulk' appropriately modifying the first tool.

Tool Count3/5

With only 2 tools, the server feels thin for a domain availability service, as it lacks operations like domain registration, management, or search. However, given the specific focus on availability checks and API rate limits, the count is borderline but reasonable for a minimal, focused implementation.

Completeness2/5

The tool surface is significantly incomplete for a domain availability server, as it only provides check operations without any ability to register, update, or manage domains. This creates dead ends for agents trying to perform full domain lifecycle tasks, limiting the server to read-only functionality.

Maintenance

ActivityInactive
ResponsivenessNo issues