# Clamp MCP [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/clamp-sh/mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 140  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/clamp-sh-mcp

## Description
AI-native web analytics. Query pageviews, top pages, referrers, countries, devices, and custom events. Create conversion funnels and alerts.

## Tools
Capabilities this server exposes over MCP:

- **traffic.overview** — Pageviews, visitors, sessions, bounce rate, avg duration. Period comparison included.
- **traffic.timeseries** — Any core metric over time with automatic granularity (visitors, sessions, bounce rate, avg duration, or event counts).
- **traffic.compare** — Compare any metric across two arbitrary periods. Returns absolute and percent delta.
- **traffic.live** — Visitors active in the last N minutes plus their top pages, referrers, and countries.
- **breakdown** — Group visitors and pageviews by any dimension: `pathname`, `referrer_host`, `country`, `city`, `region`, `device_type`, `browser`, `browser_version`, `os`, `os_version`, `entry_page`, `exit_page`, `channel`, or any UTM field.
- **pages.engagement** — Per-page metrics with `view`: `summary`, `engagement` (adds engagement seconds and bounce rate), `sections` (per-section view counts for one pathname; needs the section-views SDK extension).
- **events.list** — Custom event counts with property filtering and grouping.
- **events.observed_schema** — The actual fired-event signature with per-property type observations. Diff against a local `event-schema.yaml` to surface schema drift.
- **events.property_values** — Top distinct string-typed values a property has taken on a specific event. Use to discover the value space before defining a cohort filter or running `events.list` with `property=`.
- **revenue.sum** — Sum Money-typed event properties. Split by currency, group by any dimension, switch to first-touch via `attribution_model`. Drill-in filters: `plan`, `product`, `first_touch_dim` + `first_touch_value`.
- **revenue.summary** — The whole Revenue tab in one call: revenue per currency, customers, orders, AOV, LTV, MRR (running balance) + ARR, per-plan rollup (where `mrr_contribution` is the cumulative MRR balance per plan, not the in-period delta), per-product rollup, prior-period comparison, and mode flags (`is_subscriptio…
- **revenue.retention** — Cohort revenue retention on MRR-on-MRR math. Per window: `mature_size`, `retained`, `retention_rate`, `mrr_at_d`, `baseline_mrr_mature`, `nrr` (net revenue retention; >1.0 = net expansion). Anchored at the customer's first `subscription_started`.
- **revenue.timeseries** — Plot one revenue metric per bucket. `metric` accepts `revenue` (Money sum), `mrr` (running balance, picks up from prior period), `customers` (distinct paying), or `transactions` (event count).
- **sessions.paths** — Aggregate session paths: top entry → exit pairs with pages per session and duration.
- **users.journey** — Chronological session-and-event reconstruction for one anonymous ID.
- **cohorts.create** — Define cohorts by event + period + filter; query retention curves; compare 2–10 cohorts side-by-side on the same retention windows; delete a saved cohort by name (definitions are immutable, so delete + re-create is the rename/restructure flow).
- **errors.list** — Recent errors, fingerprint-grouped errors with affected-user counts, error rate over time, and breadcrumbs leading to a single error.
- **projects.list** — List all projects this credential can access.
- **docs.search** — Keyword-search the Clamp docs index.
- **funnels.create** — Define and immediately evaluate a multi-step conversion funnel. Steps accept property predicates: `cta_click[location=hero][plan=pro]`. Names must be unique within a project — a duplicate-name call returns 409.
- **funnels.list** — List funnels or fetch one with cohort filters (country, channel, device, UTM).
- **funnels.delete** — Delete a saved funnel by name (definitions are immutable, so delete + re-create is the rename/restructure flow).
- **alerts.create** — Set up metric alerts (e.g. "visitors drops_by 30% over 7d").
- **alerts.list** — List and remove alerts.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "clamp-mcp": {
    "command": "npx",
    "args": ["-y","@clamp-sh/mcp"],
    "env": {
      "CLAMP_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `CLAMP_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What clamp-sh/mcp does

clamp-sh/mcp MCP server connects MCP-compatible agents to Clamp Analytics. It provides read access to product and web analytics, including pageviews, visitors, sessions, bounce rate, engagement, referrers, locations, devices, custom events, revenue, retention, session paths, user journeys, cohorts, errors, and project access.

Traffic tools support overview metrics, time series, arbitrary period comparisons, live visitors, and dimension-based breakdowns. Page tools provide per-page summaries, engagement data, and section counts when the section-views SDK extension is available. Event tools can inspect observed event schemas and property values, which helps identify schema drift or valid filter values before querying event counts.

Revenue tools cover sums, time series, customers, orders, average order value, lifetime value, MRR, ARR, plan and product rollups, attribution, and cohort retention. Funnel tools evaluate multi-step conversions, including property predicates, while alert tools create, list, and remove metric alerts. Cohort tools define retention groups, compare up to 10 cohorts, and remove saved definitions.

## How it works

The server maps natural-language analytics requests to MCP tool calls. Agents can combine results—for example, comparing a traffic change with page, referrer, event, or error data. Most queries accept standard periods such as `today`, `7d`, or `30d`, or a custom `YYYY-MM-DD:YYYY-MM-DD` range. Many tools also accept filters for paths, referrers, channels, geography, devices, browsers, operating systems, and UTM fields.

Tool outputs include schemas for client-side validation. The `projects.list` tool shows projects available to the credential, while `docs.search` searches the Clamp documentation index. Saved funnel and cohort definitions are immutable; changing one requires deleting it and creating a replacement. Funnel names must be unique within a project.

## Setup and configuration

clamp-sh/mcp is distributed as the `@clamp-sh/mcp` npm package and runs through `npx` in stdio mode. Set `CLAMP_API_KEY` to a project-scoped key from Clamp Analytics settings; keys begin with `sk_proj`. A typical MCP client configuration uses `npx -y @clamp-sh/mcp` as the command and passes the key through the process environment.

That route handles authentication through the dashboard. The npm package is intended for CI, headless agents, custom clients, and self-hosted Clamp deployments.

## Tools and capabilities

- Query traffic summaries, trends, comparisons, live activity, and dimensional breakdowns.
- Inspect page engagement, section views, event counts, event schemas, and property values.
- Analyze revenue by currency, plan, product, attribution, time, and retention cohort.
- Reconstruct session paths and the chronological activity of an anonymous user.
- Define, compare, query, and delete saved cohorts.
- Review grouped errors, affected users, timelines, and error breadcrumbs.
- Create, list, evaluate, and delete conversion funnels and metric alerts.

Other listed analytics, project, and documentation tools are marked available on all plans.

## Limitations and notes

The server requires access to a Clamp Analytics project and a valid project API key when using the stdio package. The `pages.engagement` sections view requires the section-views SDK extension. Revenue retention uses MRR-based cohort calculations anchored to a customer's first `subscription_started` event. Money-based revenue queries can split results by currency.

Result sizes are controlled by a `limit` parameter from 1 to 50, with a default of 10. The server does not make funnel or cohort definitions mutable in place. Duplicate funnel names produce a conflict, and renaming or restructuring requires deletion followed by creation.

_Full upstream README: https://allmcps.com/mcp/clamp-sh-mcp/readme_

