Namecheap
Connect Claude, ChatGPT or Cursor to Namecheap via MCP. List domains, check availability, and manage DNS nameservers with an API key.
Example questions
Try asking your AI client
-
Which Namecheap domains expire in the next 60 days?
-
Is example.net available to register at Namecheap?
-
Show the DNS host records for example.co.uk.
-
Write a draft nameserver change for example.com - do not apply it.
-
Is registrar lock on for the marketing domain?
Overview
Connect Namecheap so AI clients can list domains, check availability, and manage DNS nameservers, registrar lock, host records, and email forwarding via the Namecheap XML API.
This integration uses your Namecheap API key. stackgate.ai does not register, transfer, or renew domains, and it does not buy SSL or WHOIS Guard.
Prerequisites
- A Namecheap account with API access enabled
- Production API access requires 20 domains, a $50 account balance, or $50 spent in the last 2 years. The sandbox has no gate.
- The hub public IPv4 must be whitelisted on the Namecheap account (IPv4 only)
- A stackgate.ai account
Getting credentials
- Sign in to Namecheap.
- Open Profile → Tools → Namecheap API Access.
- Enable API access if it is not already on, then copy your API key.
- Add the hub Client IP shown in stackgate.ai My Integrations → Namecheap. Namecheap accepts IPv4 only.
- In stackgate.ai, open My Integrations → Namecheap.
- Enter your Namecheap username and API key. Optional: set a different account username for a sub-user, or enable sandbox.
- Save. stackgate.ai verifies the key with
namecheap.users.getBalancesand stores it encrypted. - Optionally use Edit tool access to keep the connection read-only.
See the Namecheap API introduction.
Credentials reference
| Field | Required | Where to find it | Notes |
|---|---|---|---|
| Namecheap username | Yes | Account username | Sent as ApiUser (and UserName when account username is empty) |
| API key | Yes | Profile → Tools → Namecheap API Access | Stored encrypted |
| Account username | No | Sub-user username | Sent as UserName. Defaults to the Namecheap username |
| Sandbox | No | Namecheap sandbox account | Uses api.sandbox.namecheap.com instead of production |
The hub also sends ClientIp from the server NAMECHEAP_CLIENT_IP setting. You cannot override it from the form.
Permission model
Namecheap does not use OAuth for this connect flow. Prefer Edit tool access on the connection if agents should only list domains and read DNS.
| Scope | Tools |
|---|---|
| Read | get_balances, list_domains, get_domain, check_domains, get_dns_hosts, get_nameservers, get_registrar_lock, get_contacts, get_email_forwarding, list_tlds |
| Write | set_nameservers, set_default_dns, set_registrar_lock, set_dns_hosts, set_email_forwarding |
Using with AI clients
- Dedicated endpoint:
POST /mcp/namecheapwith a Sanctum bearer token - Private gateway: one config for all integrations - use
namecheap__*namespaced tools
Example prompts:
- "List my Namecheap domains that expire in the next 60 days."
- "Is example.net available to register at Namecheap?"
- "Show DNS host records for example.co.uk."
- "Point example.com at ns1.example.net and ns2.example.net."
- "Replace the Namecheap DNS hosts for example.com with the records I just listed. Keep every existing record I did not mention."
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| 422 integration not configured | Form not saved | Complete username and API key in My Integrations |
| Hub Client IP is not configured | Missing NAMECHEAP_CLIENT_IP on the hub |
Ask the operator to set the public IPv4 |
| IP not whitelisted | Namecheap rejected the hub address | Add the displayed Client IP under Profile → Tools → Namecheap API Access |
| Authentication failed | Wrong username, key, or API not enabled | Confirm API Access is on and paste a fresh key |
| get_dns_hosts fails | Domain uses custom nameservers | Call set_default_dns first, or manage records at the DNS host |
| DNS change missing a record | set_dns_hosts is a full replace |
Call get_dns_hosts, merge locally, then send the complete set |
| 429 / throttled | Namecheap limits 50/min, 700/hour, 8000/day | Wait and retry. Avoid list_tlds unless you need the full catalog |
Security and revocation
- Disconnect Namecheap in My Integrations to delete the stored API key from stackgate.ai.
- Rotate the key in Namecheap API Access if you suspect leakage.
get_contactsreturns WHOIS personal addresses. Prefer domain names and expiry dates in Slack or ticket summaries.- Audit logs record tool names and arguments. Do not paste API keys into prompts.
- stackgate.ai encrypts credentials at rest.
Limitations
- No domain create, transfer, or renew. Those commands charge money.
- No SSL purchase, WHOIS Guard purchase, private nameservers, or user admin tools.
- Pass the registered domain (
example.co.uk), not a hostname (www.example.com). set_dns_hostsandset_email_forwardingreplace the full set. Omitting a record deletes it.- Namecheap often returns HTTP 200 with XML
Status=ERRORfor auth and command failures. stackgate.ai treats those as tool errors.
Available tools
-
get_balances
Get Namecheap account balances (available, funds required, and in escrow). Use this to confirm the API key and IP whitelist work.
-
list_domains
List domains in the Namecheap account with paging, search, and expiry filters.
-
get_domain
Get details for one Namecheap domain, including expiry, lock, and DNS provider.
-
check_domains
Check whether one or more domains are available to register.
-
get_dns_hosts
Get DNS host records for a domain using Namecheap DNS. Fails if the domain uses custom nameservers - call set_default_dns first.
-
get_nameservers
Get the DNS servers currently assigned to a domain.
-
get_registrar_lock
Get the registrar lock status for a domain.
-
get_contacts
Get WHOIS contact details (registrant, admin, tech, billing) for a domain. Responses include personal addresses.
-
get_email_forwarding
Get email forwarding rules for a domain on Namecheap DNS.
-
list_tlds
List TLDs available at Namecheap with registration metadata. The payload is large - prefer check_domains for specific names.
-
set_nameservers
Point a domain at custom nameservers. Namecheap-hosted DNS records will not apply until you call set_default_dns.
-
set_default_dns
Switch a domain to Namecheap default DNS so host records, URL forwarding, and email forwarding work.
-
set_registrar_lock
Lock or unlock a domain at the registrar.
-
set_dns_hosts
Replace ALL DNS host records for a domain on Namecheap DNS. This is a full replace, not a merge. Call get_dns_hosts first, then send the complete record set including records you want to keep.
-
set_email_forwarding
Replace email forwarding rules for a domain on Namecheap DNS. Send the complete set of mailbox → destination pairs.
MCP endpoint:
https://stackgate.ai/mcp/namecheap
(HTTP) or via the
private gateway.