own-domain-mcp
Provisions own-domain email for families using Cloudflare's API, enabling automatic setup of email routing, catch-all forwarding, and verified destinations.
README
own-domain-mcp
One command to give a family their own-domain email — provisioned end to end on the MCP → API path, idempotently, for the whole fleet.
Every family/service account is registered under that family's own domain (service@theirdomain, owner@theirdomain). For those addresses to actually receive vendor sign-up and verification mail, the domain needs Cloudflare Email Routing: a verified destination, MX records, and a forward rule. This server does all of it via the Cloudflare REST API.
Why MCP → API (and why we keep it that way)
Direct API is the path; the browser is the last resort.
- Deterministic & fast. A REST call is one round trip with a known result. Driving the Cloudflare dashboard with simulated clicks (
cliclick+ screenshots) is slow, brittle, and breaks on any UI change. The day this tool was born, expanding one API token's scope had to be done by clicking dashboard dropdowns because Cloudflare won't let a token widen its own scope — that pain is exactly what we never want to repeat for a repeatable task. - Least privilege. A scoped API token (Zone Email Routing Rules + DNS, Account Email Routing Addresses) can do everything here except first-time enable. No full logged-in session, no password, no 2FA in the loop.
- Composable forever. Because it's an MCP wrapping the API, the agent/fleet calls it the same way every time, and it composes into the unified
super-mcp.
The one honest gap
Cloudflare does not grant the first-time POST /email/routing/enable (and the /email/routing settings GET) to scoped API tokens. This tool:
- tries the scoped token,
- falls back to a global API key if one is configured (
CLOUDFLARE_EMAIL+CLOUDFLARE_GLOBAL_API_KEY, or Keychaincloudflare-global-api-key) — keeping enable on the API path too, - otherwise reports
enable: blockedwith guidance and still sets the catch-all/rules, which activate the instant routing is enabled (one dashboard click, once per zone).
Everything else — destinations, catch-all, rules, status — is pure scoped-token API.
Tools
| Tool | What it does |
|---|---|
own_domain_targets |
List eligible family domains (all zones minus the exclude policy) + the forward-to inbox. Read-only. |
own_domain_status |
Per-domain (or fleet-wide) routing state: enabled, destination verified, catch-all target, functional. Read-only. |
own_domain_destination_ensure |
Ensure the forward-to inbox is a verified account destination (creates + triggers verification). confirm. |
own_domain_provision |
Full idempotent setup for ONE domain: destination → enable → catch-all/addresses → status. confirm. |
own_domain_fanout |
The same for EVERY eligible family domain — the one fleet command. confirm. |
Policy / safety
config/own-domains.json (env-overridable):
forwardTo— the inbox every address forwards to (e.g.you@example.com).mode—catch_all(forward every address) oraddresses(onlyowner@,service@).exclude— zones never touched. Empty by default; add any zone you never want catch-all'd to a personal inbox (e.g. a medical/PHI domain, or shared infrastructure).include— optional allowlist; when empty, all zones exceptexcludeare eligible.
Config
npm install && npm run build
claude mcp add own-domain -- node /path/to/own-domain-mcp/dist/index.js
Credentials (env first, then macOS Keychain):
- Scoped token:
OWN_DOMAIN_CF_TOKEN/CLOUDFLARE_API_TOKEN, or Keychaincloudflare-api-token/cloudflare-email-routing-token(account fromCLOUDFLARE_KEYCHAIN_ACCOUNTor$USER). - Optional global key (enable only):
CLOUDFLARE_EMAIL+CLOUDFLARE_GLOBAL_API_KEY, or Keychaincloudflare-global-api-key.
Env overrides: OWN_DOMAIN_FORWARD_TO, OWN_DOMAIN_MODE, OWN_DOMAIN_CONFIG, OWN_DOMAIN_ACCOUNT_ID.
npm test # unit tests (mock fetch, no live API)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。