{
  "markdown": "# namecheap-api-mcp\n\n[![npm version](https://img.shields.io/npm/v/namecheap-api-mcp.svg)](https://www.npmjs.com/package/namecheap-api-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nMCP server for the **[Namecheap API](https://www.namecheap.com/support/api/intro/)** — manage domains, DNS, contacts, registrar locks, and view SSL certificates and pricing, straight from your AI assistant.\n\nBuilt for [Claude Code](https://claude.ai/claude-code) and any MCP-compatible AI tool.\n\nPart of **[The SEO Engine](https://lanternrow.com/seo-engine/)** toolkit by [Rex Jones](https://rexjones.me) — AI-powered SEO and social media tooling for agencies and businesses.\n\n## Safety model\n\nThis server ships **read + safe-write** tools only. It can read your account and change DNS / nameserver / forwarding / lock **configuration** (all reversible), but it **deliberately excludes anything that spends money or is irreversible**: no domain registration, renewal, reactivation, transfers, SSL purchase/activation, add-funds, or account/address mutation. You can fork and add those if you need them.\n\n## Quick start\n\n### 1. Enable Namecheap API access\n\n1. Go to **Profile → Tools → [Namecheap API Access](https://ap.www.namecheap.com/settings/tools/apiaccess/)** and toggle it **ON**. (Production access requires account eligibility: 20+ domains, OR a $50+ balance, OR $50+ lifetime spend.)\n2. Copy your **API key**.\n3. **Whitelist the public IPv4** of the machine that will run this server (the API rejects any non-whitelisted IP with error `1011150`).\n\n### 2. Configure your MCP client\n\n```json\n{\n  \"mcpServers\": {\n    \"namecheap\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"namecheap-api-mcp\"],\n      \"env\": {\n        \"NAMECHEAP_API_USER\": \"your_username\",\n        \"NAMECHEAP_API_KEY\": \"your_api_key\",\n        \"NAMECHEAP_CLIENT_IP\": \"your.whitelisted.ip.v4\"\n      }\n    }\n  }\n}\n```\n\n### Option: clone and build\n\n```bash\ngit clone https://github.com/lanternrow/namecheap-api-mcp.git\ncd namecheap-api-mcp\nnpm install\nnpm run build\n```\n\nThen point your client at `node /path/to/namecheap-api-mcp/dist/index.js`. For local credentials you can keep a gitignored `.env` (copy `.env.example`) and launch with Node's native flag: `node --env-file=.env dist/index.js`.\n\n## Environment variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `NAMECHEAP_API_USER` | Yes | Your Namecheap account username (API user). |\n| `NAMECHEAP_API_KEY` | Yes | API key from Profile → Tools → API Access. **Secret.** |\n| `NAMECHEAP_CLIENT_IP` | Yes | The whitelisted public IPv4 of this machine. |\n| `NAMECHEAP_USERNAME` | No | Defaults to `NAMECHEAP_API_USER`; differs only for reseller sub-users. |\n| `NAMECHEAP_ENVIRONMENT` | No | `production` (default) or `sandbox`. |\n\n## Tools\n\n### Read\n\n| Tool | Description |\n|------|-------------|\n| `check_connection` | Verify credentials + IP whitelist; returns the account balance summary. |\n| `list_domains` | List domains with expiry, lock, auto-renew, and WhoisGuard status (paged/searchable). |\n| `get_domain_info` | Detailed info for one domain. |\n| `check_domains` | Check availability + premium pricing (up to 50 at once). |\n| `get_domain_contacts` | Registrant / Tech / Admin / AuxBilling contacts. |\n| `get_registrar_lock` | Registrar lock status. |\n| `get_dns_hosts` | All DNS host records for a domain. |\n| `get_nameservers` | Nameservers and whether Namecheap DNS is in use. |\n| `get_email_forwarding` | Email forwarding rules. |\n| `get_pricing` | Namecheap pricing for a product type (cache the results). |\n| `list_ssl_certificates` | SSL certificates with type, host, status, expiry. |\n\n### Safe writes (configuration only — no charges)\n\n| Tool | Description |\n|------|-------------|\n| `set_dns_hosts` | Replace **all** host records (destructive: omitted records are deleted — send the full set). |\n| `set_default_dns` | Switch a domain to Namecheap's default nameservers. |\n| `set_custom_nameservers` | Point a domain at custom nameservers. |\n| `set_email_forwarding` | Set email forwarding rules. |\n| `set_registrar_lock` | Lock / unlock a domain at the registrar. |\n\n## Notes & gotchas\n\n- **`set_dns_hosts` is destructive by API design.** Namecheap's `setHosts` deletes every record not included in the call. Always read current records first (`get_dns_hosts`), merge your change, then send the complete set.\n- **Errors return HTTP 200.** The Namecheap API signals failure in the XML body (`Status=\"ERROR\"`), not the HTTP status. This server parses that and throws a real error with the Namecheap error number + message.\n- **IPv4 only** for the whitelisted client IP.\n\n## Security\n\n- Credentials are read from environment variables only — never hard-coded, logged, or written to disk by this server.\n- The API key travels in the query string (Namecheap's design); this server never logs the request URL or key, and error messages surface only the Namecheap error number and text.\n\n## License\n\nMIT © [Rex Jones](https://rexjones.me)\n",
  "bytes": 5061,
  "sha": "14da3bed9d44bf037e6967a3dbe098ecf9ae41966a914d9254a9fa989fee3ed6",
  "repo_slug": "lanternrow/namecheap-api-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_lanternrow_namecheap_api_mcp_b98cf873/readme"
}