All agents

AGENT SETUP · CLINE

Set Up SaaS Custom Domains in Cline

Cline adds remote MCP servers from its Remote Servers tab, and reads skills from your project's .cline/skills/ folder. Add our server, sign in, then drop in the skill.

Works in VS Code extension, Cline Desktop and Cline CLI.

  • MCP config
  • Sign in or token

Quick start

  1. Add the MCP server

    In the Cline panel, click the MCP Servers icon and open Remote Servers. Enter saas-custom-domains as the name and the URL below, choose Streamable HTTP, and click Add Server.

    Server URL
    https://mcp.saascustomdomains.com/mcp
  2. Sign in

    When Cline asks you to authorize 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. In Cline CLI, run cline mcp and choose Authorize OAuth.

  3. Add the skill

    Cline reads skills from .cline/skills/ in your project. Use ~/.cline/skills/ instead to have it in every project.

    Terminal
    mkdir -p .cline/skills/saas-custom-domains
    curl -fsSL https://docs.saascustomdomains.com/.well-known/agent-skills/saas-custom-domains/SKILL.md \
      -o .cline/skills/saas-custom-domains/SKILL.md
  4. Try a prompt

    Prompt
    Create an upstream for app.yourapp.com in our account.

Signing in and API tokens

To use an API token instead, open MCP Servers → Configure → Configure MCP Servers and add the server to cline_mcp_settings.json. Set type to streamableHttp:

cline_mcp_settings.json
{
  "mcpServers": {
    "saas-custom-domains": {
      "type": "streamableHttp",
      "url": "https://mcp.saascustomdomains.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      },
      "disabled": false
    }
  }
}

Other ways to set it up

  • Add the server from Cline CLI

    Cline CLI keeps its settings in ~/.cline/data/settings/cline_mcp_settings.json. Add --header "Authorization: Bearer $SCD_API_TOKEN" to use a token instead of signing in.

    Terminal
    cline mcp add saas-custom-domains https://mcp.saascustomdomains.com/mcp --transport http --yes

Tell Cline about your setup

Put workspace rules in .clinerules/ (or .cline/rules/) at your project root and commit them. Cline also reads AGENTS.md. Global rules go in ~/Documents/Cline/Rules.

.clinerules/custom-domains.md
## 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 Cline

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

Build

Integration code, with the skill

  • “Plan first: how should this app store each tenant's custom domain and its SaaS Custom Domains uuid? Then implement it.”
  • “Normalize hostnames before saving a custom domain (trim, lowercase, drop a trailing dot) and reject our own app's hostnames.”

Operate

Your account, through the MCP server

  • “Move the newest rule on docs.orbitpay.com so it runs first.”
  • “How many errors did app.acme.com return last month, and on which pages?”

Troubleshooting

The server fails to connect or uses SSE

Without a type, Cline uses the legacy SSE transport. Set "type": "streamableHttp", or pick Streamable HTTP in the Remote Servers tab.

Cline doesn't use the skill

Check the file is at .cline/skills/saas-custom-domains/SKILL.md (or in .clinerules/skills/, .claude/skills/ or ~/.cline/skills/) and that its toggle is on.

Requests fail with my token

Check the Authorization header in the settings file, and that the token still exists under Settings » API.

Give your agent your custom domains

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