AI assistant integration (MCP)
Query customer health, check events, and manage experiences directly from Claude, Cursor, or Windsurf.
Query and manage customer health directly from your AI assistant using the Model Context Protocol (MCP).
What is mcp?
Model Context Protocol (MCP) lets AI assistants like Claude access external tools and data sources. With @firstdistro/mcp, your AI can:
- Query customer health — "Which customers are at risk?"
- Check SDK status — "Are events flowing properly?"
- Get funnel stats — "What's the completion rate for onboarding?"
- Find stuck users — "Who stopped mid-checkout?"
- Set up the SDK — "Add FirstDistro to my Next.js project"
Supported assistants
Quick example
After setup, ask Claude:
"Which of my customers have critical health scores?"
Claude will use the list_at_risk_accounts tool to query your data:
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) 📈
...
Available tools
| Tool | Description |
|---|---|
list_experiences | List all user journeys/funnels you're tracking |
check_events_flowing | Verify SDK is properly sending events |
get_customer_health | Get health score for a specific account |
get_experience_stats | Get funnel statistics (started, completed, conversion rate) |
get_stuck_customers | Find users who stopped mid-journey |
list_at_risk_accounts | List accounts with at-risk or critical health |
get_sdk_config | Get your installation token and setup code |
setup_sdk | Generate framework-specific SDK setup files |
See the Tools Reference for detailed documentation.
Prerequisites
Before setting up MCP, you'll need:
- A FirstDistro account — Sign up for a 14-day free trial (no credit card required)
- An API key — Get one from Settings
Note: MCP uses API keys (sk_live_... or sk_test_...), not Installation Tokens (fd_...). Installation Tokens are for the browser SDK. For app tracking, see the npm SDK Quick Start.
Get started
Choose your AI assistant:
Also see: npm SDK Quick Start for installing the SDK in your app with npm install @firstdistro/sdk.