MCP Hub
Back to servers

clevertap-mcp

An MCP server that enables AI assistants to interact with the CleverTap REST API to manage user profiles, events, campaigns, and reports. It supports multi-project configurations and provides tools for data analysis and campaign management through natural language.

glama
Updated
Mar 28, 2026

clevertap-mcp

A Model Context Protocol (MCP) server for the CleverTap REST API. Exposes CleverTap's user profiles, events, campaigns, and reports as tools that any MCP-compatible AI assistant (Claude, Cursor, etc.) can call directly.


Features

  • Multi-project — manage multiple CleverTap accounts from a single server instance
  • Guided setup — if no project is configured, clevertap_configure walks you through the process
  • Full API coverage — events, profiles, campaigns, and reports
  • Async polling — long-running operations (event/profile counts) are polled automatically

Tools

Meta

ToolDescription
clevertap_configureGuided setup to add a project or generate the CLEVERTAP_PROJECTS config
clevertap_list_projectsList all configured projects and their regions

Events

ToolDescription
clevertap_upload_eventsUpload one or more events for a user
clevertap_get_eventsQuery event data with filters
clevertap_get_events_cursorFetch the next page of event results via cursor
clevertap_get_event_countGet the total count of an event (with async polling)

Profiles

ToolDescription
clevertap_upload_profilesCreate or update user profiles
clevertap_get_profileLook up a single user by identity, email, or objectId
clevertap_get_profiles_by_eventGet profiles of users who performed an event
clevertap_get_profiles_cursorFetch the next page of profile results via cursor
clevertap_delete_profileDelete a user profile
clevertap_upload_device_tokenRegister a push token for a user
clevertap_get_profile_countCount profiles matching a segment
clevertap_demerge_profilesSplit merged profiles apart
clevertap_subscribeSubscribe/unsubscribe a user to channels
clevertap_disassociate_phoneRemove a phone number from a profile

Campaigns

ToolDescription
clevertap_get_campaignsList campaigns within a date range
clevertap_get_campaign_reportGet delivery and engagement stats for a campaign
clevertap_stop_campaignStop a running campaign
clevertap_create_campaignCreate and launch a campaign

Reports

ToolDescription
clevertap_get_message_reportMessage-level delivery report
clevertap_get_top_property_countTop property value counts for an event
clevertap_get_event_trendDaily/weekly/monthly trend for an event
clevertap_get_dauDaily active users trend
clevertap_get_uninstall_reportUninstall trend report
clevertap_get_real_time_countsReal-time active user counts

Generic

ToolDescription
clevertap_requestMake any raw REST API request
clevertap_pollPoll a pending async request by req_id

Installation

git clone https://github.com/your-org/clevertap-mcp.git
cd clevertap-mcp
npm install
npm run build

Configuration

The server reads project credentials from the CLEVERTAP_PROJECTS environment variable — a JSON array of project objects:

[
  {
    "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"
  }
]

Supported regions: in1, us1, eu1, sg1, aps3, mec1

Single-project fallback

You can also use individual environment variables for a single project:

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

Adding to Claude Desktop

In your claude_desktop_config.json (or ~/.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\"}]"
      }
    }
  }
}

Important: CLEVERTAP_PROJECTS must be a serialized JSON string (not a native JSON object) inside the env block.


Development

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

Project structure

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          # (future) Browser session tools via Playwright

License

MIT

Reviews

No reviews yet

Sign in to write a review