OnlyDNS MCP Server

io.github.Onlydns由 GitHub 账号 Onlydns 发布v1.0.6更新于 Oct 31, 2026

Model Context Protocol server for OnlyDNS to manage DNS zones, records, DNSSEC, and TSIG keys.

概览

AI 生成的概览

OnlyDNS 官方 MCP 服务器,让助手在 OnlyDNS 账户中列出和创建 DNS 区域、管理解析记录,并处理 DNSSEC 与 TSIG 密钥。

可以做什么
  • 列出账户中的域名并创建新的 DNS 区域
  • 按类型或主机名查询、添加、更新和删除 DNS 记录
  • 一次性批量替换某个区域内的全部记录
  • 查看 DNSSEC 状态与密钥,并启用或关闭 DNSSEC 签名
  • 列出、创建和查看 TSIG 密钥,并为域名附加或移除 TSIG 权限
适用场景
适合需要让助手查看或修改托管在 OnlyDNS 上的域名解析时使用,例如增删记录、检查 DNSSEC 状态,或为区域传送和动态更新配置 TSIG 密钥,而无需打开控制台。
运行要求
以 stdio 方式在本机运行,通常通过 npx 或全局 npm 安装(需要 Node.js)。需要 OnlyDNS 账户,并通过环境变量 ONLYDNS_API_TOKEN 提供 API Bearer 令牌;可用 ONLYDNS_API_BASE_URL 覆盖 API 地址。需要能访问 OnlyDNS API 的网络。
安装前请注意
该令牌可控制账户内的 DNS 区域,应视为机密。多个工具会改动线上 DNS:add_record、update_record、delete_record、create_domain、enable_dnssec、disable_dnssec、create_tsig_key、configure_domain_tsig 和 remove_domain_tsig。set_records 会替换区域内的全部记录,若遗漏原有记录将造成破坏。移除 DNSSEC 或 TSIG 密钥可能导致解析或区域传送失败。

安装

在 SourceWeft 中

  1. 打开 控制台中的 OnlyDNS MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

OnlyDNS MCP Server (@onlydns/mcp)

Official Model Context Protocol (MCP) server for OnlyDNS enabling AI agents (Claude Desktop, Cursor, Devin, LangChain) to inspect and manage DNS zones, records, 1-click DNSSEC, and TSIG keys directly. Learn more on the AI Agent Infrastructure solution page.

bash
npm install -g @onlydns/mcp

Or run instantly: npx -y @onlydns/mcp

Authentication Environment Variable: ONLYDNS_API_TOKEN (see Configuration).


Features

  • 🌐 Domain Management: List all managed domains and create new DNS zones.
  • 📝 DNS Record Operations:
    • list_records: Query DNS records with optional filtering by type (A, AAAA, CNAME, MX, TXT, SRV, CAA, etc.) or hostname.
    • add_record: Create new records or append values to existing record sets with automatic domain normalization.
    • update_record: Modify existing DNS records and update TTLs.
    • delete_record: Delete specific record values or entire record sets.
    • set_records: Batch replace full zone record sets.
  • 🔐 DNSSEC Management: Inspect DNSSEC status, fetch DS/DNSKEY records, enable, and disable DNSSEC signing.
  • 🔑 TSIG Keys: Generate and manage TSIG keys for secondary DNS zone transfers (AXFR) and RFC 2136 dynamic updates.

Installation & Quick Start

1. One-Click Desktop Installation (MCPB Bundle)

Download onlydns-mcp.mcpb directly from the GitHub Releases page. Compatible desktop clients (such as Claude Desktop) allow one-click installation and configure your ONLYDNS_API_TOKEN through a secure settings dialog.

2. Using npx (No installation needed)

You can run the server directly using npx:

bash
export ONLYDNS_API_TOKEN="your_onlydns_api_token"npx -y @onlydns/mcp

3. Global Installation

bash
npm install -g @onlydns/mcp

Configuration

The server requires an OnlyDNS API Bearer Token.

Environment Variables

VariableDescriptionDefault
ONLYDNS_API_TOKENYour OnlyDNS API Bearer Token (Required)-
ONLYDNS_API_BASE_URLOnlyDNS REST API base URLhttps://api.onlydns.com/v1

Client Integration Examples

Claude Desktop

Add the following to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
json
{  "mcpServers": {    "onlydns": {      "command": "npx",      "args": ["-y", "@onlydns/mcp"],      "env": {        "ONLYDNS_API_TOKEN": "YOUR_ONLYDNS_BEARER_TOKEN"      }    }  }}

Cursor (or Windsurf / Claude Code)

Add to your MCP settings or .cursor/mcp.json:

json
{  "mcpServers": {    "onlydns": {      "command": "npx",      "args": ["-y", "@onlydns/mcp"],      "env": {        "ONLYDNS_API_TOKEN": "YOUR_ONLYDNS_BEARER_TOKEN"      }    }  }}

Available MCP Tools

🌐 Domains

  • list_domains(limit?, offset?): Lists all domains in the account.
  • create_domain(domainName): Creates a new DNS zone for a domain.

📝 DNS Records

  • list_records(domainName, type?, name?): Lists DNS records for a domain, with optional filtering.
  • add_record(domainName, name, type, value, ttl?): Adds/appends a DNS record (e.g. A, CNAME, MX, TXT, URL, PROXY).
  • update_record(domainName, name, type, value, ttl?): Replaces values and/or TTL for a record type.
  • delete_record(domainName, name, type, value?): Deletes a record or specific value.
  • set_records(domainName, records): Batch replaces all records for a zone.

🔐 DNSSEC

  • get_dnssec(domainName): Fetches DNSSEC status and keys (DS, DNSKEY).
  • enable_dnssec(domainName): Enables DNSSEC signing for a zone.
  • disable_dnssec(domainName): Disables DNSSEC signing.

🔑 TSIG Keys

  • list_tsig_keys(): Lists all account TSIG keys.
  • get_tsig_key(keyName): Retrieves TSIG key details.
  • create_tsig_key(algorithm?): Generates a new TSIG key (hmac-sha256, hmac-sha512, etc.).
  • get_domain_tsig(domainName): Retrieves TSIG keys and permissions configured on a domain.
  • configure_domain_tsig(domainName, keyName, allowAxfr, allowDnsUpdate, subdomains?): Configures AXFR, DDNS, and optional subdomain restriction permissions for a domain.
  • remove_domain_tsig(domainName): Removes all TSIG keys from a domain.

Development & Testing

bash
# Clone and install dependenciesgit clone https://github.com/Onlydns/onlydns-mcp.gitcd onlydns-mcpnpm install
# Run unit testsnpm test
# Build TypeScriptnpm run build
# Run locally in developmentnpm run dev

License

MIT © 2026 OnlyDNS

来源:README.md,提交 fad03e6

工具

16

list_domains

List all DNS domains managed in the OnlyDNS account.

输入参数limitoffset

create_domain

Create/add a new DNS zone/domain under the OnlyDNS account.

输入参数domainName必填

list_records

List all DNS records for a domain, with optional filtering by record type (A, AAAA, CNAME, MX, TXT, etc.) or hostname.

输入参数nametypedomainName必填

add_record

Add a DNS record to a domain. Accepts relative hostnames (e.g. "testing"), domain-qualified names (e.g. "testing.example.com"), or canonical FQDNs (e.g. "testing.example.com."). If a record with the same name and type already exists, the new value is appended to the record set.

输入参数ttlname必填type必填value必填domainName必填

update_record

Update an existing DNS record set for a given name and type, completely replacing its values and/or TTL. Accepts relative names (e.g. "testing"), domain-qualified names (e.g. "testing.example.com"), or canonical FQDNs (e.g. "testing.example.com.").

输入参数ttlname必填type必填value必填domainName必填

delete_record

Delete a DNS record or specific value from a domain. Accepts relative names (e.g. "testing"), domain-qualified names (e.g. "testing.example.com"), or canonical FQDNs (e.g. "testing.example.com.").

输入参数name必填type必填valuedomainName必填

set_records

Completely replace ALL DNS records in a zone with a new list of records. Warning: destructive if omitted records are intended to be preserved.

输入参数records必填domainName必填

get_dnssec

Get DNSSEC configuration status, NSEC3 parameters, and DS / DNSKEY keys for a domain.

输入参数domainName必填

enable_dnssec

Enable DNSSEC signing for a domain in OnlyDNS.

输入参数domainName必填

disable_dnssec

Disable DNSSEC signing and remove DNSSEC keys for a domain in OnlyDNS.

输入参数domainName必填

list_tsig_keys

List all TSIG keys configured for the OnlyDNS account.

无需输入参数。

get_tsig_key

Get details for a specific TSIG key by name.

输入参数keyName必填

create_tsig_key

Generate a new TSIG key for secondary DNS transfers (AXFR) or dynamic DNS updates.

输入参数algorithm

get_domain_tsig

Get TSIG keys and permissions (AXFR transfers, dynamic DNS updates, subdomain restrictions) configured for a domain.

输入参数domainName必填

configure_domain_tsig

Attach and configure TSIG permissions (AXFR transfer / dynamic DNS updates / subdomain restrictions) for a domain.

输入参数keyName必填allowAxfr必填domainName必填subdomainsallowDnsUpdate必填

remove_domain_tsig

Remove all TSIG keys associated with a domain.

输入参数domainName必填

版本历史

2
  1. v1.0.6最新Oct 30, 2026
  2. v1.0.5Oct 29, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分