Manage Mixpanel credentials and account configuration.
Configure Mixpanel service account credentials for secure API access. Set up new accounts, list configured accounts, switch between accounts, or test credentials.
/plugin marketplace add jaredmcfarland/mixpanel_data/plugin install mixpanel-data@mixpanel-dataManage Mixpanel credentials and account configuration.
Determine operation based on arguments:
Check existing accounts:
!$(mp auth list --format table 2>&1)
Guide the user through configuring Mixpanel credentials interactively.
Account name:
$1 if provided as argument (and it's not "list", "switch", or "test")Use AskUserQuestion to collect:
Where to find these:
Before proceeding, validate:
us, eu, in*.mp-service-accountIMPORTANT: Do NOT ask the user for their secret in this conversation.
After collecting non-sensitive credentials, provide instructions for the user to complete setup in their own terminal:
To complete the setup securely, please run this command in your terminal:
mp auth add <account-name> -u <username> -p <project-id> -r <region> --interactiveThis will prompt you for your secret securely without it appearing in this conversation or being sent to Anthropic's servers.
Alternative: If you prefer to use an environment variable:
export MP_SECRET="your-secret-here" mp auth add <account-name> -u <username> -p <project-id> -r <region> unset MP_SECRETOr in a single command:
MP_SECRET="your-secret" mp auth add <account-name> -u <username> -p <project-id> -r <region>
After the user completes the setup in their terminal, verify the account was added:
!$(mp auth list --format table)
Test that the credentials work:
!$(mp auth test <account-name>)
Ask if they want to set this as the default account:
!$(mp auth switch <account-name>)
Once complete, show:
/mp-inspect to explore your Mixpanel schema/mp-fetch to start fetching dataShow all configured Mixpanel accounts with their details.
!$(mp auth list --format table)
The output shows:
/mp-auth switch/mp-auth test/mp-auth with no argumentsChange which account is used by default when no --account flag is specified.
!$(mp auth list --format table)
$2 if provided (when called as /mp-auth switch <account-name>)!$(mp auth switch <account-name>)
Confirm the default was changed:
!$(mp auth list --format table)
The new default account should be marked with *.
<account-name>mp commandsValidate that account credentials work and can access the Mixpanel API.
$2 if provided (when called as /mp-auth test <account-name>)!$(mp auth test <account-name>)
Success:
Failure:
If test fails:
/mp-auth to setup new credentialsIf mp auth list shows no accounts:
/mp-auth (default operation) to setup your first accountIf you have accounts but none marked as default:
/mp-auth switch <account-name> to set oneIf mp auth test suddenly fails:
/mp-auth to add updated credentials