关于 domani
domani 为个人和 AI Agent 提供域名注册、DNS 管理与电子邮件服务,可通过网页应用、命令行、API 和 Agent 集成使用。其 MCP 桥接程序在本地处理凭据,并将请求转发到 Domani 托管服务。
主要功能
- 01搜索、建议、购买和续费域名
- 02管理 DNS 记录并连接服务提供商
- 03创建邮箱并收发电子邮件
- 04使用多个账户和有范围限制的凭据
- 05提供结构化 JSON 输出和命令模式
适用场景
- 01为项目查找并注册域名
- 02为受支持的托管服务配置 DNS
- 03创建项目邮箱并转发收到的邮件
- 04让 Agent 管理域名而不暴露 API 密钥
MCP 相关
命令行提供 stdio MCP 桥接程序,在本地解析凭据并将 MCP 请求转发到 https://domani.run/mcp。登录凭据可存入操作系统钥匙串,也可申请有范围限制且会过期的访问权限。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://domani.run/mcpclaude mcp add --transport http run-domani-domani https://domani.run/mcp{"mcpServers":{"run-domani-domani":{"type":"http","url":"https://domani.run/mcp"}}}在 Cursor 中打开{"servers":{"run-domani-domani":{"type":"http","url":"https://domani.run/mcp"}}}在 VS Code 中打开{"mcpServers":{"run-domani-domani":{"type":"http","url":"https://domani.run/mcp"}}}{"mcpServers":{"run-domani-domani":{"serverUrl":"https://domani.run/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
domani
域名和电子邮件,服务于人类和 AI Agent。
注册域名、管理 DNS、创建邮箱、发送和接收电子邮件。可通过终端、Agent 或 Web 使用。
工作原理
domani 为你提供一个账户和多种接入方式:
- Web - 带完整收件箱(撰写、回复、邮件会话)、DNS 编辑器和域名管理功能的控制面板
- CLI - 本软件包。可在终端使用 Web 应用的所有功能
- MCP Server - 为 Claude Code、Cursor、Codex 以及任何兼容 MCP 的 Agent 提供类型化工具
- OpenClaw -
openclaw skills install @gwendall/domani - Agent Skill - Agent 可遵循的分步指南。使用
npx skills add domani.run安装 - REST API - 通过 HTTP 直接访问所有功能
所有界面共用同一个 API 密钥和相同的数据。
安装
npm install -g domani-cli
安全的 MCP 桥接
Agent 插件可使用 Domani,而无需将 API 密钥放入提示词、Shell 历史记录或编辑器配置中:
domani login --surface mcp
domani mcp serve
domani login 会在操作系统密钥链可用时将凭据存储其中。stdio 桥接会在本地解析凭据,并将 MCP 请求转发到
https://domani.run/mcp;标准输出仅用于 JSON-RPC 消息。
若要将桥接固定到多个已保存账户中的某一个,可使用
DOMANI_ACCOUNT=<name> domani mcp serve 启动(或使用 domani --account <name> mcp serve)。
如果 Agent 代表他人操作,请申请具有限定权限且会过期的凭据,而不要使用对方的账户密钥:
domani login --scopes domains:read,search --label "Project agent" --expires-in 86400
审批页面会显示所申请的访问权限,生成的凭据会存入密钥链,不会打印出来。
登录后,先验证完整的邮件收取流程,再浏览其他工具或购买域名:
domani email create [email protected]
domani email webhook [email protected] --url https://my-agent.example/webhook
domani email webhook-test [email protected]
如果通过插件、技能或 API 接入,请使用 --surface plugin、--surface skill 或 --surface api。
这样可以确保激活归因一致,同时不会暴露凭据。
此操作会安装 domani 命令。也可以直接使用 npx 运行:
npx domani-cli search myapp .com .dev .ai
快速入门
# Domain
domani search myapp .com .io .dev # Check availability
domani buy myapp.dev # Purchase a domain
domani connect myapp.dev vercel # Auto-configure DNS for Vercel
# Email
domani email create [email protected] # Create [email protected]
domani email send [email protected] \
--to [email protected] --subject "Hello" --body "Sent from my terminal"
domani email forward [email protected] \
--forward-to [email protected] # Forward inbound to personal email
# Health
domani status myapp.dev # DNS, SSL, email, expiry check
示例
# Find available domains with a budget
domani search startup --expand --max-price 20
# AI-powered name suggestions
domani suggest "minimalist productivity app" --style brandable --tlds com,dev,ai
# Buy multiple domains at once
domani buy startup.dev startup.ai --yes
# Set up Vercel + Google Workspace in two commands
domani connect startup.dev vercel
domani connect startup.dev google-workspace
# Full email workflow: create, send, check inbox, forward
domani email create [email protected]
domani email send [email protected] \
--to [email protected] --subject "Deck" --body "Here's our deck."
domani email inbox [email protected] --direction in
domani email forward [email protected] --forward-to [email protected]
# Webhook for inbound emails (for bots, support systems, etc.)
# CURSOR_AUTH contains the complete value, e.g. "Bearer sender-key"
domani email webhook [email protected] --url https://myapp.dev/hooks/email \
--authorization-env CURSOR_AUTH
domani email webhook-test [email protected]
# Provision domain + mailbox + authenticated event webhook in one call.
# The secret stays in the environment; only its variable name is in argv.
AGENT_AUTH="Bearer sender-key" domani provision agent.dev \
--webhook https://agent.example/inbox --authorization-env AGENT_AUTH
# Export DNS records before making changes
domani dns startup.dev snapshot
domani dns startup.dev set TXT @ "v=spf1 include:_spf.google.com ~all"
# Pipe to jq (auto-JSON when piped, no --json needed)
domani list | jq '.domains[] | {domain, expires_at}'
# Introspect command schemas for agent integration
domani schema buy --json
命令
域名
domani search <name> [tlds...] Check availability across TLDs (--expand for 30+)
domani suggest <prompt> AI-powered domain suggestions (--style, --lang, --tlds)
domani buy <domains...> Purchase one or more domains
domani adopt <domain> Inspect and plan a safe connection or transfer
domani transfer <domain> Transfer registration, preserving current nameservers
domani renew <domain> Renew a domain (--years 1-10)
domani import <domain> Import a domain you own elsewhere (DNS monitoring only)
domani list List your domains
domani status <domain> Health check (DNS, SSL, email, expiry)
domani tlds List all TLDs with pricing (--sort, --max-price)
domani whois <domain> WHOIS/RDAP lookup
domani deals [id] Marketplace deals (--role, --status, --limit, --cursor) or one deal
电子邮件
domani email list List all mailboxes
domani email create user@domain Create a mailbox
domani email delete user@domain Delete a mailbox
domani email inbox user@domain List messages (--folder, --view, --direction, --since, --until, --cursor)
domani email folders user@domain List folder and view counts
domani email contacts Address book (--q, --cursor; --order created for a full sync)
domani email archive user@domain --message-ids m1,m2
domani email trash user@domain --message-ids m1
domani email restore user@domain --message-ids m1
domani email read|unread|star|unstar user@domain --message-ids m1,m2
domani email send user@domain Send an email (--to, --subject, --body, --cc, --bcc)
domani email forward user@domain Forward inbound to a personal address (--forward-to)
domani email webhook user@domain Forward inbound as JSON (--url, --authorization-env, --api-key-env, --clear-headers)
domani email webhook-test user@domain Deliver one signed test event to the configured webhook
domani email setup --domain <domain> Auto-configure MX, SPF, DKIM, DMARC
domani email status --domain <domain> Check email DNS health
domani email connect --domain <domain> <provider> Connect external provider (Gmail, Fastmail, Proton)
Mailzero 助手(私人预览版)
domani assistant today Now, Needs you, Waiting, Upcoming, Handled
domani assistant settings Opt-in state, consent, and mailbox scope
domani assistant set Change settings (--enable, --shadow, --pause, --mailboxes, --none, --days)
domani assistant preview Record consent and start a background history import (--mailboxes, --consent)
domani assistant backfill|retry Follow the import or requeue its terminal failures
domani assistant item <id> One work item with its Decision and options
domani assistant choose <id> Record a decision (--item-version, --decision, --decision-version, --option)
domani assistant instruct|snooze|ignore|take-over|correct <id>
domani assistant plan <id> Exact preview of a prepared reply; nothing is sent by the CLI
domani assistant activity Content-free interaction and receipt log
domani assistant rules The standing delegations (match, assignee, level, grants)
domani assistant approvals The plans waiting for you and the questions your agents asked
domani assistant suggestions The rules the assistant proposes from what recurred
domani assistant metrics The seven numbers per account and per rule (--days)
domani assistant task <id> The task envelope an assignee works from
domani assistant lease|release|effects|escalate|report <id>
domani assistant export|delete Export or delete derived data (source mail is never touched)
读取需要 assistant:read 权限,修改需要 assistant:write 权限。
DNS
domani dns <domain> get List all DNS records
domani dns <domain> set <type> <name> <value> Add/update a record
domani dns <domain> delete <type> <name> Remove a record
domani dns <domain> snapshot Export DNS to file
domani dns <domain> restore Restore DNS from snapshot
domani nameservers <domain> Get or set nameservers (--reset for defaults)
domani connect <domain> <target> Auto-configure DNS for a provider
domani route [action] [id] Short-lived HTTP routes (list: --domain, --status, --limit, --cursor)
支持的服务提供商:Vercel、Netlify、Cloudflare Pages、GitHub Pages、Fly.io、Railway、Render、Google Workspace、Fastmail、Proton Mail。
设置
domani settings <domain> View/update auto-renew, WHOIS privacy, security lock
domani contact [view|set] Manage WHOIS contact info
domani parking <domain> Manage parking page (enable/disable/price)
domani analytics <domain> View parking analytics
domani auth-code <domain> Get EPP auth code for outbound transfer
domani transfer-away <domain> Check outbound transfer status
账户
domani login Log in to domani.run (opens browser)
domani logout Forget the current account's login (--account <name> for another)
domani accounts List saved accounts, * marks the one in use
domani use <name> Switch the active account
domani me Show account info and the CLI account in use
domani billing Add or update payment method (opens browser)
domani invoices List payment invoices
domani notifications List notifications (--unread, --limit, --cursor; --read marks all read)
domani token Print your API key
domani tokens [list|create|revoke] Manage API tokens (scoped, expiring)
domani webhooks [action] Manage webhook endpoints (auth headers via --authorization-env/--api-key-env)
自检
domani schema [command] Show command schemas for AI agent integration
domani update Update to the latest version
domani uninstall Remove domani CLI and config
Agent 集成
专为 AI Agent 和脚本打造,而不只是面向人类。
TTY 自动检测:当标准输出不是终端时,CLI 会自动切换为 JSON 输出,并跳过确认提示。无需使用 --json 标志。
domani list | jq '.domains[].domain'
分页:如果还有下一页,列表命令会输出 More: --cursor <next_cursor>(在 JSON 模式下,读取 next_cursor);将其传回 --cursor,即可获取下一页。
结构化错误:在 JSON 模式下,错误包含 code、hint 和 fix_command,便于自动恢复:
{ "error": "Not logged in", "code": "auth_required", "fix_command": "domani login" }
| Code | 修复方式 | 描述 |
|---|---|---|
auth_required | domani login | 尚未登录 |
payment_required | domani billing | 尚未保存付款方式 |
contact_required | domani contact set | 缺少 WHOIS 联系信息 |
validation_error | 读取 hint | 输入无效 |
not_found | - | 域名不存在或不属于你 |
rate_limited | 等待 Retry-After | 请求过多 |
标志:
| 标志 | 描述 |
|---|---|
--json | 强制使用 JSON 输出 |
--fields <f> | 筛选 JSON 字段(以逗号分隔) |
--dry-run | 预览变更操作,但不执行 |
--yes | 跳过确认提示 |
输入强化:所有输入都会针对路径遍历、控制字符、查询字符串和双重编码进行验证,这些都是 Agent 常见的幻觉内容。
架构内省:运行 domani schema <command> --json,即可在构造命令前获取参数类型、约束和枚举值。
付款
域名费用会从你保存的银行卡中扣除。可通过 domani.run/dashboard 添加银行卡,也可以运行 domani card add。
domani buy myapp.dev # Charged to saved card
身份验证
| 方法 | 描述 |
|---|---|
domani login | 交互式登录(打开浏览器) |
$DOMANI_API_KEY | 作为环境变量提供的 API 密钥 |
| OS keychain | 如果可用,domani login 会将凭据保存到此处 |
~/.domani/config.json | 非机密 CLI 设置;在没有密钥链的系统上也会作为旧版备用方案 |
CLI 会先检查 $DOMANI_API_KEY,然后再回退到已保存的登录凭据。
domani login # Interactive (opens browser)
export DOMANI_API_KEY=domani_sk_... # Or set env var
多个账户
CLI 可以保存多个 Domani 账户,每个账户都有一个名称和独立的 密钥链条目:
domani login --account work # save a second account as "work"
domani accounts # list them; * marks the one in use
domani use work # make "work" the active account
domani --account personal list # use another account for one command
DOMANI_ACCOUNT=work domani mcp serve # pin an agent's MCP bridge to "work"
domani logout --account work # forget that login only
命令使用凭据的优先顺序为:DOMANI_API_KEY、--account、
DOMANI_ACCOUNT,然后是当前活动账户。domani me 会显示当前使用的账户,
而购买、续费和转移确认信息会在扣款前注明该账户。较早版本 CLI 保存的登录
会成为 default 账户,无需进行任何额外操作。
可通过 domani tokens create --scopes read,dns --expires-in 86400 创建范围受限的 API 令牌。
环境变量
| 变量 | 描述 |
|---|---|
DOMANI_API_KEY | API 密钥(优先于已保存的配置) |
DOMANI_ACCOUNT | 要使用的已保存 CLI 账户(优先级低于 --account,高于 domani use) |
DOMANI_CONFIG_DIR | 配置目录(默认值为 ~/.domani) |
许可证
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。