Skip to main content
Glama
Amplitude MCP Server

Amplitude MCP Server

Amplitude MCP Server

A Model Context Protocol (MCP) server for Amplitude Analytics API, providing tools and resources for querying and segmenting event data.

Overview

This MCP server enables AI assistants and other MCP clients to interact with the Amplitude Analytics API, allowing them to:

  • Query event data with filters

  • Perform advanced segmentation with breakdowns

  • Access event data through structured resources

Related MCP server: Amplitude MCP Server

Installation

{
  "mcpServers": {
    "amplitude": {
      "command": "npx",
      "args": [
        "-y",
        "amplitude-mcp",
        "--amplitude-api-key=YOUR_API_KEY",
        "--amplitude-secret-key=YOUR_SECRET_KEY"
      ]
    }
  }
}

Required Credentials

Amplitude API credentials must be provided using command line arguments:

  • --amplitude-api-key: Your Amplitude API key (required)

  • --amplitude-secret-key: Your Amplitude secret key (required)

Available Tools

1. query_events

Basic event querying with filters.

Parameters:

  • events (array): Array of events to query

    • eventType (string): Type of event

    • propertyFilters (array, optional): Filters for event properties

  • start (string): Start date in YYYYMMDD format

  • end (string): End date in YYYYMMDD format

  • interval (string, optional): Grouping interval (day, week, month)

  • groupBy (string, optional): Grouping dimension

Example:

{
  "events": [
    {
      "eventType": "user_login",
      "propertyFilters": [
        {
          "propertyName": "device_type",
          "value": "mobile",
          "op": "is"
        }
      ]
    }
  ],
  "start": "2023-01-01",
  "end": "2023-01-31",
  "interval": "day"
}

2. segment_events

Advanced event segmentation with breakdowns.

Parameters:

  • All parameters from query_events

  • filters (array, optional): Additional filters for segmentation

    • type (string): Filter type (property, event, user)

    • propertyName (string, optional): Name of the property

    • value (mixed, optional): Value to filter by

    • op (string, optional): Operator for comparison

  • breakdowns (array, optional): Breakdown dimensions

    • type (string): Breakdown type (event, user)

    • propertyName (string): Name of the property to break down by

Example:

{
  "events": [
    {
      "eventType": "purchase"
    }
  ],
  "start": "2023-01-01",
  "end": "2023-01-31",
  "interval": "week",
  "filters": [
    {
      "type": "user",
      "propertyName": "country",
      "value": "US",
      "op": "is"
    }
  ],
  "breakdowns": [
    {
      "type": "user",
      "propertyName": "device_type"
    }
  ]
}

Available Resources

amplitude_events

Access event data for a specific event type and date range.

URI Format:

amplitude://events/{eventType}/{start}/{end}

Example:

amplitude://events/user_login/2023-01-01/2023-01-31

Development

Project Structure

amplitude-mcp/
├── src/
│   ├── index.ts                  # Main entry point with MCP server setup
│   ├── services/
│   │   └── amplitude.service.ts  # Amplitude API service implementation
│   ├── resources/
│   │   └── events.ts             # Event data resources
│   ├── types/
│   │   └── amplitude.ts          # Amplitude API types
│   └── utils/
│       └── config.ts             # Configuration and credential handling
├── bin/
│   └── cli.js                    # CLI entry point
├── dist/                         # Compiled JavaScript files
├── package.json
└── tsconfig.json

License

MIT

Available Tools

2 tools
query_eventsD

Inputs: events (required), start (required), end (required), interval, +1 more.

segment_eventsD

Inputs: events (required), start (required), end (required), interval, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.5/5.0

    Scored across 2 tools

    Disambiguation3/5

    The tool names suggest different operations ('query' vs 'segment'), but the lack of descriptions prevents clear disambiguation. An agent might still select incorrectly without more context.

    Naming Consistency4/5

    Both tools use a consistent snake_case verb_noun pattern ('query_events', 'segment_events'), which is clear and predictable.

    Tool Count2/5

    Only 2 tools is insufficient for a service like Amplitude, which typically offers a wide range of analytics operations. The surface feels too thin.

    Completeness2/5

    The set is severely incomplete for any meaningful analytics workflow. Missing CRUD operations for events, user properties, and other essential endpoints.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      14 npm
      7
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI to interact with ThinkingData analytics through a read-only MCP service, supporting event/property queries, event analysis, retention analysis, and safe SQL execution.
      Apache 2.0