Gandi MCP Server

Gandi MCP Server

Enables AI assistants to manage Gandi domains and LiveDNS records directly via the Gandi API v5. It supports comprehensive domain management operations and full CRUD functionality for various DNS record types.

Category
访问服务器

README

Gandi MCP Server

npm version License: MIT MCP Compatible

A comprehensive Model Context Protocol (MCP) server for managing Gandi domains and DNS records via the Gandi API v5. This server enables AI assistants like Claude to manage domains and LiveDNS records directly through Gandi's API.

Features

🌐 Domain Management

  • List Domains: View all domains in your account
  • Domain Details: Get comprehensive domain information
  • Domain Check: Check domain availability for registration
  • Contact Management: List domain contacts

📝 LiveDNS Management

  • DNS Records: Full CRUD operations for DNS records
  • Record Types: Support for A, AAAA, CNAME, MX, NS, PTR, SRV, TXT, CAA
  • Smart Filtering: Filter records by type or name
  • TTL Control: Manage record time-to-live settings

🛡️ Security & Reliability

  • Secure Authentication: Environment-based API token management
  • Error Handling: Comprehensive error handling with clear messages
  • Type Safety: Full TypeScript support with proper type definitions

Quick Start

Run the server directly with npx (requires Node.js 18+):

npx @artik0din/mcp-gandi

Or install locally:

npm install -g @artik0din/mcp-gandi
mcp-gandi

Environment Variables

Create a .env file in your working directory:

Variable Required Description
GANDI_API_TOKEN Your Gandi API token with domain and LiveDNS permissions

Getting Your Gandi API Token

  1. Log in to Gandi Dashboard
  2. Go to Organizations > [Your Organization] > Billing & Cards
  3. Click on Account Settings > Security
  4. In the API Keys section, click Generate API keys
  5. Create a new API key with:
    • Domain: See and edit permissions
    • LiveDNS: See and edit permissions
    • Billing: See permission (optional, for domain pricing)

MCP Client Configuration

Claude Desktop

Add this to your Claude Desktop configuration:

{
  "mcpServers": {
    "gandi": {
      "command": "npx",
      "args": ["@artik0din/mcp-gandi"],
      "env": {
        "GANDI_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Other MCP Clients

Use the command npx @artik0din/mcp-gandi with the appropriate environment variables set.

Available Tools

Domain Management Tools

gandi_domains_list

List all domains in your Gandi account.

Parameters: None

Example:

List all my Gandi domains

gandi_domains_get

Get detailed information about a specific domain.

Parameters:

  • domain (string, required): Domain name (e.g., example.com)

Example:

Get details for domain example.com
Show information about mydomain.net

gandi_domains_check

Check if a domain name is available for registration.

Parameters:

  • domain (string, required): Domain name to check

Example:

Check if newdomain.com is available
Is example.org available for registration?

gandi_domains_contacts

List contacts associated with a domain.

Parameters:

  • domain (string, required): Domain name

Example:

Show contacts for example.com
List contact information for mydomain.net

DNS Management Tools

gandi_dns_records_list

List all DNS records for a domain.

Parameters:

  • domain (string, required): Domain name
  • type (string, optional): Filter by record type (A, AAAA, CNAME, MX, NS, PTR, SRV, TXT, CAA)

Example:

List all DNS records for example.com
Show A records for mydomain.net
Get MX records for example.org

gandi_dns_record_get

Get a specific DNS record by name and type.

Parameters:

  • domain (string, required): Domain name
  • name (string, required): Record name (e.g., www, @, subdomain)
  • type (string, required): Record type

Example:

Get A record for www.example.com
Show CNAME record for blog subdomain of mydomain.net

gandi_dns_record_create

Create a new DNS record.

Parameters:

  • domain (string, required): Domain name
  • name (string, required): Record name (e.g., www, @, subdomain)
  • type (string, required): Record type (A, AAAA, CNAME, MX, NS, PTR, SRV, TXT, CAA)
  • values (array, required): Record values (IP addresses, hostnames, text content)
  • ttl (number, optional): TTL in seconds (300-2592000, defaults to 300)

Example:

Create an A record for www pointing to 1.2.3.4 for example.com
Add CNAME record for blog pointing to www.example.com with TTL 3600
Create MX record for @ pointing to mail.example.com with TTL 1800

gandi_dns_record_update

Update an existing DNS record.

Parameters:

  • domain (string, required): Domain name
  • name (string, required): Record name
  • type (string, required): Record type
  • values (array, required): New record values
  • ttl (number, optional): New TTL in seconds

Example:

Update A record for www.example.com to point to 5.6.7.8
Change TTL of CNAME record for blog.mydomain.net to 7200 seconds
Update MX record for example.org to use new mail server

gandi_dns_record_delete

Delete a DNS record.

Parameters:

  • domain (string, required): Domain name
  • name (string, required): Record name
  • type (string, required): Record type

Example:

Delete A record for old.example.com
Remove CNAME record for staging subdomain
Delete old MX record for example.org

DNS Record Types

The server supports all standard DNS record types:

  • A: IPv4 address records
  • AAAA: IPv6 address records
  • CNAME: Canonical name records (aliases)
  • MX: Mail exchange records
  • NS: Name server records
  • PTR: Pointer records (reverse DNS)
  • SRV: Service records
  • TXT: Text records (SPF, DKIM, verification, etc.)
  • CAA: Certification Authority Authorization records

Security Considerations

  • API Token Security: Never commit your API token to version control
  • Minimal Permissions: Use API tokens with only the required permissions
  • Regular Rotation: Rotate API tokens regularly for security
  • Environment Variables: Always use environment variables for credentials
  • Domain Safety: Be careful when deleting DNS records in production

Error Handling

The server provides clear error messages for common scenarios:

  • Invalid API token: Check your token and permissions
  • Domain not found: Verify domain ownership and spelling
  • Record not found: Check record name, type, and domain
  • Rate limiting: Gandi API has rate limits; the server will indicate if you hit them
  • Invalid record data: Validation errors for malformed DNS records

Development

# Clone the repository
git clone https://github.com/artik0din/mcp-gandi.git
cd mcp-gandi

# Install dependencies
npm install

# Build the project
npm run build

# Run locally
npm start

API Compatibility

This server is compatible with Gandi API v5. It uses:

  • Domain API: For domain management operations
  • LiveDNS API: For DNS record management

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Credits

Built with:

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选