Custom Domain API — Claude Code MCP server: setup
This MCP server manages SaaS customer hostnames, exposes DNS checks, and creates setup-page links when a domain needs configuration.
claude mcp add custom-domain -e CUSTOM_DOMAIN_API_URL=<CUSTOM_DOMAIN_API_URL> -e CUSTOM_DOMAIN_API_KEY=<CUSTOM_DOMAIN_API_KEY> -- uvx custom-domain-mcpWhat Custom Domain API does
Custom Domain API gives an AI client tools to register a customer hostname for a workspace, inspect its status and DNS records, filter domain lists, rerun checks, and remove a hostname. Other tools turn DNS data into customer-facing instructions, create or revoke a setup-page link, and list webhook subscriptions without secrets.
Run it with uvx custom-domain-mcp and provide CUSTOM_DOMAIN_API_URL plus CUSTOM_DOMAIN_API_KEY. The API endpoint must use HTTPS, except for local localhost. A deployment without PUBLIC_API=true and EDGE_HOSTNAME makes link creation return connect_page_unavailable. Integration code must select the tenant from verified X-Custom-Domain-Assertion, never from Host.
What it helps with
- register a customer hostname for a workspace
- inspect DNS records and domain status
- rerun checks after a DNS change
- revoke a setup link or remove a hostname
Example prompts for the agent
- Register
app.example.comfor the workspace and show its DNS records. - Check this domain, then rerun its DNS checks after the records are fixed.
- Create a setup-page link for this domain and return it to me.
How to install Custom Domain API
Platform CLI
claude mcp add custom-domain -e CUSTOM_DOMAIN_API_URL=<CUSTOM_DOMAIN_API_URL> -e CUSTOM_DOMAIN_API_KEY=<CUSTOM_DOMAIN_API_KEY> -- uvx custom-domain-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from custom-domain-mcp <command>
Platform CLI
codex mcp add mcp-server --env CUSTOM_DOMAIN_API_URL=<CUSTOM_DOMAIN_API_URL> --env CUSTOM_DOMAIN_API_KEY=<CUSTOM_DOMAIN_API_KEY> -- uvx custom-domain-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from custom-domain-mcp <command>
Config file
{
"mcpServers": {
"mcp-server": {
"command": "uvx",
"args": [
"custom-domain-mcp"
],
"env": {
"CUSTOM_DOMAIN_API_URL": "<CUSTOM_DOMAIN_API_URL>",
"CUSTOM_DOMAIN_API_KEY": "<CUSTOM_DOMAIN_API_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from custom-domain-mcp <command>
Config file
{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"custom-domain-mcp"
],
"env": {
"CUSTOM_DOMAIN_API_URL": "<CUSTOM_DOMAIN_API_URL>",
"CUSTOM_DOMAIN_API_KEY": "<CUSTOM_DOMAIN_API_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from custom-domain-mcp <command>
Platform CLI
gemini mcp add -e CUSTOM_DOMAIN_API_URL=<CUSTOM_DOMAIN_API_URL> -e CUSTOM_DOMAIN_API_KEY=<CUSTOM_DOMAIN_API_KEY> mcp-server uvx custom-domain-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from custom-domain-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Custom Domain API
How do I install Custom Domain API in Claude Code?
Run `claude mcp add custom-domain -e CUSTOM_DOMAIN_API_URL=<CUSTOM_DOMAIN_API_URL> -e CUSTOM_DOMAIN_API_KEY=<CUSTOM_DOMAIN_API_KEY> -- uvx custom-domain-mcp`.
What does Custom Domain API do?
It registers customer hostnames, exposes DNS records and checks, creates setup-page links, and supports rechecking or deleting domains.
What is required for setup-page links to work?
The deployment must set PUBLIC_API=true and EDGE_HOSTNAME. Otherwise link creation returns connect_page_unavailable.