Skip to main content
Glama
namecheap-api-mcp

namecheap-api-mcp

by lanternrow

namecheap-api-mcp

npm version License: MIT

MCP server for the Namecheap API — manage domains, DNS, contacts, registrar locks, and view SSL certificates and pricing, straight from your AI assistant.

Built for Claude Code and any MCP-compatible AI tool.

Part of The SEO Engine toolkit by Rex Jones — AI-powered SEO and social media tooling for agencies and businesses.

Safety model

This 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.

Related MCP server: MCP Namecheap Server

Quick start

1. Enable Namecheap API access

  1. Go to Profile → Tools → Namecheap API Access and toggle it ON. (Production access requires account eligibility: 20+ domains, OR a $50+ balance, OR $50+ lifetime spend.)

  2. Copy your API key.

  3. Whitelist the public IPv4 of the machine that will run this server (the API rejects any non-whitelisted IP with error 1011150).

2. Configure your MCP client

{
  "mcpServers": {
    "namecheap": {
      "command": "npx",
      "args": ["-y", "namecheap-api-mcp"],
      "env": {
        "NAMECHEAP_API_USER": "your_username",
        "NAMECHEAP_API_KEY": "your_api_key",
        "NAMECHEAP_CLIENT_IP": "your.whitelisted.ip.v4"
      }
    }
  }
}

Option: clone and build

git clone https://github.com/lanternrow/namecheap-api-mcp.git
cd namecheap-api-mcp
npm install
npm run build

Then 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.

Environment variables

Variable

Required

Description

NAMECHEAP_API_USER

Yes

Your Namecheap account username (API user).

NAMECHEAP_API_KEY

Yes

API key from Profile → Tools → API Access. Secret.

NAMECHEAP_CLIENT_IP

Yes

The whitelisted public IPv4 of this machine.

NAMECHEAP_USERNAME

No

Defaults to NAMECHEAP_API_USER; differs only for reseller sub-users.

NAMECHEAP_ENVIRONMENT

No

production (default) or sandbox.

Tools

Read

Tool

Description

check_connection

Verify credentials + IP whitelist; returns the account balance summary.

list_domains

List domains with expiry, lock, auto-renew, and WhoisGuard status (paged/searchable).

get_domain_info

Detailed info for one domain.

check_domains

Check availability + premium pricing (up to 50 at once).

get_domain_contacts

Registrant / Tech / Admin / AuxBilling contacts.

get_registrar_lock

Registrar lock status.

get_dns_hosts

All DNS host records for a domain.

get_nameservers

Nameservers and whether Namecheap DNS is in use.

get_email_forwarding

Email forwarding rules.

get_pricing

Namecheap pricing for a product type (cache the results).

list_ssl_certificates

SSL certificates with type, host, status, expiry.

Safe writes (configuration only — no charges)

Tool

Description

set_dns_hosts

Replace all host records (destructive: omitted records are deleted — send the full set).

set_default_dns

Switch a domain to Namecheap's default nameservers.

set_custom_nameservers

Point a domain at custom nameservers.

set_email_forwarding

Set email forwarding rules.

set_registrar_lock

Lock / unlock a domain at the registrar.

Notes & gotchas

  • 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.

  • 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.

  • IPv4 only for the whitelisted client IP.

Security

  • Credentials are read from environment variables only — never hard-coded, logged, or written to disk by this server.

  • 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.

License

MIT © Rex Jones

Available Tools

16 tools
check_connectionA

Verify the Namecheap API connection and credentials. Returns the account balance summary — a lightweight call that confirms the API user, key, and IP whitelist are all working.

Inputs: no named parameters.

check_domainsA

Check availability (and premium pricing) for one or more domains. Max 50 per call.

Inputs: domains (required).

get_dns_hostsB

Get all DNS host records (A, AAAA, CNAME, MX, TXT, URL, etc.) for a domain.

Inputs: domain (required).

get_domain_contactsB

Get the Registrant, Tech, Admin, and AuxBilling contact details for a domain.

Inputs: domain (required).

get_domain_infoA

Get detailed info for one domain: status, created/expiry dates, WhoisGuard, DNS provider, and modification rights.

Inputs: domain (required).

get_email_forwardingA

Get email forwarding settings (mailbox → forward-to) for a domain.

Inputs: domain (required).

get_nameserversA

Get the nameservers associated with a domain, and whether it uses Namecheap's default DNS.

Inputs: domain (required).

get_pricingA

Get Namecheap pricing for a product type (e.g. DOMAIN register/renew/transfer). Cache results — this is a heavy endpoint.

Inputs: product_type, product_category, action_name, product_name.

get_registrar_lockB

Get the registrar lock status for a domain.

Inputs: domain (required).

list_domainsA

List domains in the account, with creation/expiry dates, lock status, auto-renew, and WhoisGuard status. Supports paging and search.

Inputs: list_type, search_term, page, page_size, +1 more.

list_ssl_certificatesC

List SSL certificates in the account, with type, host name, status, and expiry.

Inputs: list_type, search_term, page, page_size.

set_custom_nameserversA

Point a domain at custom nameservers. NOTE: Namecheap host records, URL/email forwarding stop working while custom nameservers are in use.

Inputs: domain (required), nameservers (required).

set_default_dnsA

Switch a domain to Namecheap's default (BasicDNS) nameservers. Required for Namecheap host records, URL/email forwarding.

Inputs: domain (required).

set_dns_hostsA

Replace ALL DNS host records for a domain. WARNING: this is destructive — Namecheap deletes any record not included here, so you must pass the COMPLETE desired record set (call get_dns_hosts first, merge your changes, then send everything). Switches the domain to Namecheap DNS if needed.

Inputs: domain (required), records (required), email_type.

set_email_forwardingA

Set email forwarding rules for a domain. Replaces the full forwarding set (pass all rules you want to keep).

Inputs: domain (required), forwards (required).

set_registrar_lockA

Lock or unlock a domain at the registrar (theft protection). Unlock before initiating an outbound transfer.

Inputs: domain (required), action.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 16 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: connection check, domain availability, DNS management, contacts, info, pricing, registrar lock, etc. There is no overlap or ambiguity between any two tools.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern in snake_case (e.g., check_domains, get_dns_hosts, set_registrar_lock). The verbs are uniform (check, get, list, set) and there are no deviations.

    Tool Count5/5

    With 16 tools, the set feels well-scoped for a domain and DNS management API. It covers essential operations without being overwhelming, and each tool adds clear value.

    Completeness3/5

    The tool set covers many aspects (DNS, contacts, pricing, SSL listing), but lacks fundamental lifecycle operations like domain registration, renewal, or transfer. This is a notable gap given the server's domain management focus.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to perform comprehensive domain management tasks through the Name.com API, including registration, DNS management, and transfers. It dynamically generates tools from the OpenAPI specification to facilitate natural language interaction with all Name.com services.
      270 npm
      3
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Provides integration with the Namecheap API for domain management operations, including domain listing, availability checks, and nameserver configuration. It allows users to interact with their Namecheap account through natural language commands in MCP-compatible clients.
      3
      34 npm
      20
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server that wraps the Namecheap API, enabling AI assistants to manage domains, DNS records, SSL certificates, and account information.
      2
      12 npm
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables interaction with the NameSilo Domain API through 67 tools for domain registration, transfers, DNS management, contacts, privacy, forwarding, email, portfolios, account funds, marketplace, and auctions.
      67
      MIT