All agents

AGENT SETUP · ANYSPHERE

Set Up SaaS Custom Domains in Cursor

Cursor reads remote MCP servers from mcp.json and skills from your project or home folder. Add our server, sign in, then install the skill so Cursor's agent knows how the SaaS Custom Domains API works.

Works in Cursor editor, CLI and Cloud Agents.

  • MCP config
  • Sign in or token

Quick start

  1. Add the MCP server

    Click the button to add it in Cursor, or add it yourself to ~/.cursor/mcp.json (every project) or .cursor/mcp.json (this project).

    Add to Cursor
    ~/.cursor/mcp.json
    {
      "mcpServers": {
        "saas-custom-domains": {
          "url": "https://mcp.saascustomdomains.com/mcp"
        }
      }
    }
  2. Sign in

    Cursor signs in to remote MCP servers with OAuth. When you connect the server, your browser opens: approve the connection, sign in to SaaS Custom Domains (with two-factor authentication if you use it) and click Continue. If signing in doesn't work for you, use an API token (below).

  3. Add the skill

    This puts the skill in .agents/skills/ in your project, which Cursor reads. Add -g to install it in ~/.cursor/skills/ for every project.

    Terminal
    npx skills add https://github.com/saas-custom-domains/skills -a cursor
  4. Try a prompt

    Prompt
    Is staging.northpeak.com live? If not, check its DNS now and tell me what record is missing.

Signing in and API tokens

To use an API token instead of signing in, send it in a header. This reads it from the SCD_API_TOKEN environment variable:

~/.cursor/mcp.json
{
  "mcpServers": {
    "saas-custom-domains": {
      "url": "https://mcp.saascustomdomains.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:SCD_API_TOKEN}"
      }
    }
  }
}

Other ways to set it up

  • Install it as a plugin instead

    Cursor can import plugins from a GitHub repository that has a .cursor-plugin/marketplace.json, and ours does. In Customize, choose From GitHub Repository, enter https://github.com/saas-custom-domains/skills and install SaaS Custom Domains. That adds the skill and the MCP server together.

Tell Cursor about your setup

Project rules live in .cursor/rules/ as .mdc files with frontmatter. With a description and alwaysApply: false, the agent pulls the rule in when it is relevant. If you prefer plain markdown, put the same text in AGENTS.md.

.cursor/rules/custom-domains.mdc
---
description: How this app handles customer custom domains with SaaS Custom Domains
alwaysApply: false
---

## Custom domains
- Customer domains run through SaaS Custom Domains. Use the saas-custom-domains skill when writing code that calls its API, and the MCP server to look up or change domains in our account.
- Check X-SaaS-Domains-Auth-Token before trusting X-Served-For, then find the tenant by the X-Served-For host.
- In development and tests, call scd-mock at http://localhost:4010/api/v1 (token scd_test_token) instead of the real API.

EXAMPLE PROMPTS

What to ask Cursor

The skill helps when you build your custom domains integration. The MCP server works in your account.

Build

Integration code, with the skill

  • “Find where we resolve the current tenant and add custom domain support there: check X-SaaS-Domains-Auth-Token, then look up the tenant by the X-Served-For host.”
  • “Add a DNS instructions panel to the domain settings page that shows the records from the dns_records endpoint, with a copy button for each value.”

Operate

Your account, through the MCP server

  • “Create a redirect from old-brand.com to https://newbrand.com that keeps the path.”
  • “Show me the top pages and traffic sources for docs.orbitpay.com this month.”

Troubleshooting

My rule isn't picked up

Rules in .cursor/rules/ must use the .mdc extension. A plain .md file there is ignored. Use AGENTS.md if you want plain markdown.

The tools don't appear in chat

Open Customize and check that the saas-custom-domains server is turned on. Disabled servers don't load.

Requests fail with the token header

Cursor fills in ${env:SCD_API_TOKEN} from its own environment. Make sure the variable is set where Cursor starts, and that the token still exists under Settings » API.

Signing in doesn't open or doesn't finish

Use the token config above instead. It works in every Cursor version that supports remote MCP servers.

Give your agent your custom domains

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