Clamp Analytics MCP Server

Clamp Analytics MCP Server

Provides AI assistants with read access to Clamp analytics data including pageviews, visitors, referrers, and custom events. Enables traffic analysis, conversion funnel evaluation, and metric alerts through natural language queries.

Category
访问服务器

README

@clamp-sh/mcp

MCP server for Clamp analytics. Gives your AI assistant read access to pageviews, visitors, referrers, countries, devices, custom events, and conversion funnels. Pro plans can create funnels and set up metric alerts.

Works with any MCP client: Claude Desktop, VS Code Copilot, Cursor, Windsurf, Cline, or anything that speaks the Model Context Protocol.

Setup

VS Code / Copilot

Add to .vscode/mcp.json in your project:

{
  "servers": {
    "clamp": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@clamp-sh/mcp"],
      "env": {
        "CLAMP_API_KEY": "sk_proj..."
      }
    }
  }
}

Claude Code

claude mcp add clamp -- npx -y @clamp-sh/mcp

Then set your API key:

export CLAMP_API_KEY="sk_proj..."

Claude Desktop

Add to claude_desktop_config.json:

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

Cursor

Add to .cursor/mcp.json:

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

API key

Get your API key from the Clamp dashboard under Settings > API Keys. Keys are scoped to a project and start with sk_proj.

Tools

Free (all plans)

Tool What it does
get_overview Pageviews, visitors, sessions, bounce rate, avg duration. Period comparison included.
get_top_pages Most visited pages ranked by pageviews.
get_top_referrers Traffic sources with channel classification (organic_search, direct, referral, paid, email, organic_social).
get_countries Visitors by country (ISO 3166-1 alpha-2 codes).
get_devices Breakdown by device type, browser, or OS.
get_events Custom event counts with property filtering and grouping.
get_timeseries Event counts over time with automatic granularity.

Pro

Tool What it does
create_funnel Define and immediately evaluate a multi-step conversion funnel.
get_funnel Retrieve a funnel with cohort filters (country, channel, device, UTM).
create_alert Set up metric alerts (e.g. "visitors drops_by 30% over 7d").

Common parameters

period"today", "yesterday", "7d", "30d", "90d", or a custom range as "YYYY-MM-DD:YYYY-MM-DD". Defaults to "30d".

limit — Max rows returned, 1-50. Defaults to 10.

Filters — Most tools accept pathname, utm_source, utm_campaign. Referrers accept channel. Funnels accept cohort filters: country, channel, device_type, utm_source, utm_campaign.

Prompts

Pre-built analytics workflows the AI can follow. Each prompt tells the model which tools to call, in what order, and how to present the results.

Prompt What it produces
weekly_report Traffic summary, top pages, referrers, countries, one actionable insight.
traffic_diagnosis Root-cause analysis for traffic changes. Drills into channels, countries, devices, pages.
conversion_audit Funnel drop-off analysis with cohort segmentation.
channel_breakdown Traffic quality comparison across sources (volume vs engagement).
page_performance Deep-dive on a single page: trends, referrers, devices, engagement vs site average.

Examples

Traffic overview

"How's my traffic this week?"

Calls get_overview with period="7d". Returns pageviews, visitors, sessions, bounce rate, avg duration, and comparison to the previous week.

"What's the bounce rate on /pricing?"

Calls get_overview with pathname="/pricing". Returns metrics for that single page, including comparison to the prior period.

"Show me traffic trends for the last 90 days"

Calls get_timeseries with period="90d". Returns daily counts over the full window.

Sources and geography

"Where are my visitors coming from?"

Calls get_top_referrers. Returns referrer hostnames with channel classification (organic_search, direct, referral, paid, email, organic_social).

"Show me only organic search traffic to /blog"

Calls get_top_referrers with channel="organic_search" and pathname="/blog".

"Which countries send the most traffic?"

Calls get_countries. Returns ISO country codes with visitor and pageview counts.

Devices

"What's the mobile vs desktop split?"

Calls get_devices with group_by="device_type".

"Which browsers are my visitors using?"

Calls get_devices with group_by="browser".

Custom events

"How many signups happened this month?"

Calls get_events with name="signup" and period="30d".

"Break down signups by plan"

Calls get_events with name="signup" and group_by="plan". Returns counts per property value (e.g. free: 42, pro: 18, growth: 7).

"How many signups came from the spring campaign?"

Calls get_events with name="signup" and utm_campaign="spring-launch".

Funnels (Pro)

Funnels let you track multi-step conversion and filter by cohorts: country, channel, device type, and UTM parameters. This is where you answer questions like "how many mobile users from Germany actually signed up?"

"Create a funnel from pricing page to signup to checkout"

Calls create_funnel with steps ["pageview:/pricing", "signup", "checkout_completed"]. Returns step-by-step conversion rates immediately.

"How does the pricing-to-signup funnel convert on mobile?"

Calls get_funnel with name="pricing-to-signup" and device_type="mobile".

"Compare funnel conversion for US vs Germany"

Two calls to get_funnel, one with country="US" and one with country="DE".

"What's the funnel conversion for visitors from Google?"

Calls get_funnel with channel="organic_search".

"How many mobile users from Germany signed up?"

Create a single-step funnel with steps=["signup"] and filter with country="DE" and device_type="mobile". Cohort filtering works on any funnel, including single-event funnels.

Alerts (Pro)

"Alert me if visitors drop by 30% week over week"

Calls create_alert with metric="visitors", condition="drops_by", threshold=30, period="7d".

"Alert me if bounce rate on /pricing goes above 70%"

Calls create_alert with metric="bounce_rate", condition="above", threshold=70, pathname="/pricing".

Workflows

"Run a weekly report"

Follows the weekly_report prompt. Calls overview, top pages, referrers, countries, and timeseries, then synthesizes a structured report with trends and one actionable insight.

"Why did traffic drop last week?"

Follows the traffic_diagnosis prompt. Systematically checks channels, countries, devices, and pages to isolate the root cause.

"Audit our conversion funnel"

Follows the conversion_audit prompt. Analyzes funnel drop-offs, segments by device/country/channel, and identifies the biggest optimization opportunity.

"How is /pricing performing?"

Follows the page_performance prompt. Pulls page-specific metrics, referrers, device split, and compares engagement to the site average.

Environment variables

Variable Required Description
CLAMP_API_KEY Yes Project API key (sk_proj...).

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选