Skip to main content
Glama

clevertap-mcp

一个用于 CleverTap REST API 的 模型上下文协议 (MCP) 服务器。它将 CleverTap 的用户画像、事件、营销活动和报告作为工具公开,任何兼容 MCP 的 AI 助手(如 Claude、Cursor 等)都可以直接调用。


功能特性

  • 多项目支持 — 从单个服务器实例管理多个 CleverTap 账户

  • 引导式设置 — 如果未配置项目,clevertap_configure 将引导您完成整个过程

  • 全面的 API 覆盖 — 支持事件、画像、营销活动和报告

  • 异步轮询 — 自动轮询长时间运行的操作(事件/画像计数)


Related MCP server: Mixpanel MCP Server

工具

元数据

工具

描述

clevertap_configure

引导式设置,用于添加项目或生成 CLEVERTAP_PROJECTS 配置

clevertap_list_projects

列出所有已配置的项目及其区域

事件

工具

描述

clevertap_upload_events

为用户上传一个或多个事件

clevertap_get_events

使用过滤器查询事件数据

clevertap_get_events_cursor

通过游标获取下一页事件结果

clevertap_get_event_count

获取事件的总计数(支持异步轮询)

用户画像

工具

描述

clevertap_upload_profiles

创建或更新用户画像

clevertap_get_profile

通过身份、电子邮件或 objectId 查找单个用户

clevertap_get_profiles_by_event

获取执行过某事件的用户画像

clevertap_get_profiles_cursor

通过游标获取下一页画像结果

clevertap_delete_profile

删除用户画像

clevertap_upload_device_token

为用户注册推送令牌

clevertap_get_profile_count

计算匹配细分市场的画像数量

clevertap_demerge_profiles

拆分已合并的画像

clevertap_subscribe

订阅/取消订阅用户的渠道

clevertap_disassociate_phone

从画像中移除电话号码

营销活动

工具

描述

clevertap_get_campaigns

列出日期范围内的营销活动

clevertap_get_campaign_report

获取营销活动的投放和互动统计数据

clevertap_stop_campaign

停止正在运行的营销活动

clevertap_create_campaign

创建并启动营销活动

报告

工具

描述

clevertap_get_message_report

消息级投放报告

clevertap_get_top_property_count

事件的顶级属性值计数

clevertap_get_event_trend

事件的日/周/月趋势

clevertap_get_dau

日活跃用户趋势

clevertap_get_uninstall_report

卸载趋势报告

clevertap_get_real_time_counts

实时活跃用户计数

通用

工具

描述

clevertap_request

发起任何原始 REST API 请求

clevertap_poll

通过 req_id 轮询挂起的异步请求

Web / 浏览器

工具

描述

clevertap_web_login

打开 Chromium 窗口,并在手动登录后捕获仪表板会话 cookie + CSRF 令牌(支持 SSO 和 2FA)

clevertap_web_session_status

检查是否已为项目捕获 Web 会话,以及获取时间

clevertap_web_request

使用捕获的会话向任何 CleverTap 仪表板端点发起已认证的请求

clevertap_get_campaigns_ui

从仪表板 UI API 列出营销活动 — 比 REST API 提供更丰富的数据(状态、发送量、展示量、点击量、编辑 URL)

clevertap_send_test_push

向特定设备令牌发送测试推送通知。接受来自 clevertap_get_profile 的推送令牌 (platformInfo[].push_token)、目标平台 (ios/android)、推送渠道名称以及可选的深度链接 URL。

Web 工具前提条件:npm install 后安装一次 Playwright Chromium 二进制文件:

npx playwright install chromium

安装

git clone https://github.com/your-org/clevertap-mcp.git
cd clevertap-mcp
npm install
npx playwright install chromium   # required for web/browser tools
npm run build

配置

服务器从 CLEVERTAP_PROJECTS 环境变量中读取项目凭据 — 这是一个项目对象的 JSON 数组:

[
  {
    "name": "My App - Production",
    "account_id": "XXX-XXX-XXXX",
    "passcode": "YYY-YYY-YYYY",
    "region": "us1"
  },
  {
    "name": "My App - Staging",
    "account_id": "AAA-AAA-AAAA",
    "passcode": "BBB-BBB-BBBB",
    "region": "us1"
  }
]

支持的区域: in1, us1, eu1, sg1, aps3, mec1

单项目回退

您也可以为单个项目使用单独的环境变量:

CLEVERTAP_ACCOUNT_ID=XXX-XXX-XXXX
CLEVERTAP_PASSCODE=YYY-YYY-YYYY
CLEVERTAP_REGION=us1

添加到 Claude Desktop

在您的 claude_desktop_config.json(或 ~/.claude.json)中:

{
  "mcpServers": {
    "clevertap": {
      "command": "node",
      "args": ["/absolute/path/to/clevertap-mcp/dist/index.js"],
      "env": {
        "CLEVERTAP_PROJECTS": "[{\"name\":\"My App\",\"account_id\":\"XXX-XXX-XXXX\",\"passcode\":\"YYY-YYY-YYYY\",\"region\":\"us1\"}]"
      }
    }
  }
}

重要: CLEVERTAP_PROJECTS 必须是 env 块内序列化的 JSON 字符串(而不是原生 JSON 对象)。


开发

npm run build      # compile TypeScript → dist/
npm run dev        # watch mode
npm start          # run compiled server

项目结构

src/
  index.ts          # MCP server entry point, project config, tool registration
  client.ts         # CleverTap REST API HTTP client
  tools/
    events.ts       # Event upload and query tools
    profiles.ts     # Profile management tools
    campaigns.ts    # Campaign tools
    reports.ts      # Analytics and report tools
    generic.ts      # Raw request / poll tools
    web.ts          # Browser session tools via Playwright (login, campaigns UI, test push)

许可证

MIT

Available Tools

1 tool
clevertap_configureA

CleverTap MCP has no project configured yet. Call this tool with your CleverTap credentials and it will return the exact configuration snippet to paste into your MCP settings — then restart the server to activate all tools.

ParametersJSON Schema
NameRequiredDescriptionDefault
account_idYesCleverTap Account ID — found in the CleverTap dashboard under Settings → Accounts
passcodeYesCleverTap Passcode — found in the CleverTap dashboard under Settings → Accounts
regionNoData residency region: in1 (India), us1 (US), eu1 (Europe), sg1 (Singapore), aps3 (Asia-Pacific), mec1 (Middle East)in1
project_nameNoLabel for this project. Use any short name (e.g. "production", "staging"). Defaults to "default".default

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly explains that this tool returns a configuration snippet rather than performing the configuration directly, which is valuable behavioral context. It also mentions the need to restart the server afterward. However, it doesn't disclose potential authentication requirements beyond credentials, rate limits, or error behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with two sentences that each serve a clear purpose: the first establishes the context and action, the second explains the outcome and next steps. There's zero wasted language, and it's front-loaded with the essential information about when and why to use the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a configuration tool with no annotations and no output schema, the description provides good context about the tool's purpose and usage flow. It explains what happens (returns configuration snippet) and what needs to happen next (restart server). However, it doesn't describe the format of the returned snippet or potential error conditions, leaving some gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all four parameters thoroughly. The description doesn't add any additional parameter semantics beyond what's in the schema descriptions. It mentions 'credentials' generally but doesn't elaborate on specific parameters. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action: 'Call this tool with your CleverTap credentials and it will return the exact configuration snippet to paste into your MCP settings.' It explicitly addresses the initial setup scenario ('no project configured yet') and distinguishes this as a one-time configuration tool. The verb 'configure' is specific and the resource is the CleverTap MCP project setup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'CleverTap MCP has no project configured yet.' It also specifies the follow-up action required: 'then restart the server to activate all tools.' Since there are no sibling tools mentioned, the description appropriately focuses on the specific use case without needing to differentiate from alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev1.0.0
    • First observedclevertap_configure

TDQS

A4.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools, as there are no other tools to compare it to. The tool's purpose is clearly defined as a configuration setup step.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name 'clevertap_configure' follows a clear verb_noun pattern, and there are no other tools to create inconsistency.

Tool Count2/5

A single tool is too few for a server intended to interact with CleverTap, as it suggests the server is not yet fully functional or lacks operational capabilities. This is a significant mismatch for the apparent scope of a CleverTap integration.

Completeness1/5

The tool set is severely incomplete for a CleverTap MCP server, as it only provides a configuration tool and no actual operational tools for interacting with CleverTap data or features. This leaves obvious gaps in the domain coverage.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers