{"id":"amplitude-automation","name":"amplitude-automation","summary":"Rube MCP(Composio)を使ってアンプリチュードタスクを自動化:イベント、ユーザー活動、コホート、ユーザー識別。","body":"# Amplitude Automation via Rube MCP\n\nAutomate Amplitude product analytics through Composio's Amplitude toolkit via Rube MCP.\n\n**Toolkit docs**: [composio.dev/toolkits/amplitude](https://composio.dev/toolkits/amplitude)\n\n## Prerequisites\n\n- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)\n- Active Amplitude connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `amplitude`\n- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas\n\n## Setup\n\n**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.\n\n\n1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds\n2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `amplitude`\n3. If connection is not ACTIVE, follow the returned auth link to complete Amplitude authentication\n4. Confirm connection status shows ACTIVE before running any workflows\n\n## Core Workflows\n\n### 1. Send Events\n\n**When to use**: User wants to track events or send event data to Amplitude\n\n**Tool sequence**:\n1. `AMPLITUDE_SEND_EVENTS` - Send one or more events to Amplitude [Required]\n\n**Key parameters**:\n- `events`: Array of event objects, each containing:\n  - `event_type`: Name of the event (e.g., 'page_view', 'purchase')\n  - `user_id`: Unique user identifier (required if no `device_id`)\n  - `device_id`: Device identifier (required if no `user_id`)\n  - `event_properties`: Object with custom event properties\n  - `user_properties`: Object with user properties to set\n  - `time`: Event timestamp in milliseconds since epoch\n\n**Pitfalls**:\n- At least one of `user_id` or `device_id` is required per event\n- `event_type` is required for every event; cannot be empty\n- `time` must be in milliseconds (13-digit epoch), not seconds\n- Batch limit applies; check schema for maximum events per request\n- Events are processed asynchronously; successful API response does not mean data is immediately queryable\n\n### 2. Get User Activity\n\n**When to use**: User wants to view event history for a specific user\n\n**Tool sequence**:\n1. `AMPLITUDE_FIND_USER` - Find user by ID or property [Prerequisite]\n2. `AMPLITUDE_GET_USER_ACTIVITY` - Retrieve user's event stream [Required]\n\n**Key parameters**:\n- `user`: Amplitude internal user ID (from FIND_USER)\n- `offset`: Pagination offset for event list\n- `limit`: Maximum number of events to return\n\n**Pitfalls**:\n- `user` parameter requires Amplitude's internal user ID, NOT your application's user_id\n- Must call FIND_USER first to resolve your user_id to Amplitude's internal ID\n- Activity is returned in reverse chronological order by default\n- Large activity histories require pagination via `offset`\n\n### 3. Find and Identify Users\n\n**When to use**: User wants to look up users or set user properties\n\n**Tool sequence**:\n1. `AMPLITUDE_FIND_USER` - Search for a user by various identifiers [Required]\n2. `AMPLITUDE_IDENTIFY` - Set or update user properties [Optional]\n\n**Key parameters**:\n- For FIND_USER:\n  - `user`: Search term (user_id, email, or Amplitude ID)\n- For IDENTIFY:\n  - `user_id`: Your application's user identifier\n  - `device_id`: Device identifier (alternative to user_id)\n  - `user_properties`: Object with `$set`, `$unset`, `$add`, `$append` operations\n\n**Pitfalls**:\n- FIND_USER searches across user_id, device_id, and Amplitude ID\n- IDENTIFY uses special property operations (`$set`, `$unset`, `$add`, `$append`)\n- `$set` overwrites existing values; `$setOnce` only sets if not already set\n- At least one of `user_id` or `device_id` is required for IDENTIFY\n- User property changes are eventually consistent; not immediate\n\n### 4. Manage Cohorts\n\n**When to use**: User wants to list cohorts, view cohort details, or update cohort membership\n\n**Tool sequence**:\n1. `AMPLITUDE_LIST_COHORTS` - List all saved cohorts [Required]\n2. `AMPLITUDE_GET_COHORT` - Get detailed cohort information [Optional]\n3. `AMPLITUDE_UPDATE_COHORT_MEMBERSHIP` - Add/remove users from a cohort [Optional]\n4. `AMPLITUDE_CHECK_COHORT_STATUS` - Check async cohort operation status [Optional]\n\n**Key parameters**:\n- For LIST_COHORTS: No required parameters\n- For GET_COHORT: `cohort_id` (from list results)\n- For UPDATE_COHORT_MEMBERSHIP:\n  - `cohort_id`: Target cohort ID\n  - `memberships`: Object with `add` and/or `remove` arrays of user IDs\n- For CHECK_COHORT_STATUS: `request_id` from update response\n\n**Pitfalls**:\n- Cohort IDs are required for all cohort-specific operations\n- UPDATE_COHORT_MEMBERSHIP is asynchronous; use CHECK_COHORT_STATUS to verify\n- `request_id` from the update response is needed for status checking\n- Maximum membership changes per request may be limited; chunk large updates\n- Only behavioral cohorts support API membership updates\n\n### 5. Browse Event Categories\n\n**When to use**: User wants to discover available event types and categories in Amplitude\n\n**Tool sequence**:\n1. `AMPLITUDE_GET_EVENT_CATEGORIES` - List all event categories [Required]\n\n**Key parameters**:\n- No required parameters; returns all configured event categories\n\n**Pitfalls**:\n- Categories are configured in Amplitude UI; API provides read access\n- Event names within categories are case-sensitive\n- Use these categories to validate event_type values before sending events\n\n## Common Patterns\n\n### ID Resolution\n\n**Application user_id -> Amplitude internal ID**:\n```\n1. Call AMPLITUDE_FIND_USER with user=your_user_id\n2. Extract Amplitude's internal user ID from response\n3. Use internal ID for GET_USER_ACTIVITY\n```\n\n**Cohort name -> Cohort ID**:\n```\n1. Call AMPLITUDE_LIST_COHORTS\n2. Find cohort by name in results\n3. Extract id for cohort operations\n```\n\n### User Property Operations\n\nAmplitude IDENTIFY supports these property operations:\n- `$set`: Set property value (overwrites existing)\n- `$setOnce`: Set only if property not already set\n- `$add`: Increment numeric property\n- `$append`: Append to list property\n- `$unset`: Remove property entirely\n\nExample structure:\n```json\n{\n  \"user_properties\": {\n    \"$set\": {\"plan\": \"premium\", \"company\": \"Acme\"},\n    \"$add\": {\"login_count\": 1}\n  }\n}\n```\n\n### Async Operation Pattern\n\nFor cohort membership updates:\n```\n1. Call AMPLITUDE_UPDATE_COHORT_MEMBERSHIP -> get request_id\n2. Call AMPLITUDE_CHECK_COHORT_STATUS with request_id\n3. Repeat step 2 until status is 'complete' or 'error'\n```\n\n## Known Pitfalls\n\n**User IDs**:\n- Amplitude has its own internal user IDs separate from your application's\n- FIND_USER resolves your IDs to Amplitude's internal IDs\n- GET_USER_ACTIVITY requires Amplitude's internal ID, not your user_id\n\n**Event Timestamps**:\n- Must be in milliseconds since epoch (13 digits)\n- Seconds (10 digits) will be interpreted as very old dates\n- Omitting timestamp uses server receive time\n\n**Rate Limits**:\n- Event ingestion has throughput limits per project\n- Batch events where possible to reduce API calls\n- Cohort membership updates have async processing limits\n\n**Response Parsing**:\n- Response data may be nested under `data` key\n- User activity returns events in reverse chronological order\n- Cohort lists may include archived cohorts; check status field\n- Parse defensively with fallbacks for optional fields\n\n## Quick Reference\n\n| Task | Tool Slug | Key Params |\n|------|-----------|------------|\n| Send events | AMPLITUDE_SEND_EVENTS | events (array) |\n| Find user | AMPLITUDE_FIND_USER | user |\n| Get user activity | AMPLITUDE_GET_USER_ACTIVITY | user, offset, limit |\n| Identify user | AMPLITUDE_IDENTIFY | user_id, user_properties |\n| List cohorts | AMPLITUDE_LIST_COHORTS | (none) |\n| Get cohort | AMPLITUDE_GET_COHORT | cohort_id |\n| Update cohort members | AMPLITUDE_UPDATE_COHORT_MEMBERSHIP | cohort_id, memberships |\n| Check cohort status | AMPLITUDE_CHECK_COHORT_STATUS | request_id |\n| List event categories | AMPLITUDE_GET_EVENT_CATEGORIES | (none) |\n\n---\n*Powered by [Composio](https://composio.dev)*","author":"@davepoon","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/davepoon/buildwithclaude/tree/main/plugins/all-skills/skills/amplitude-automation","license":"MIT","category":"analytics","lang":"en","tokens":1909,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":["rube"],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":["composio.dev","rube.app"]}}