mcp-namecheap
# mcp-namecheap
Comprehensive [MCP](https://modelcontextprotocol.io/) server for the Namecheap API. Manage domains, DNS records, nameservers, registration, and pricing — all from Claude, Cursor, or any MCP client.
## Tools (10)
| Tool | Description |
|---|---|
| `namecheap_list_domains` | List all domains in your account |
| `namecheap_get_domain_info` | Detailed info: owner, status, dates, DNS |
| `namecheap_check_domain` | Check domain availability (bulk) |
| `namecheap_get_dns_hosts` | Get DNS records (A, AAAA, CNAME, MX, TXT...) |
| `namecheap_set_dns_hosts` | Set DNS records (replaces all existing) |
| `namecheap_get_nameservers` | Get current nameservers |
| `namecheap_set_nameservers` | Set custom nameservers |
| `namecheap_set_default_nameservers` | Reset to Namecheap DNS |
| `namecheap_register_domain` | Register (purchase) a domain |
| `namecheap_get_tld_pricing` | Get TLD pricing (registration/renewal/transfer) |
## Setup
### 1. Get Namecheap API Access
1. Log in to [Namecheap](https://www.namecheap.com/)
2. Go to **Profile → Tools → API Access**
3. Enable API access and whitelist your IP address
4. Copy your API key
### 2. Install
```bash
git clone https://github.com/jarupai/mcp-namecheap.git
cd mcp-namecheap
npm install
npm run build
```
### 3. Configure Claude Code
Add to your Claude Code MCP settings (`~/.claude/settings.json` or project `.claude/settings.local.json`):
```json
{
"mcpServers": {
"namecheap": {
"command": "node",
"args": ["/path/to/mcp-namecheap/dist/index.js"],
"env": {
"NAMECHEAP_API_USER": "your_username",
"NAMECHEAP_API_KEY": "your_api_key",
"NAMECHEAP_USERNAME": "your_username"
}
}
}
}
```
### Configure Cursor
Add to `.cursor/mcp.json`:
```json
{
"mcpServers": {
"namecheap": {
"command": "node",
"args": ["/path/to/mcp-namecheap/dist/index.js"],
"env": {
"NAMECHEAP_API_USER": "your_username",
"NAMECHEAP_API_KEY": "your_api_key",
"NAMECHEAP_USERNAME": "your_username"
}
}
}
}
```
## Environment Variables
| Variable | Required | Description |
|---|---|---|
| `NAMECHEAP_API_USER` | Yes | API username |
| `NAMECHEAP_API_KEY` | Yes | API key |
| `NAMECHEAP_USERNAME` | Yes | Account username |
| `NAMECHEAP_CLIENT_IP` | No | Whitelisted IP (auto-detected if not set) |
| `NAMECHEAP_SANDBOX` | No | Set `true` for sandbox API |
## Examples
**List your domains:**
> "Show me all my Namecheap domains"
**Check availability:**
> "Is coolstartup.ai available?"
**Manage DNS:**
> "Add a CNAME record for api.mysite.com pointing to myapp.railway.app"
**Get pricing:**
> "How much does a .app domain cost?"
**Register a domain:**
> "Register example.com for 1 year"
## Important Notes
- `namecheap_set_dns_hosts` **replaces all records**. Always read existing records first with `namecheap_get_dns_hosts`, modify the list, then set them all back.
- `namecheap_register_domain` will **charge your account**. The AI will confirm before executing.
- IP auto-detection uses public services (ipify.org, ip.sb, ifconfig.me). Set `NAMECHEAP_CLIENT_IP` manually if your IP is static.
## Credits
Inspired by community MCP servers:
- [johnsorrentino/mcp-namecheap](https://github.com/johnsorrentino/mcp-namecheap)
- [cordlesssteve/namecheap-mcp-server](https://github.com/cordlesssteve/namecheap-mcp-server)
- [dalton-cole/mcp-namecheap-registrar](https://github.com/dalton-cole/mcp-namecheap-registrar)
## License
MIT
TDQS
Scored across 10 tools
Each tool targets a distinct aspect of domain management: listing, info, availability, DNS records, nameservers, pricing, and registration. While set_nameservers and set_default_nameservers are related, their descriptions clearly distinguish custom vs. default, preventing misselection.
All tools follow the namecheap_<verb>_<object> pattern consistently. Verbs (list, get, check, set, register) are used predictably, and there is no mixed casing or stray naming.
With 10 tools, the server covers the core domain management workflows (query, purchase, DNS, nameservers, pricing) without unnecessary bloat. Each tool addresses a real need and earns its place.
The tool set lacks key domain lifecycle operations such as renewal, transfer, and contact updates. While DNS and nameserver management are well covered, this gap will cause agent failures for expiration-related tasks.