The churn radar for B2B SaaS·Book a call·Setup in 10 minutes·Trusted by CS teams·SOC 2 · GDPR · AES-256·
The churn radar for B2B SaaS·Book a call·Setup in 10 minutes·Trusted by CS teams·SOC 2 · GDPR · AES-256·

Cursor & windsurf setup

Connect FirstDistro to Cursor or Windsurf IDE to query customer health while coding.

Connect FirstDistro to Cursor or Windsurf to query customer health, check SDK status, and get setup help while you code.

Prerequisites

Note: Use an API key (sk_live_... or sk_test_...), not an Installation Token (fd_...).


Cursor setup

Configure for cursor

Run this command in your terminal:

bash
npx @firstdistro/mcp init --api-key sk_live_your_key_here

This saves your config to ~/.firstdistro/config.json.

Add mcp server to cursor

  1. Open Cursor Settings (Cmd+, on macOS, Ctrl+, on Windows)
  2. Search for "MCP" or navigate to Features → MCP Servers
  3. Click Add Server
  4. Enter the following:
    • Name: firstdistro
    • Command: npx
    • Args: @firstdistro/mcp

Alternatively, edit your Cursor settings JSON directly:

json
{
  "mcpServers": {
    "firstdistro": {
      "command": "npx",
      "args": ["@firstdistro/mcp"]
    }
  }
}

Verify cursor setup

  1. Restart Cursor to load the MCP server
  2. In the Cursor chat, ask: "What FirstDistro tools do you have?"

Windsurf setup

Configure for windsurf

Run this command in your terminal:

bash
npx @firstdistro/mcp init --api-key sk_live_your_key_here

Add mcp server to windsurf

  1. Open Windsurf Settings
  2. Navigate to AI → MCP Servers
  3. Add a new server with:
    • Name: firstdistro
    • Command: npx @firstdistro/mcp

Or edit your Windsurf config file:

json
{
  "mcpServers": {
    "firstdistro": {
      "command": "npx",
      "args": ["@firstdistro/mcp"]
    }
  }
}

Verify windsurf setup

  1. Restart the IDE to load the MCP server
  2. Ask the AI: "Show me my FirstDistro experiences"

Example prompts

Once connected, try these prompts in your IDE:

PromptWhat it does
"Are my FirstDistro events flowing?"Checks SDK is sending events
"Which customers are at risk?"Lists accounts with low health scores
"Show me stuck users in onboarding"Finds users who stopped mid-flow
"Add FirstDistro SDK to this project"Generates setup files for your framework
"What's the completion rate for checkout?"Gets funnel statistics

Using environment variables

Instead of running init, you can pass the API key directly in the config:

json
{
  "mcpServers": {
    "firstdistro": {
      "command": "npx",
      "args": ["@firstdistro/mcp"],
      "env": {
        "FIRSTDISTRO_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Troubleshooting

Tools not appearing

  1. Check the MCP server is added correctly in settings
  2. Restart the IDE completely
  3. Check the IDE's output/console for MCP errors

"api key invalid" errors

  1. Verify your API key starts with sk_live_ or sk_test_
  2. Create a new key at Dashboard → Settings → API Keys
  3. Run npx @firstdistro/mcp init --api-key NEW_KEY
  4. Restart the IDE

"not configured" responses

Run the init command:

bash
npx @firstdistro/mcp init --api-key sk_live_your_key_here

Then restart the IDE.


Next steps