All agents

AGENT SETUP · COGNITION · NOW DEVIN DESKTOP

Set Up SaaS Custom Domains in Windsurf (Devin Desktop)

Windsurf is now Devin Desktop, and its agent shares its setup with Devin CLI. It loads Claude Code plugins, so our plugin installs the SaaS Custom Domains skill and MCP server together. You can also add the server to its MCP config yourself.

Works in Devin Desktop (formerly Windsurf) and Devin CLI.

  • Plugin
  • Sign in or token

Quick start

  1. Install the plugin

    Devin shows what the plugin adds before it installs. Plugins work in both Devin Desktop and Devin CLI.

    Terminal
    devin plugins install saas-custom-domains/skills
  2. Sign in

    Open Customize in the Agents window and go to MCPs. When the server shows Needs authentication, click Authenticate. Your browser opens: approve the connection, sign in to SaaS Custom Domains (with two-factor authentication if you use it) and click Continue.

  3. Try a prompt

    Prompt
    List the custom domains whose DNS records haven't been found yet, and the record each one needs.

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:

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

Other ways to set it up

  • Add the MCP server

    Add it to ~/.config/devin/mcp_config.json for every project, or .devin/mcp_config.json to share it with your team. Older Windsurf versions use ~/.codeium/windsurf/mcp_config.json. Then sign in from Customize → MCPs, or with the login command.

    ~/.config/devin/mcp_config.json
    {
      "mcpServers": {
        "saas-custom-domains": {
          "url": "https://mcp.saascustomdomains.com/mcp"
        }
      }
    }
    Terminal
    devin mcp add -s user saas-custom-domains https://mcp.saascustomdomains.com/mcp
    devin mcp login saas-custom-domains
  • Add the skill

    This puts the skill in .devin/skills/ in your project. Add -g to install it in ~/.config/devin/skills/ for every project.

    Terminal
    npx skills add https://github.com/saas-custom-domains/skills -a devin

Tell Windsurf about your setup

Devin reads AGENTS.md as always-on rules. For a rule that loads only when it is relevant, put one rule per file in .devin/rules/ with trigger: model_decision. Legacy .windsurf/rules/ files still load.

.devin/rules/custom-domains.md
---
trigger: model_decision
description: How this app handles customer custom domains with SaaS Custom Domains
---

## 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 Windsurf

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

Build

Integration code, with the skill

  • “Add a "Connect your domain" step to onboarding that creates the domain through the API and shows the CNAME record the customer needs.”
  • “Our app sits behind a CDN. Make sure X-Served-For is part of the cache key so one customer never sees another customer's cached page.”

Operate

Your account, through the MCP server

  • “Add a rule on app.acme.com that blocks /admin for every IP except 203.0.113.10.”
  • “Show me last week's requests and average response time for shop.northpeak.com.”

Troubleshooting

Devin asks before every tool call

By default the agent asks for approval before calling any MCP tool. Allow the tools or the whole server in your MCP permissions once you trust them.

I signed in from another client, but Devin asks again

Each MCP client keeps its own sign-in, so sign in separately in Devin even if Claude Code or Cursor is already connected.

The server shows Needs authentication

Click Authenticate to clear the stored sign-in and sign in again. This also happens after you delete its token under Settings » API.

Give your agent your custom domains

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