Skip to main content
Glama
johnsorrentino

MCP Namecheap Server

MCP Namecheap Server

A Model Context Protocol (MCP) server that provides integration with the Namecheap API for domain management operations.

Features

I only added the functionality I use and I don't think it's a good idea to allow an agent to register domains. The complete set of Namecheap API methods can be found here.

  • Get Domain List: Retrieve all domains in your Namecheap account

  • Check Domain Availability: Check if domains are available for registration

  • Set Custom DNS: Configure custom nameservers for your domains

  • Configurable Tools: Enable/disable specific tools to control what's available in Cursor

Related MCP server: Namecheap MCP Server

Prerequisites

Before using this MCP server, you need:

  1. Namecheap Account Requirements:

    • At least 20 domains under your account

    • $50 on your account balance

    • $50 spent within the last 2 years

  2. API Access Setup:

    • Enable API access in your Namecheap dashboard

    • Obtain your API key

    • Whitelist your IP address

Installation

  1. Clone this repository:

git clone <repository-url>
cd mcp-namecheap
  1. Install dependencies:

npm install
  1. Build the project:

npm run build

Configuration

Create a .env file with your Namecheap credentials:

NAMECHEAP_API_USER=your_api_username
NAMECHEAP_API_KEY=your_api_key
NAMECHEAP_USERNAME=your_namecheap_username
NAMECHEAP_CLIENT_IP=your_whitelisted_ip_address

Or reference the mcp-config.json file which shows all available environment variables.

Tool Configuration

You can enable/disable specific tools by setting these environment variables:

  • NAMECHEAP_ENABLE_GETLIST - Enable domain list retrieval (default: true)

  • NAMECHEAP_ENABLE_CHECK - Enable domain availability checking (default: true)

  • NAMECHEAP_ENABLE_SETCUSTOM - Enable custom DNS configuration (default: true)

Set any of these to false to disable the corresponding tool.

Sandbox Mode

For testing, you can use Namecheap's sandbox environment:

NAMECHEAP_SANDBOX=true

Usage

Running the Server

npm start

Available Tools

1. Get Domain List (namecheap_get_domain_list)

Returns a list of all domains in your Namecheap account with details including expiration dates, auto-renewal status, and DNS configuration.

Parameters: None

2. Check Domain Availability (namecheap_check_domain_availability)

Checks the availability of one or more domains for registration.

Parameters:

  • domains (array): Array of domain names to check (e.g., ["example.com", "test.org"])

3. Set Custom DNS (namecheap_set_custom_dns)

Sets custom nameservers for a domain. Note that services like URL forwarding, email forwarding, and dynamic DNS will not work with custom nameservers.

Parameters:

  • domain (string): The domain name (e.g., "example.com")

  • nameservers (array): Array of nameserver addresses (1-12 nameservers)

MCP Client Configuration

To use this server with an MCP client like Cursor, add the following to your MCP configuration:

{
  "mcpServers": {
    "namecheap": {
      "command": "node",
      "args": ["path/to/mcp-namecheap/dist/index.js"],
      "env": {
        "NAMECHEAP_API_USER": "your_api_username",
        "NAMECHEAP_API_KEY": "your_api_key",
        "NAMECHEAP_USERNAME": "your_namecheap_username",
        "NAMECHEAP_CLIENT_IP": "your_whitelisted_ip_address"
      }
    }
  }
}

Development

Scripts

  • npm run build - Build the TypeScript project

  • npm run dev - Run in development mode with tsx

  • npm start - Run the built project

Project Structure

src/
├── index.ts          # Main MCP server implementation
├── namecheap-client.ts # Namecheap API client
└── types.ts          # TypeScript type definitions

API Reference

This server uses the following Namecheap API endpoints:

  • namecheap.domains.getList - Retrieve domain list

  • namecheap.domains.check - Check domain availability

  • namecheap.domains.dns.setCustom - Set custom nameservers

For more information, see the Namecheap API documentation.

Error Handling

The server includes comprehensive error handling for:

  • Missing or invalid API credentials

  • Network connectivity issues

  • Namecheap API errors

  • Invalid parameters

  • Disabled tools

Security Considerations

  • Store API credentials securely

  • Keep your IP whitelist updated

  • Use environment variables for sensitive configuration

  • Consider using the sandbox environment for testing

License

MIT

Available Tools

3 tools
namecheap_check_domain_availabilityC

Check the availability of one or more domains

ParametersJSON Schema
NameRequiredDescriptionDefault
domainsYesArray of domain names to check (e.g., ["example.com", "test.org"])

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action but lacks details on traits like rate limits, authentication requirements, response format (e.g., returns availability status per domain), or error handling. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's purpose without redundancy. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It doesn't explain the return values (e.g., what availability data looks like), error conditions, or behavioral constraints. For a tool with minimal structured data, the description should provide more context to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'domains' fully documented in the schema as an array of domain names. The description adds no additional meaning beyond what the schema provides (e.g., no examples of valid formats beyond the schema's example). Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Check') and resource ('availability of one or more domains'), making the purpose unambiguous. It doesn't explicitly differentiate from sibling tools like 'namecheap_get_domain_list' (which likely lists owned domains) or 'namecheap_set_custom_dns' (which configures DNS), but the action is specific enough to imply distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), context for checking availability (e.g., before registration), or comparisons to siblings like 'namecheap_get_domain_list' for owned domains. Usage is implied by the action but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

namecheap_get_domain_listB

Get a list of all domains in your Namecheap account

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it's a read operation ('Get'), but doesn't mention authentication requirements, rate limits, pagination behavior, or what the returned list includes (e.g., domain status, expiration dates). This leaves significant gaps for a tool that presumably accesses account data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states what the tool does without any unnecessary words. It's appropriately sized and front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description provides the minimum viable information about what the tool does. However, without annotations or output details, it doesn't fully address behavioral aspects like authentication needs or return format, leaving some contextual gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the input structure. The description appropriately doesn't add parameter information, maintaining focus on the tool's purpose. A baseline of 4 is appropriate for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('list of all domains in your Namecheap account'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'namecheap_check_domain_availability' or 'namecheap_set_custom_dns', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites, limitations, or relationships to sibling tools, leaving the agent to infer usage context independently.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

namecheap_set_custom_dnsC

Set custom DNS nameservers for a domain

ParametersJSON Schema
NameRequiredDescriptionDefault
domainYesThe domain name (e.g., "example.com")
nameserversYesArray of nameserver addresses (e.g., ["ns1.example.com", "ns2.example.com"])

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a 'Set' operation (implying mutation), but doesn't clarify permissions required, whether changes are immediate or propagate over time, if there are rate limits, or what happens on success/failure. This leaves critical behavioral aspects undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately scannable and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, or important behavioral constraints. The 100% schema coverage helps with inputs, but overall context for safe and effective use is lacking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are well-documented in the schema itself. The description adds no additional parameter context beyond what's already in the schema (domain format, nameserver array structure). This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Set') and resource ('custom DNS nameservers for a domain'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like domain checking or listing, but the verb 'Set' implies a configuration change distinct from those read-only operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives or prerequisites. It doesn't mention if this should be used instead of default DNS settings, what happens to existing nameservers, or any dependencies like domain ownership verification.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 3 tool updatesv1.0.0
    • First observednamecheap_check_domain_availability
    • First observednamecheap_get_domain_list
    • First observednamecheap_set_custom_dns

TDQS

B3.2/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: checking domain availability, listing owned domains, and setting DNS nameservers. The descriptions clearly differentiate these three separate operations in the domain management workflow.

Naming Consistency5/5

All three tools follow a perfect namecheap_verb_noun pattern with consistent snake_case formatting. The naming convention is predictable and readable throughout the entire tool set.

Tool Count3/5

With only 3 tools, this server feels somewhat thin for a comprehensive domain management system. While the tools cover core operations, typical domain management would include additional functionality like domain registration, renewal, transfer, or contact management.

Completeness2/5

There are significant gaps in the domain management lifecycle. The server lacks essential operations like registering a domain after checking availability, renewing domains, transferring domains, or managing domain contacts/settings beyond DNS. This creates dead ends in typical domain management workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers