# Amplitude — Pipedream Connect

> Build better products by turning your user data into meaningful insights, using Amplitude's digital analytics platform and experimentation tools.

- API slug: `amplitude` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Data Analytics
- Website: https://amplitude.com/
- This page (HTML): https://pipedream.com/apps/amplitude
- Tools: 11 actions · 0 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: amplitude`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "amplitude",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Cohort:
const result = await mcp.callTool({
  name: "amplitude-create-cohort",
  arguments: {
    cohortName: "Name",
    appId: 10,
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Amplitude endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "amplitude-create-cohort",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    amplitude: { authProvisionId: "apn_xxxxxxx" },
    cohortName: "Name",
    appId: 10,
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (11)

### `amplitude-create-cohort` — Create Cohort (Write)

Create a static cohort in Amplitude from an explicit list of user or Amplitude IDs via POST /api/3/cohorts/upload (the only REST-documented cohort creation endpoint; behavioral/dynamic cohorts cannot be created via REST). Use List Cohorts to find an existing cohort ID if updating. Example: call…

Full schema: https://pipedream.com/apps/amplitude/actions/create-cohort.md

### `amplitude-download-cohort-file` — Download Cohort File (Read-only)

Download a completed cohort export's member list (step 3 of 3: request -> status -> download). Call Request Cohort Download then Get Cohort Download Status first, and only call this once status is JOB COMPLETED — calling it earlier will fail. Returns one record per member (amplitude_id/user_id…

Full schema: https://pipedream.com/apps/amplitude/actions/download-cohort-file.md

### `amplitude-get-cohort-download-status` — Get Cohort Download Status (Read-only)

Check whether a cohort download job has finished (step 2 of 3: request -> status -> download). Call Request Cohort Download first to get a requestId. This action polls internally for up to ~35 seconds before returning, since Amplitude's export jobs commonly take 30-60+ seconds regardless of cohort…

Full schema: https://pipedream.com/apps/amplitude/actions/get-cohort-download-status.md

### `amplitude-get-event-segmentation` — Get Event Segmentation (Read-only)

Query event segmentation data (counts, uniques, and other metrics) for one or more events over a date range from the Amplitude Dashboard REST API. Use this to analyze how an event trends over time, optionally broken down by user properties. Example: call with event={"event_type":"Purchase"}…

Full schema: https://pipedream.com/apps/amplitude/actions/get-event-segmentation.md

### `amplitude-get-funnel-analysis` — Get Funnel Analysis (Read-only)

Compute conversion rates across an ordered (or unordered/sequential) set of funnel steps over a date range from the Amplitude Dashboard REST API. Provide one event definition per funnel step. Example: call with events=["{\"event_type\":\"Sign Up\"}","{\"event_type\":\"Purchase\"}"]…

Full schema: https://pipedream.com/apps/amplitude/actions/get-funnel-analysis.md

### `amplitude-get-retention-analysis` — Get Retention Analysis (Read-only)

Compute retention (return rate) between a start event and a return event over a date range from the Amplitude Dashboard REST API. Example: call with startEvent={"event_type":"_new"}, returnEvent={"event_type":"_active"}, startDate="20240706", endDate="20240805" -> returns {data: {series…

Full schema: https://pipedream.com/apps/amplitude/actions/get-retention-analysis.md

### `amplitude-get-user-activity` — Get User Activity (Read-only)

Fetch the event stream for a single user by their numeric Amplitude ID from the Amplitude Dashboard REST API. Each returned event defaults to just event_type and event_time; pass fields to also get e.g. event_properties, user_properties, uuid, session_id, amplitude_id, device_id (event objects can…

Full schema: https://pipedream.com/apps/amplitude/actions/get-user-activity.md

### `amplitude-list-cohorts` — List Cohorts (Read-only)

List all behavioral cohorts in the Amplitude project. Returns a cohorts array; each entry defaults to id, name, size, lastMod, appId. Pass fields to get more, e.g. description, published, archived, or the large definition (the cohort's filter logic) / owners/viewers (email arrays). Use this to…

Full schema: https://pipedream.com/apps/amplitude/actions/list-cohorts.md

### `amplitude-request-cohort-download` — Request Cohort Download (Write)

Start a behavioral cohort download job (step 1 of 3: request -> status -> download, per Amplitude's Behavioral Cohorts Download API). Returns a request_id — pass it to Get Cohort Download Status to poll until the job completes, then to Download Cohort File to fetch the member list. Use List Cohorts…

Full schema: https://pipedream.com/apps/amplitude/actions/request-cohort-download.md

### `amplitude-search-users` — Search Users (Read-only)

Look up Amplitude users by Amplitude ID, Device ID, User ID, or a User ID prefix. Use this before Get User Activity to resolve a user's amplitude_id. Example: call with user="user@example.com" -> returns {matches: [{amplitude_id: 12345678, user_id: "user@example.com"}], type: "user_id"}. See the…

Full schema: https://pipedream.com/apps/amplitude/actions/search-users.md

### `amplitude-send-event-data` — Send Event Data (Write)

Record a single analytics event for a user or device via Amplitude's HTTP V2 API. Use this to send product-usage events (page views, feature use, purchases) as they happen, rather than the read-only Dashboard REST actions in this app (e.g. Get Event Segmentation, Get Retention Analysis), which only…

Full schema: https://pipedream.com/apps/amplitude/actions/send-event-data.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
