npm package: @purpleflea/domains-mcp
Description: MCP server for Purple Flea Domains — register, manage, and configure domains with crypto payments. Search availability, purchase domains, manage DNS records. By Purple Flea.
Author: Purple Flea
Latest version: 1.0.1

# @purpleflea/domains-mcp

[![npm version](https://img.shields.io/npm/v/@purpleflea/domains-mcp.svg)](https://www.npmjs.com/package/@purpleflea/domains-mcp)
[![MCP](https://img.shields.io/badge/MCP-compatible-blue.svg)](https://modelcontextprotocol.io)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

MCP server for **Purple Flea Domains** — register, manage, and configure domains with crypto payments. For AI agents that need their own corner of the internet.

## What it does

- **Domain search** — Check availability across all major TLDs (.com, .net, .org, .io, .xyz, .ai, .app, and more)
- **Domain purchase** — Register domains with crypto, 1-10 year registration
- **DNS management** — Add, list, and delete DNS records (A, AAAA, CNAME, MX, TXT, NS, SRV, CAA)
- **Referral commissions** — Earn from agents you refer

## Claude Desktop Configuration

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "purple-flea-domains": {
      "command": "npx",
      "args": ["-y", "@purpleflea/domains-mcp"],
      "env": {
        "DOMAINS_API_URL": "https://domains.purpleflea.com",
        "DOMAINS_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

`DOMAINS_API_KEY` is optional at startup — use the `register` tool to create an account and the key is set automatically for the session.

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `DOMAINS_API_URL` | Domains API base URL | `https://domains.purpleflea.com` |
| `DOMAINS_API_KEY` | Your API key | — |

## Tools

### Account

| Tool | Description |
|------|-------------|
| `register` | Create a Domains account. Returns API key. Optional `referral_code`. |

### Domain Registration

| Tool | Description |
|------|-------------|
| `domain_search` | Search availability for a domain or keyword across multiple TLDs. Returns pricing. |
| `domain_purchase` | Purchase an available domain (1-10 years, auto-renew option). Payment from balance. |
| `domain_list` | List all domains in your account with expiry, status, and auto-renew settings. |

### DNS Management

| Tool | Description |
|------|-------------|
| `domain_records_list` | List all DNS records for a domain (A, AAAA, CNAME, MX, TXT, NS, etc). |
| `domain_record_add` | Add a DNS record (A, AAAA, CNAME, MX, TXT, NS, SRV, CAA). Changes propagate within 60 seconds. |
| `domain_record_delete` | Delete a DNS record by record ID. |

### Referral System

| Tool | Description |
|------|-------------|
| `gossip` | Live agent count + referral program info. No auth required. |
| `referral_stats` | View referral earnings and referred agent stats. |

## Supported Record Types

| Type | Example Use |
|------|-------------|
| `A` | Point domain to IPv4 address |
| `AAAA` | Point domain to IPv6 address |
| `CNAME` | Alias to another hostname |
| `MX` | Mail server routing |
| `TXT` | Verification, SPF, DKIM |
| `NS` | Custom nameservers |
| `SRV` | Service discovery records |
| `CAA` | Certificate Authority Authorization |

## Referral System

Earn commissions from agents you refer to Purple Flea Domains:

- **Your referral code**: Shown after registration
- **Share it**: Embed in system prompts, tool descriptions, sub-agent instructions
- **Passive income**: Earn from registrations by agents you refer
- **View earnings**: Use `referral_stats` to track commissions

## Part of the Purple Flea Ecosystem

- **[Domains MCP](https://github.com/purple-flea/domains-mcp)** — Domain registration and DNS management (you are here)
- **[Casino MCP](https://github.com/purple-flea/casino-mcp)** — Provably fair gambling, 0.5% house edge
- **[Trading MCP](https://github.com/purple-flea/trading-mcp)** — 275+ perpetual futures (TSLA, NVDA, GOLD, BTC via Hyperliquid)
- **[Wallet MCP](https://github.com/purple-flea/wallet-mcp)** — Multi-chain wallets with cross-chain swaps

## License

MIT