MCP tools reference
Complete reference for all FirstDistro MCP tools including parameters, examples, and use cases.
Complete reference for all tools available in the FirstDistro MCP server.
List_experiences
List all user journeys/funnels you're tracking (called "experiences" in FirstDistro).
Parameters: None
Example prompt:
"Show me my FirstDistro experiences"
Example response:
Found 3 experience(s):
- Onboarding Flow (active)
- Checkout Funnel (active)
- Feature Adoption (pending)
Use cases:
- See what user journeys you're tracking
- Verify experiences are configured correctly
- Find experience IDs for other tools
Check_events_flowing
Verify that your SDK is properly sending events to FirstDistro.
Parameters: None
Example prompt:
"Are my FirstDistro events flowing?"
Example response:
✓ Events are flowing!
Last event: 2 minutes ago
Events (24h): 1,247
Unique users (24h): 89
Top Events (24h):
• page_viewed: 523
• feature_used: 312
• user_logged_in: 89
Use cases:
- Verify SDK installation after setup
- Debug why events aren't appearing
- Check event volume and activity
Get_customer_health
Get health score and details for a specific customer account.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The account ID or slug to look up |
Example prompt:
"What's the health score for Acme Corp?"
Example response:
Customer: Acme Corp
Health Score: 72/100
Risk Level: at-risk
Trend: declining
Last Seen: 3 days ago
Use cases:
- Check on a specific customer before a call
- Investigate why a customer might be at risk
- Get quick health overview without opening dashboard
Get_experience_stats
Get funnel statistics for a user journey: how many started, completed, conversion rate, and average time.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
experienceId | string | Yes | The experience ID or slug |
range | "7d" | "30d" | "90d" | No | Time range for stats (default: 7d) |
Example prompt:
"What's the completion rate for the onboarding flow?"
Example response:
Experience: Onboarding Flow
Time Range: 7d
Started: 156
Completed: 89
Completion Rate: 57%
Avg Time to Complete: 12m
Use cases:
- Check funnel performance
- Compare conversion rates across time periods
- Identify bottleneck flows
Get_stuck_customers
Find customers who started a journey but stopped progressing. Useful for identifying users who need help.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
experienceId | string | Yes | The experience ID or slug |
limit | number | No | Maximum results (default: 20, max: 100) |
Example prompt:
"Who's stuck in the checkout funnel?"
Example response:
Experience: Checkout Funnel
Stuck Alert: 30 min
Found 5 stuck customer(s):
- Acme Corp: john@acme.com (stuck 45 min)
- Beta Inc: sarah@beta.io (stuck 38 min)
- Gamma LLC: mike@gamma.co (stuck 32 min)
Use cases:
- Find users who need proactive support
- Identify friction points in onboarding
- Enable real-time intervention for stuck users
List_at_risk_accounts
List customer accounts with at-risk or critical health scores.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
riskLevel | "critical" | "at-risk" | "all" | No | Filter by risk level (default: all) |
limit | number | No | Maximum results (default: 20, max: 100) |
sortBy | "score" | "lastSeen" | No | Sort order (default: score, lowest first) |
Example prompt:
"Which customers are at risk of churning?"
Example response:
At-Risk Accounts Summary:
• Critical: 3
• At-Risk: 8
• Healthy: 42
- Acme Corp: Score 25/100 (critical) 📉
- Beta Inc: Score 38/100 (at-risk)
- Gamma LLC: Score 42/100 (at-risk) 📈
...
Use cases:
- Daily check on account health
- Prioritize customer success outreach
- Identify churn risk before it's too late
Get_sdk_config
Get your FirstDistro installation token and SDK configuration snippets.
Parameters: None
Example prompt:
"Get my FirstDistro SDK config"
Example response:
FirstDistro SDK Configuration
Installation Token: fd_abc123...
Vendor: my-company
Quick Start:
1. Install: npm install @firstdistro/sdk
2. Add the provider to your app:
import { FirstDistroProvider } from '@firstdistro/sdk/react'
<FirstDistroProvider token="fd_abc123...">{children}</FirstDistroProvider>
3. Identify users (after login):
import { useFirstDistroSetup } from '@firstdistro/sdk/react'
useFirstDistroSetup({ userId: user.id, userEmail: user.email })
4. Track custom events:
FirstDistro.track('event_name', { property: 'value' })
Use cases:
- Quick reference for installation token
- Copy-paste setup code
- Share setup instructions with teammates
Setup_sdk
Generate all files and commands needed to set up the FirstDistro SDK in your project. Returns framework-specific setup files.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
framework | "nextjs-app" | "nextjs-pages" | "react-vite" | "react-cra" | "vanilla" | Yes | Target framework |
includeUserSetup | boolean | No | Include user identification code (default: true) |
authPattern | "nextauth" | "clerk" | "supabase" | "custom" | "none" | No | Auth library for user setup code |
Example prompt:
"Add FirstDistro SDK to my Next.js project"
Example response:
# Firstdistro sdk setup for next.js (app router)
## Installation token
`fd_abc123...`
## Commands to run
- `npm install @firstdistro/sdk` — Install the SDK
## Files to create/modify
### App/providers.tsx (create)
Provider component to wrap your app
\`\`\`tsx
'use client'
import { FirstDistroProvider } from '@firstdistro/sdk/react'
...
\`\`\`
### App/layout.tsx (modify)
Wrap children with the provider
...
## Verification
After setup, use the `check_events_flowing` tool to verify.
Use cases:
- Quick SDK setup without leaving your IDE
- Get framework-specific code snippets
- Auth-aware user identification setup
Tips for using mcp tools
Natural language works
You don't need to remember exact tool names. Just ask naturally:
- "Are events coming through?" →
check_events_flowing - "Show at-risk customers" →
list_at_risk_accounts - "How's Acme Corp doing?" →
get_customer_health - "Set up FirstDistro in this project" →
setup_sdk
Combine with context
MCP tools work best when combined with your codebase:
"Set up FirstDistro in this Next.js project and use my existing auth from lib/auth.ts"
Follow-up questions
Claude can remember context:
"Which customers are at risk?" "Tell me more about the first one" "What might be causing their declining health?"