AGENT SETUP

Set up your coding agent for custom domains

One plugin teaches your agent our API and connects it to your account. It can then build your custom domains integration and manage your customers' domains, in Claude Code, Cursor, Codex and more.

Pick your agent
See what the prompt says
Setup prompt: paste it into any agent
Set up SaaS Custom Domains (https://saascustomdomains.com) for me in this agent.

1. If you support plugins, install the SaaS Custom Domains plugin from https://github.com/saas-custom-domains/skills. It adds the saas-custom-domains skill and the MCP server. For example:
   - Claude Code: claude plugin marketplace add saas-custom-domains/skills, then claude plugin install saas-custom-domains@saas-custom-domains
   - Codex: codex plugin marketplace add saas-custom-domains/skills, then install SaaS Custom Domains from /plugins
   - Devin: devin plugins install saas-custom-domains/skills
2. Otherwise, install the skill with: npx skills add https://github.com/saas-custom-domains/skills
   and add this remote MCP server (Streamable HTTP) to your MCP config: https://mcp.saascustomdomains.com/mcp
3. Tell me how to sign in to the MCP server. It uses OAuth, so I sign in with my SaaS Custom Domains account. Never ask for my password. If you need an API token instead, ask me to create one at https://app.saascustomdomains.com/api_tokens and to put it in the SCD_API_TOKEN environment variable.
4. Step-by-step instructions for each agent: https://saascustomdomains.com/agent-setup

SKILL VS MCP

Which one do I need?

They do different jobs. The skill is knowledge for writing code; the MCP server is access to your account. The plugin installs both.

Build

The skill

Teaches your coding agent how to add custom domains to your app with our API.

  • Writing the code that adds, checks and removes customer domains
  • Showing customers the right DNS records
  • Verifying proxied requests and webhooks
  • Works without an account, against scd-mock

“Add custom domains to this app with SaaS Custom Domains.”

Operate

The MCP server

Lets your agent or assistant work in your SaaS Custom Domains account.

  • Adding a customer's domain and getting its DNS records
  • Finding out why a domain isn't live yet
  • Managing redirects, rules and cache purges
  • Reading traffic and analytics for a domain

“Why isn't shop.northpeak.com live yet?”

WHAT YOUR AGENT GETS

Everything an agent needs to work with custom domains

The skill

A single SKILL.md that follows the open Agent Skills format. Agents load it when you work on custom domains, and it covers:

  • One-time setup: the upstream your custom domains forward to
  • Adding a customer's domain, with the options for root, www and wildcard domains
  • The DNS records to show your customer, including Cloudflare users
  • Knowing when a domain is live, with webhooks or polling
  • Serving proxied requests: the auth token check, then the X-Served-For host
  • Changing or removing a domain, and testing locally with scd-mock

Read SKILL.md or install it from GitHub with npx skills add https://github.com/saas-custom-domains/skills.

The MCP server

A remote server at https://mcp.saascustomdomains.com/mcp over Streamable HTTP, so there's nothing to install. Clients sign in with your SaaS Custom Domains account, or send an API token. Tools take hostnames like app.customer.com, not IDs.

Look up

list_accountslist_upstreamslist_custom_domainsget_custom_domainlist_redirectslist_ruleslist_custom_certificates

Change

create_upstreamadd_custom_domainverify_dnspurge_cachecreate_redirectupdate_redirectcreate_ruleupdate_rulereorder_rules

Analytics (Domain Analytics add-on)

get_traffic_statsget_web_analyticsget_analytics_over_timeget_analytics_breakdown

Delete (your client asks first)

delete_custom_domaindelete_redirectdelete_ruledelete_custom_certificatedelete_upstream

MCP server reference · MCP product page

The CLI

Terminal agents like Claude Code and Codex, your scripts and CI can use our open-source CLI. It calls the same API, takes hostnames, prints JSON with --json, and exits with documented codes.

Terminal
npx @saas-custom-domains/cli domains add app.customer.com

Sign in with scd auth login, or set SCD_API_TOKEN. CLI docs

Docs for agents

Every page on saascustomdomains.com also returns markdown when a request sends Accept: text/markdown.

Test locally with scd-mock

scd-mock runs our API and proxy on your machine, for development and CI. No account, real DNS or TLS needed.

Terminal
docker run --rm -p 4010:4010 -p 4080:4080 \
  -e SCD_MOCK_UPSTREAM_HOST=host.docker.internal \
  ghcr.io/saas-custom-domains/scd-mock:latest

The API is at http://localhost:4010/api/v1 with the token scd_test_token. Domains ending in .localhost go live after 2 seconds, so http://acme.localhost:4080/ reaches your app through the mock proxy.

EXAMPLE APPS

A guide and a runnable app for your framework

Point your agent at the example for your stack. Each one is a small multi-tenant app with custom domains that runs locally with scd-mock.

FAQ

Questions about agent setup

Do I need the skill, the MCP server, or both?

The skill helps your agent write the code that integrates custom domains into your app. The MCP server lets it work in your account: add domains, check DNS, read traffic. Most teams use both, and the plugin installs both.

What can my agent do in my account?

Anything you can, in all of your accounts. Delete tools are marked as destructive, so most clients ask you before running them. Treat an agent like a teammate you give access to.

How do I disconnect an agent?

Each connected client gets its own API token under Settings » API. Delete it to disconnect that client.

Does it cost extra?

No. There's no charge for the plugin, the skill or MCP tool calls. You pay per domain, as usual, and we don't cap API requests.

Do I need an account?

The skill and scd-mock work without one, so you can build and test your integration first. Connecting the MCP server needs an account; the free trial is enough.

Can my agent use a CLI instead of the MCP server?

Yes. Agents that run terminal commands, like Claude Code and Codex, can use npx @saas-custom-domains/cli with --json. It does the same things as the MCP tools, and it also works in scripts, CI and against scd-mock. See the CLI docs.

Can the MCP server use scd-mock?

No. The MCP server always works with your real account. For local development and tests, point your app's API calls at scd-mock; the skill explains how.

My agent isn't listed. Will it work?

Most likely. Any agent that supports Agent Skills can install the skill with npx skills add, and any MCP client that supports Streamable HTTP can connect to https://mcp.saascustomdomains.com/mcp by signing in or with an API token. See the MCP docs.

Give your agent your custom domains

Start your free trial, then connect your agent by signing in.