Amplitude MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Amplitude MCP Server track a signup event for user123 with plan premium"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Amplitude MCP Server
A Model Context Protocol (MCP) server for integrating with Amplitude Analytics API. This server provides tools to track events, manage user properties, and query analytics data from your Amplitude projects.
Features
Event Tracking: Track single events or batch events to Amplitude
User Identification: Set and update user properties
Analytics Queries: Get user activity, event segmentation, and cohort data
Secure Configuration: Environment-based API key management
Related MCP server: Amplitude MCP Server
Installation
npm install amplitude-mcp-serverSetup
Configuration Options
You can configure the Amplitude MCP server in three ways:
Option 1: MCP Client Configuration (Recommended)
Add the server to your MCP client configuration with API keys as arguments:
{
"mcpServers": {
"amplitude": {
"command": "npx",
"args": [
"amplitude-mcp-server",
"--api-key=your_amplitude_api_key_here",
"--secret-key=your_amplitude_secret_key_here"
]
}
}
}For Claude Desktop users, add this to your claude_desktop_config.json:
{
"mcpServers": {
"amplitude": {
"command": "npx",
"args": [
"amplitude-mcp-server",
"--api-key=your_amplitude_api_key_here",
"--secret-key=your_amplitude_secret_key_here"
]
}
}
}Option 2: Environment Variables
Create a .env file in your project root:
AMPLITUDE_API_KEY=your_amplitude_api_key_here
AMPLITUDE_SECRET_KEY=your_amplitude_secret_key_hereThen use the basic MCP client configuration:
{
"mcpServers": {
"amplitude": {
"command": "npx",
"args": ["amplitude-mcp-server"]
}
}
}Option 3: Mixed Configuration
You can also mix both approaches - environment variables as defaults and command line arguments to override:
{
"mcpServers": {
"amplitude": {
"command": "npx",
"args": [
"amplitude-mcp-server",
"--api-key=your_amplitude_api_key_here"
],
"env": {
"AMPLITUDE_SECRET_KEY": "your_amplitude_secret_key_here"
}
}
}
}Available Tools
1. track_event
Track a single event to Amplitude.
Parameters:
event_type(required): Name of the eventuser_id: User identifierdevice_id: Device identifierevent_properties: Custom event properties objectuser_properties: User properties to settime: Event timestamp in millisecondsapp_version: Application versionplatform: Platform (iOS, Android, Web)country: Country coderegion: Regioncity: Citylanguage: Language coderevenue: Revenue amountprice: Product pricequantity: Product quantity
Example:
{
"event_type": "button_clicked",
"user_id": "user123",
"event_properties": {
"button_name": "signup",
"page": "homepage"
},
"user_properties": {
"subscription_plan": "premium"
}
}2. track_batch_events
Track multiple events in a single API call for better performance.
Parameters:
events(required): Array of event objects (same structure as track_event)
3. identify_user
Set or update user properties without tracking an event.
Parameters:
user_idordevice_id: User/device identifieruser_properties(required): User properties to setapp_version: Application versionplatform: Platform identifier
4. get_user_activity
Retrieve user activity data from Amplitude.
Parameters:
user_id(required): User ID to querystart_time: Start time (YYYY-MM-DD format)end_time: End time (YYYY-MM-DD format)limit: Maximum number of events to return
5. get_event_segmentation
Get event segmentation data for analysis.
Parameters:
event_type(required): Event type to analyzestart_date(required): Start date (YYYY-MM-DD)end_date(required): End date (YYYY-MM-DD)group_by: Array of properties to group byinterval: Interval in days ("1", "7", or "30")
6. get_cohort_data
Retrieve cohort analysis data.
Parameters:
cohort_id(required): Cohort identifierprops: Include user properties (boolean)
Development
Building the Project
npm run buildRunning in Development
For development, you can use environment variables in a .env file:
npm run devOr run with specific API keys:
node dist/index.js --api-key=your_key --secret-key=your_secretTesting
npm testLinting and Formatting
npm run lint
npm run formatAPI Keys and Authentication
You'll need two types of API keys from Amplitude:
API Key: Used for tracking events (HTTP API)
Secret Key: Used for querying analytics data (Dashboard REST API)
Getting Your API Keys
Get these from your Amplitude project settings:
Go to Settings → Projects → [Your Project] → General
Copy the API Key and Secret Key
Configuration Priority
The server looks for API keys in this order:
Command line arguments (
--api-keyand--secret-key)Environment variables (
AMPLITUDE_API_KEYandAMPLITUDE_SECRET_KEY)
This allows you to set defaults via environment variables and override them via MCP client configuration as needed.
Security Notes
Never commit API keys to version control
MCP Client Configuration: API keys in MCP client config are typically stored in user-specific configuration files
Environment Variables: Use environment variables for server deployments or when sharing the same keys across multiple projects
Command Line Arguments: Most secure for single-use or testing scenarios
The secret key provides read access to your analytics data
The API key allows event tracking to your project
Consider using different approaches for development vs production environments
Error Handling
The server includes comprehensive error handling:
Network connectivity issues
Invalid API keys
Malformed requests
Rate limiting responses
Errors are returned as text content with descriptive messages.
Rate Limits
Be aware of Amplitude's rate limits:
HTTP API: 1000 events per second per project
Dashboard REST API: 360 requests per hour per project
Use batch tracking for high-volume scenarios.
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests for new functionality
Submit a pull request
License
MIT License - see LICENSE file for details.
Support
For issues related to this MCP server, please file an issue on the GitHub repository.
For Amplitude API questions, refer to the Amplitude Developer Documentation.
amplitude-mcp
Available Tools
6 toolsget_cohort_dataC
Get cohort analysis data
Inputs: cohort_id (required), props.
get_event_segmentationD
Get event segmentation data
Inputs: end_date (required), event_type (required), start_date (required), group_by, +1 more.
get_user_activityC
Get user activity data from Amplitude
Inputs: user_id (required), limit, end_time, start_time.
identify_userC
Set or update user properties
Inputs: user_properties (required), user_id, platform, device_id, +1 more.
track_batch_eventsB
Track multiple events to Amplitude in a single request
Inputs: events (required).
track_eventC
Track an event to Amplitude
Inputs: event_type (required), city, time, price, +11 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The set splits cleanly into write tools (track_event, track_batch_events, identify_user) and read tools (get_user_activity, get_event_segmentation, get_cohort_data), with each query tool targeting a distinct analytics viewpoint. The only mild overlap is track_event vs track_batch_events, which descriptions differentiate by single-vs-batch semantics.
All names follow a consistent snake_case verb_noun pattern (track_*, get_*, identify_user). Verbs map intuitively to actions and resource nouns are unambiguous.
Six tools is lean and well-scoped for an analytics ingestion + query server, with each tool earning its place. It sits at the lower edge of the comfortable range, so a couple more query helpers could be justified.
Ingestion (single/batch events, user properties) and three core read queries are covered, but notable gaps remain: no cohort/event listing or taxonomy retrieval, no group identify, and no user deletion/GDPR endpoint. Agents can handle the main track-then-query workflow but will hit dead ends on discovery and cleanup operations.
Maintenance
Related MCP Connectors
Search, access, and get insights on your Amplitude data
Query people, segments, campaigns, and message deliveries; send transactional email or broadcasts.
Create projects and read their web analytics: views, referrers, countries, custom events.
Unofficial Segment MCP Pack — wraps the Segment Public API (https://api.segmentapis.com).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude to track events, page views, user signups, set user properties, and track revenue in Amplitude analytics.7MIT
- AlicenseDqualityFmaintenanceEnables AI assistants to query and segment event data from Amplitude Analytics via the MCP protocol.29MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to integrate Amplitude analytics for tracking events, page views, user signups, user properties, and revenue.18 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Amplitude analytics data including events, active users, retention, and user profiles through natural language or direct tool calls.61 npmMIT