Connect Amplitude to ChatGPT: Automate Product Analytics & Events
Learn how to connect Amplitude to ChatGPT via Truto's MCP servers. Automate product analytics, orchestrate event tracking, and manage taxonomies from ChatGPT.
If your team uses Claude, check out our guide on connecting Amplitude to Claude, or explore connecting Amplitude to AI Agents for broader programmatic workflows. In this guide, we focus on connecting Amplitude directly to ChatGPT using Truto's Model Context Protocol (MCP) server architecture.
Modern product and growth teams rely heavily on Amplitude for behavioral analytics, event tracking, and feature flagging. Moving these operations into an AI context natively enables data scientists and product managers to debug user journeys, manage taxonomies, and analyze cohorts conversationally. Truto exposes your connected Amplitude integration as a secure, auto-generated MCP JSON-RPC 2.0 endpoint, giving ChatGPT direct tool-calling capabilities against your real-time analytics data.
The Engineering Reality of the Amplitude API
Unlike standard CRUD databases, event-streaming analytics platforms have highly specialized ingestion protocols. Building a generic integration layer for Amplitude usually exposes several rigid constraints. When building an MCP server for Amplitude, ChatGPT has to navigate these specific API realities:
- Strict Batch and Payload Constraints: Amplitude's V2 and Batch Event APIs aren't forgiving. Event arrays must contain fewer than 2000 events, total payload size cannot exceed 1 MB, and every event absolutely requires an
event_typealongside either auser_idordevice_id. If an LLM hallucinates an event submission without a user identifier, the payload is rejected. - Form-Encoded Chaos for Identities: While modern APIs default to JSON, Amplitude's Identify and Group Identify APIs require
identificationpayloads to be submitted as form-encoded POST requests. Managing deep nested JSON within a form boundary often breaks naive AI function calling. - Asynchronous Cohorts and Large Files: Extracting behavioral cohorts or raw event exports does not yield a standard JSON array of users. The API either triggers an asynchronous job or returns heavily compressed file streams. You cannot simply ask an LLM to "paginate through 100,000 raw events" without understanding the file export limits.
Truto maps these complexities directly into structured JSON Schema tools, injecting necessary required fields (like user_id or device_id) and explicitly defining query constraints to stop ChatGPT from generating malformed requests.
Rate Limits: The Factual Mechanics
When exposing Amplitude to an LLM, rate limits are a critical consideration. Truto does not retry, throttle, or apply backoff on rate limit errors.
When the Amplitude API returns an HTTP 429, Truto passes that error directly to the caller. To ensure the calling agent has the context needed to pause, Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. The caller (or the framework wrapping ChatGPT) is strictly responsible for implementing its own retry and exponential backoff logic.
How to Create the Amplitude MCP Server
Truto creates an MCP server scoped specifically to one authenticated Amplitude environment (an "Integrated Account"). You can generate this secure JSON-RPC endpoint either through the Truto UI or programmatically via the API.
1. Via the Truto UI
For administrators doing one-off analysis tasks:
- Navigate to the Integrated Accounts page in Truto and select your active Amplitude connection.
- Click on the MCP Servers tab.
- Click Create MCP Server.
- Configure the server: Name it (e.g., "Production Amplitude Server"), filter for specific methods (like
readorwrite), or restrict tools by tag. - Click generate and copy the provided
https://api.truto.one/mcp/<token>URL.
2. Via the Truto API
For DevOps teams automating workspace provisioning, you can generate MCP servers programmatically.
Endpoint: POST /integrated-account/:id/mcp
{
"name": "ChatGPT Amplitude Analytics",
"config": {
"methods": ["read", "write", "custom"],
"tags": ["analytics", "cohorts"]
},
"expires_at": "2026-10-01T12:00:00Z"
}The API provisions a new endpoint backed by a secure, hashed token in the database. It validates that Amplitude tools are actually available before returning your fully functional MCP server URL.
Connecting Amplitude to ChatGPT
Once your MCP URL is live, you need to route ChatGPT's interface to it.
Approach A: The ChatGPT UI Connector
If you have a Pro, Plus, Enterprise, or Education tier account:
- Open ChatGPT and go to Settings -> Apps -> Advanced settings.
- Toggle Developer mode on.
- Under the MCP servers / Custom connectors section, click to add a new server.
- Name: "Amplitude Analytics"
- Server URL: Paste your Truto MCP URL.
- Save. ChatGPT will immediately perform the initialization handshake, pull down the Amplitude tools via
tools/list, and make them available to your current chat session.
Approach B: Manual Config File
If you are using a headless OpenAI compatible client, a command-line wrapper, or desktop agents that use the standard MCP configuration file format, you declare the server exactly like this in your mcp.json or openai-mcp.json:
{
"mcpServers": {
"amplitude-analytics": {
"type": "remote",
"url": "https://api.truto.one/mcp/YOUR_SECURE_TOKEN_HERE"
}
}
}Two-Tier Amplitude Tool Inventory
Once connected, ChatGPT can interact with Amplitude through dozens of specific API methods. For a complete look at underlying schemas, visit the Amplitude integration page.
Hero Tools
These are the highest-value capabilities for product teams driving analytics from a chat interface.
create_a_amplitude_event
Upload single or multiple events via the HTTP V2 API. This tool strictly enforces the inclusion of event_type and an identifier (user_id or device_id).
Usage notes: Highly effective for backfilling test data or logging specific administrative actions directly from a chat workflow.
"Log a new event called 'AI Agent Provisioned' for user_id 99482. Set the payload size bytes parameter if needed."
create_a_amplitude_identify
Update user properties natively using the Identify API. It structures the required form-encoded POST payload automatically. Usage notes: Used to apply user properties like "Subscription Tier = Enterprise" or flag a user as part of a beta test group without touching backend code.
"Identify user_id 8821 and set their 'onboarding_status' property to 'completed'."
list_all_amplitude_cohorts
List all behavioral cohorts existing in your Amplitude workspace. Usage notes: Ideal for retrieving cohort IDs to be used in secondary operations, such as mapping a cohort to an active experiment.
"List all behavioral cohorts and find the ID for the 'Active Weekly Users' cohort."
create_a_amplitude_user_mapping
Associate an anonymous user session with a known identity by mapping device identifiers to user IDs. Usage notes: Invaluable for data engineers fixing split identities when an anonymous visitor converts to a registered user.
"Create a user mapping associating device_id 'abc-123-xyz' with the known user_id 'usr_9921'."
list_all_amplitude_experiments
Retrieve a cursor-paginated collection of active experiments within Amplitude Experiment. Usage notes: Helps product managers audit active tests, feature flag keys, and metadata without logging into the dashboard.
"Fetch all active Amplitude experiments. Are there any currently running for the 'new-checkout-flow' key?"
create_a_amplitude_deployment
Initialize a new deployment in Amplitude Experiment to manage feature flags and A/B tests across specific environments. Usage notes: Used heavily by DevOps tracking release cycles and configuring new staging environments.
"Create a new deployment for our staging environment in Amplitude Experiment."
Workflows in Action
How do product teams actually use ChatGPT connected to Amplitude? Here are two domain-specific examples.
Scenario 1: Identity Resolution for Anonymous Conversions
A Data Engineer notices a discrepancy in attribution where an anonymous web browser session didn't link correctly after checkout.
"Merge anonymous device_id 'anon-web-883' with user_id 'cust-4822', and then log a custom 'Identity Resolved Manually' event for that user."
Step-by-step execution:
- ChatGPT invokes
create_a_amplitude_user_mappingpassing the device ID and the target user ID. - Truto translates this into the form-encoded request Amplitude requires and confirms success.
- ChatGPT invokes
create_a_amplitude_event, structuring an event array containing theevent_type: Identity Resolved Manuallyattached touser_id: cust-4822.
The user gets immediate confirmation that the analytics split has been merged and the audit event is cleanly logged.
Scenario 2: Auditing Feature Flag Rollouts
A Product Manager needs to verify that the experimental pricing page is running and identify the cohort attached to it.
"List our current experiment flags to find the 'v2-pricing-test'. Once you have the ID, get the full details for that flag and let me know its status."
Step-by-step execution:
- ChatGPT calls
list_all_amplitude_flagsto retrieve active flags and parses the JSON response to locate the ID forv2-pricing-test. - ChatGPT calls
get_single_amplitude_flag_by_idusing the retrieved ID. - ChatGPT analyzes the deep JSON structure returned by Amplitude Experiment and summarizes the rollout status, variations, and targeting rules for the Product Manager.
Security and Access Control
Connecting ChatGPT to your production analytics demands zero-trust security. Truto's MCP architecture enforces strict boundary controls:
- Method Filtering: Limit your MCP server to read-only access. By setting
methods: ["read"]during server creation, destructive endpoints likedelete_a_amplitude_taxonomy_category_by_idare completely stripped from the tool generation phase. - Tag Filtering: Group and restrict tools logically. Configuring the server with
tags: ["cohorts"]ensures the LLM can only view or manage cohorts, walling off feature flags or user mappings. - Secondary Authentication (
require_api_token_auth): For environments where URL leaks are a risk, enable this flag. ChatGPT will be forced to pass a valid Truto API token as a Bearer token in theAuthorizationheader to successfully call the tools. - Expiration (
expires_at): Issue temporary servers. Set an ISO timestamp, and Truto's scheduled cleanup alarms will completely purge the token metadata from the underlying distributed key-value store when time runs out.
FAQ
- Does Truto automatically handle Amplitude rate limits?
- No. When the Amplitude API returns an HTTP 429, Truto passes the error to the caller. Truto normalizes the upstream rate limit info into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The client orchestrating the AI agent is responsible for retry and backoff logic.
- Can I filter which Amplitude endpoints ChatGPT can access?
- Yes. When generating the MCP server, you can use method filtering (e.g., only 'read' operations) and tag filtering to restrict access to specific subsets of the Amplitude API.
- How does Truto handle Amplitude's batch event limits?
- Truto exposes the batch API exactly as Amplitude defines it. The LLM must adhere to Amplitude's constraints, such as keeping the payload under 1 MB and submitting fewer than 2000 events per request.