Custom Domain API

io.github.siretov0.11.1更新于 Oct 10, 2026

Register a SaaS app's customer hostnames, show their DNS records and checks, recheck or delete them.

概览

AI 生成的概览

让助手通过 Custom Domain API 注册、查看、重新检查并删除客户的自定义主机名。

功能
封装 Custom Domain API,让助手可以为某个工作区注册客户的主机名,并返回需要交付的 DNS 记录。它可以获取单个域名的状态、记录和四项检查结果,按工作区或状态分页列出域名,并把 DNS 记录整理成带逐条说明的文本。它还支持在 DNS 修复后重新检查域名、删除主机名,以及列出不含密钥的 webhook 订阅。
适用场景
适用于 SaaS 应用允许客户把自己的主机名指向该应用的场景:让助手完成主机名接入、向客户解释 DNS 记录,或排查域名为何尚未生效。它面向客服与接入流程,而不是通用 DNS 管理。
运行要求
以 stdio 方式在本地运行,通过 uvx 或 pip 安装,因此需要 Python 和该软件包。必须设置两个环境变量:CUSTOM_DOMAIN_API_URL(https 边缘地址)和 CUSTOM_DOMAIN_API_KEY(以 cd_ 开头的应用 API 密钥)。仅支持桌面端 MCP 客户端,没有网页版。
安装前请注意
服务器持有应用 API 密钥(CUSTOM_DOMAIN_API_KEY),因此拥有该应用后端的能力,但不能执行运营方操作。delete_domain 会停止提供该主机名并将其删除,被标记为破坏性操作;服务器要求助手先复述主机名,并且只在你明确要求删除该域名时才调用。不提供 webhook 创建与轮换,因为响应中带有签名密钥。主机名、工作区引用、元数据和检查信息来自客户与 DNS,应视为数据而非指令。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

custom-domain-mcp

An MCP server for the Custom Domain API. It lets an AI assistant (Claude, Cursor, any MCP client) register your customers' hostnames, show them their DNS records, check why a domain isn't live yet, and recheck or delete it. It acts as one application, with that application's own API key.

Setup

bash
uvx custom-domain-mcp        # or: pip install custom-domain-mcp

It reads two settings from the environment:

SettingValue
CUSTOM_DOMAIN_API_URLyour edge, such as https://edge.example.net (https only; plain http just for localhost)
CUSTOM_DOMAIN_API_KEYan application API key (cd_…)

Claude Code:

bash
claude mcp add custom-domain --env CUSTOM_DOMAIN_API_URL=https://edge.example.net \  --env CUSTOM_DOMAIN_API_KEY=cd_... -- uvx custom-domain-mcp

Claude Desktop, Cursor and other clients (mcpServers in their config):

json
{  "mcpServers": {    "custom-domain": {      "command": "uvx",      "args": ["custom-domain-mcp"],      "env": {        "CUSTOM_DOMAIN_API_URL": "https://edge.example.net",        "CUSTOM_DOMAIN_API_KEY": "cd_..."      }    }  }}

Tools

ToolDoes
create_domainRegister a customer's hostname for a workspace; returns its DNS records. Safe to retry.
get_domainA domain with its status, records and the four checks.
list_domainsDomains, filtered by workspace or status, paged.
dns_instructionsThe records as text for the customer, with help for each.
recheck_domainRun the checks again after a DNS fix (once a minute per domain).
delete_domainStop serving a hostname and delete it (marked destructive).
list_webhooksWebhook subscriptions, without secrets.

What it can't do

  • No operator actions. It never holds an operator token, only the application's key, so it can do exactly what the application's backend can.
  • No webhook creation or rotation. Their responses carry the signing secret, which would end up in the assistant's conversation. Create webhooks through the API or the portal.

Customer data is data, not instructions. Hostnames, workspace references, metadata and check messages come from your application's customers and from DNS. The server tells the assistant to report them, never to follow them, and to call delete_domain only when you explicitly asked for that domain to be deleted, repeating its hostname back to you first. Your MCP client's own confirmation for destructive tools adds a second check.

The server's instructions also tell the assistant the one rule integration code must follow: select the tenant from the verified X-Custom-Domain-Assertion, never from Host (verifying requests).

来源:mcp-server/README.md,提交 0434ba1

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.11.1最新Oct 10, 2026