Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
AMPLITUDE_API_KEYYesAmplitude project API key (basic auth username; also used by client SDKs) Docs.
AMPLITUDE_SECRET_KEYYesAmplitude project secret key (basic auth password) Docs.

Setup

  1. Find your project credentials: In Amplitude, go to Settings → Organization settings → Projects, pick your project, and copy the API Key and Secret Key. Free Starter plans include Dashboard REST API access for testing.
  2. Store the keys: Add them to your .env file as AMPLITUDE_API_KEY=… and AMPLITUDE_SECRET_KEY=… - both are required because the analytics APIs use HTTP basic auth (api_key:secret_key).
  3. Check your data residency: If your org uses EU data residency, pass host=analytics.eu.amplitude.com on query tools and ingestHost=api.eu.amplitude.com on Track Event. US orgs can keep the defaults.
  4. Verify access: Run the List Events tool. A 401 means the key pair is wrong; a 403 can mean the keys belong to a different project or region.
  • Keys are per-project - use a test project’s keys when experimenting, since Track Event writes real analytics data
  • The HTTP V2 ingestion API authenticates with the project API key inside the request body, so Track Event asks for api_key as a body field (same value as AMPLITUDE_API_KEY; the secret key is never sent)
  • Dashboard REST API endpoints are rate limited per project - keep date ranges modest
Provider API reference: https://amplitude.com/docs/apis/analytics/dashboard-rest

Tools

ToolAccessDescription
List EventsReadList event types visible in the project with current week totals
Query Event SegmentationReadGet metrics for an event over a date range (Event Segmentation chart data)
Query Active UsersReadGet active or new user counts over a date range
Get Chart ResultsReadGet JSON results from a saved Amplitude chart by chart ID
Track EventWriteSend events to Amplitude via the HTTP V2 ingestion API

Example prompts

  • List my Amplitude event types and summarize which ones have the highest totals this week.
  • Show my daily active users in Amplitude for the last 30 days and describe the trend.