npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

amplitude-mcp

v0.0.2

Published

Model Context Protocol server for Amplitude

Readme

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

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