Connect Amplitude to Claude: Sync Cohorts & Manage Experiments
Learn how to connect Amplitude to Claude using Truto's MCP Server. Automate cohort syncing, taxonomy management, and product analytics right from Claude.
Product analytics and experimentation data rarely live in isolation. By surfacing Amplitude data directly to Large Language Models, teams can automate complex workflows like checking cohort behavior, managing feature flags, and auditing event taxonomies without writing custom extraction scripts. If your team uses ChatGPT, check out our guide on connecting Amplitude to ChatGPT. If you are building automated pipelines, read our post on connecting Amplitude to AI Agents. Today, we are focused on getting this data into Claude.
This guide covers how to connect Amplitude to Claude using Truto's SuperAI MCP Server. We will walk through configuring the MCP server, passing the connection to Claude, and executing real-world tool calls.
The Engineering Reality of the Amplitude API
Before connecting LLMs to Amplitude, it is critical to understand the constraints of the underlying API. Amplitude's architecture imposes specific limits that will dictate how your AI agents operate.
- Strict Payload and Batch Limits: Event ingestion is not a free-for-all. The
create_a_amplitude_eventendpoint has a hard limit of 1 MB per request and a maximum of 2,000 events. If your AI agent attempts to sync a massive historical cohort, the tool call will fail unless you explicitly instruct the LLM to chunk the payload into smaller arrays. - Unforgiving Date Formats: Many APIs accept standard ISO 8601 timestamps, but Amplitude is particular. Endpoints like
list_all_amplitude_exportsstrictly require timestamps inYYYYMMDDTHHformat. You must specify this constraint in your LLM's system prompt to avoid continuous 400 Bad Request errors. - Rate Limits and Retries: Truto normalizes upstream rate limit info into standardized headers (
ratelimit-limit,ratelimit-remaining,ratelimit-reset) per the IETF specification. However, Truto does not retry, throttle, or apply backoff on rate limit errors. When Amplitude returns an HTTP 429, Truto passes that error directly to the caller. The caller - in this case, your MCP client or agent framework - is entirely responsible for implementing retry and exponential backoff logic.
Creating the Amplitude MCP Server
Truto automatically generates an MCP - compatible JSON-RPC 2.0 endpoint for any connected integration based on available documentation records. You can spin up a server for Amplitude via the Truto dashboard or programmatically via the API.
Method 1: Via the Truto UI
- Navigate to the Integrated Account page for your Amplitude connection in the Truto dashboard.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Define your filters (e.g., allow only
readmethods to prevent accidental event creation). - Copy the generated MCP Server URL (e.g.,
https://api.truto.one/mcp/abc123def456...).
Method 2: Via the Truto API
For teams managing infrastructure as code, you can provision the MCP server by making a POST request. Truto validates the integration, generates a cryptographically hashed token stored in a distributed key-value store, and returns a ready-to-use URL.
curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
-H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Claude Amplitude Server",
"config": {
"methods": ["read", "write"]
}
}'The response contains the exact URL you need to provide to Claude.
Connecting Amplitude to Claude
Claude supports custom MCP connectors natively, making it trivial to point it at your new Truto server.
The UI Connector Flow
For Claude Web and Desktop users on supported plans:
- Open Claude and navigate to Settings -> Connectors -> Add custom connector.
- Enter a recognizable name, like "Amplitude Analytics".
- Paste the Truto MCP Server URL you generated in the previous step.
- Click Add. Claude will automatically negotiate the JSON-RPC handshake, pull the tool definitions, and list them in your workspace.
The Manual Config File Approach
If you manage Claude Desktop via its local configuration file (claude_desktop_config.json), you can inject the HTTP MCP endpoint using a remote server wrapper.
{
"mcpServers": {
"amplitude-analytics": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-remote",
"https://api.truto.one/mcp/YOUR_TRUTO_TOKEN"
]
}
}
}Save the file and restart Claude Desktop to load the tools.
Amplitude Tools Available to Claude
Truto derives its tools directly from Amplitude's config.resources and documentation schemas. For a complete look at the underlying schemas, visit the Amplitude integration page.
Hero Tools
Here are the most powerful tools available for manipulating Amplitude data via Claude.
list_all_amplitude_cohorts
Lists all behavioral cohorts defined in your Amplitude account.
- Contextual Usage: Essential for retrieving cohort IDs before attempting to fetch specific exported file data. It returns an array of objects straight from the
cohortsfield. - Example Prompt: "Get a list of all our behavioral cohorts and find the ID for the 'Power Users' cohort."
create_a_amplitude_event
Uploads one or more events to Amplitude via the HTTP V2 API.
- Contextual Usage: Keep payloads under 1 MB and under 2,000 events. The
eventsarray requires at least anevent_typeand either auser_idordevice_id. - Example Prompt: "Log a 'Subscription Upgraded' event for user_id 'usr-8891', passing 'tier': 'pro' as an event property."
get_single_amplitude_cohort_file_by_id
Retrieves the exported file for a specific behavioral cohort.
- Contextual Usage: Excellent for cross-referencing Amplitude cohort lists against your internal CRM or billing database directly within Claude.
- Example Prompt: "Download the exported file for cohort ID '9381' and tell me how many unique users are in the CSV."
list_all_amplitude_experiments
Lists all experiments in Amplitude Experiment.
- Contextual Usage: Utilizes cursor-pagination to return metadata, keys, and status info for current product experiments.
- Example Prompt: "List our active experiments and show me the keys for any tests currently in the 'running' state."
update_a_amplitude_flag_by_id
Updates an existing Amplitude Experiment feature flag.
- Contextual Usage: Allows you to tweak feature flag configurations on the fly based on roll-out plans or emergency kill-switch scenarios.
- Example Prompt: "Update the feature flag with ID 'flag-checkout-v2' to disable it globally."
create_a_amplitude_user_privacy_deletion
Creates a new Amplitude user privacy deletion job (GDPR/CCPA compliance).
- Contextual Usage: Requires at least one of
amplitude_idsoruser_ids, along with arequesterstring. Useful for processing DSARs via chat. - Example Prompt: "Initiate a privacy deletion request for user_id 'del-901' requested by 'legal@company.com'."
Full Inventory
Here is the complete inventory of additional Amplitude tools available. For full schema details, visit the Amplitude integration page.
create_a_amplitude_batch_event: Upload a batch of events to Amplitude via the Batch Event Upload API.create_a_amplitude_identify: Send user identity information to set or update user properties.create_a_amplitude_group_identify: Set or update properties on a group.create_a_amplitude_attribution: Send an attribution event to record user acquisition info.get_single_amplitude_cohort_by_id: Get the status or result of a behavioral cohort request by ID.create_a_amplitude_cohort: Upload and create a new behavioral cohort by submitting user identifiers.list_all_amplitude_chart_annotations: List all chart annotations.get_single_amplitude_chart_annotation_by_id: Get a single chart annotation by ID.create_a_amplitude_chart_annotation: Create a new chart annotation.list_all_amplitude_annotation_categories: List all annotation categories.get_single_amplitude_annotation_category_by_id: Get a single annotation category by ID.create_a_amplitude_annotation_category: Create a new annotation category.update_a_amplitude_annotation_category_by_id: Update an existing annotation category.create_a_amplitude_release: Create a new release annotation.list_all_amplitude_exports: Export raw event data for a specified time range (requires YYYYMMDDTHH format).list_all_amplitude_taxonomy_categories: List all taxonomy categories.get_single_amplitude_taxonomy_category_by_id: Get a single taxonomy category by ID.create_a_amplitude_taxonomy_category: Create a new taxonomy category.update_a_amplitude_taxonomy_category_by_id: Update an existing taxonomy category by ID.delete_a_amplitude_taxonomy_category_by_id: Delete a taxonomy category by ID.list_all_amplitude_taxonomy_event_types: List all taxonomy event types.get_single_amplitude_taxonomy_event_type_by_id: Get a single taxonomy event type by ID.create_a_amplitude_taxonomy_event_type: Create a new taxonomy event type.update_a_amplitude_taxonomy_event_type_by_id: Update an existing taxonomy event type.delete_a_amplitude_taxonomy_event_type_by_id: Delete a taxonomy event type by ID.list_all_amplitude_taxonomy_event_properties: List all taxonomy event properties.create_a_amplitude_taxonomy_event_property: Create a new taxonomy event property.list_all_amplitude_taxonomy_user_properties: List all taxonomy user properties.get_single_amplitude_taxonomy_user_property_by_id: Get a single taxonomy user property by ID.create_a_amplitude_taxonomy_user_property: Create a new taxonomy user property.update_a_amplitude_taxonomy_user_property_by_id: Update an existing taxonomy user property.delete_a_amplitude_taxonomy_user_property_by_id: Delete a taxonomy user property by ID.list_all_amplitude_user_privacy_deletions: List privacy deletion jobs within a date range.get_single_amplitude_user_profile_by_id: Get a user profile by looking up a user identifier.create_a_amplitude_user_mapping: Create a user identity mapping to associate identities.list_all_amplitude_lookup_tables: List all lookup tables for a given event type.get_single_amplitude_lookup_table_by_id: Get a lookup table by ID for an event type.create_a_amplitude_lookup_table: Create a new lookup table.delete_a_amplitude_lookup_table_by_id: Delete a lookup table by ID.list_all_amplitude_dashboard_events: List events tracked via the Dashboard REST API.list_all_amplitude_scim_users: List all SCIM users.get_single_amplitude_scim_user_by_id: Get a single SCIM user by ID.create_a_amplitude_scim_user: Create a new SCIM user.update_a_amplitude_scim_user_by_id: Fully replace a SCIM user by ID.amplitude_scim_users_partial_update: Partially update a SCIM user by ID.delete_a_amplitude_scim_user_by_id: Delete a SCIM user by ID.list_all_amplitude_scim_groups: List SCIM groups.get_single_amplitude_scim_group_by_id: Get a single SCIM group by ID.create_a_amplitude_scim_group: Create a new SCIM group.update_a_amplitude_scim_group_by_id: Replace a SCIM group by ID.amplitude_scim_groups_partial_update: Partially update a SCIM group by ID.delete_a_amplitude_scim_group_by_id: Delete a SCIM group by ID.get_single_amplitude_experiment_by_id: Get a single experiment by ID.create_a_amplitude_experiment: Create a new experiment.update_a_amplitude_experiment_by_id: Update an existing experiment by ID.delete_a_amplitude_experiment_by_id: Delete an experiment by ID.list_all_amplitude_deployments: List all deployments in Amplitude Experiment.get_single_amplitude_deployment_by_id: Get a single deployment by ID.create_a_amplitude_deployment: Create a new deployment.delete_a_amplitude_deployment_by_id: Delete a deployment by ID.list_all_amplitude_flags: List all feature flags.get_single_amplitude_flag_by_id: Get a single feature flag by ID.create_a_amplitude_flag: Create a new feature flag.delete_a_amplitude_flag_by_id: Delete a feature flag by ID.
Workflows in Action
Once connected, Claude acts as an orchestration engine across your analytics stack. Here are realistic examples of how data teams leverage this.
Scenario 1: Auditing and Updating Taxonomies
Data governance leads often need to ensure tracking plans match what is actually deployed in Amplitude.
"We are rolling out a new tiered rewards system. Check if a taxonomy user property exists for 'loyalty_tier'. If it doesn't, create it and assign it to the 'Monetization' category."
- Claude calls
list_all_amplitude_taxonomy_user_propertiesto search forloyalty_tier. - Upon finding no match, it calls
list_all_amplitude_taxonomy_categoriesto find the ID for the 'Monetization' category. - Finally, it executes
create_a_amplitude_taxonomy_user_propertywith the correct category ID. Outcome: The LLM independently verifies the data dictionary before safely pushing the new tracking definitions.
Scenario 2: Processing GDPR Deletions
Compliance teams handle user deletion requests that must propagate into downstream analytics systems.
"I received a deletion request for user_id 'eu-user-778'. Submit a privacy deletion job and let me know the job status."
- Claude calls
create_a_amplitude_user_privacy_deletionwith the targetuser_idand the requester's email. - The API processes the request and returns the job metadata. Outcome: Claude replies with the new job ID and confirms that the privacy deletion has been successfully queued in Amplitude, replacing a manual process in the UI.
Scenario 3: Investigating Experiment Rollouts
Growth PMs need quick context on why certain metrics look abnormal during feature flag rollouts.
"List all active deployments in Amplitude Experiment, then check the feature flag associated with our 'new-checkout-flow' test to see if it is enabled."
- Claude calls
list_all_amplitude_deploymentsto gather current deployments. - Claude extracts the relevant flag ID and calls
get_single_amplitude_flag_by_id. Outcome: The PM gets an immediate read-out on the exact state of the rollout without logging into the Amplitude platform.
Security and Access Control
Giving AI agents write access to your product analytics environment carries risk. Truto provides several mechanisms to lock down your MCP servers.
- Method Filtering: By defining
"methods": ["read"]during server creation, you completely remove tools likecreate_a_amplitude_eventorupdate_a_amplitude_experiment_by_idfrom the toolset, enforcing a strict read-only policy. - Tag Filtering: Truto allows you to group resources by tags. You can configure a server to only expose resources tagged with
"scim"if you only want the LLM managing user provisioning. - Time-To-Live (TTL) Expiration: You can attach an
expires_attimestamp when creating the server. Once the timestamp is reached, internal scheduling alarms trigger an automatic cleanup, permanently invalidating the token. - Secondary Authentication: Enable the
require_api_token_authflag to force the MCP client to pass a valid Truto API token in theAuthorizationheader. This ensures that even if the MCP server URL leaks, unauthorized clients cannot use the tools.
FAQ
- Does Truto automatically handle Amplitude's API rate limits?
- No. Truto exposes upstream HTTP 429 errors directly to the caller and normalizes the rate limit headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). The MCP client or LLM framework is responsible for implementing retry and exponential backoff logic.
- How do I prevent Claude from deleting data in Amplitude?
- When creating the MCP server via the Truto API or UI, apply a method filter such as `"methods": ["read"]`. This ensures write-oriented tools are never generated or exposed to the LLM.
- Can I connect this MCP server to Claude Desktop?
- Yes. Claude supports custom remote connectors. You can add the Truto MCP server URL directly into Claude's UI under Settings -> Connectors -> Add custom connector, or configure it manually via `claude_desktop_config.json`.