Skip to main content
Glama

moengage-mcp

A Model Context Protocol (MCP) server for the MoEngage marketing platform. Exposes campaign and email-template tools over stdio, built on FastMCP.

Unlike MoEngage's official MCP (analytics-oriented, interactive OAuth), this server uses the documented Campaign/Content API with plain API-key auth — it runs headless, and it reads campaign targeting (the full segmentation_details filter tree via search_campaigns), which the official server does not expose.

Tools

Campaigns (9)

Tool

Mutates

Purpose

search_campaigns

no

Search/filter campaigns; returns config including the full targeting filter tree (segmentation_details). Email html_content is replaced with a byte count unless include_content=true

get_campaign_meta

no

Thin identity view: status, channel, delivery type, team, tags, dates (no targeting)

get_child_executions

no

Individual runs of a recurring (periodic) campaign

get_personalized_preview

no

Render campaign content with placeholders resolved for sample attributes

get_campaign_stats

no

⚠ Disabled upstream — hidden unless MOENGAGE_ENABLE_STATS=true; re-enable when MoEngage turns the endpoint back on

create_campaign

yes

Create a campaign; auto-supplies required delivery_controls/advanced for triggered types, strips the empty-intelligent_delay_optimization validator trap, create_paused=true pauses right after creation (API campaigns land Scheduled, not draft)

update_campaign

yes

Update campaign config

change_campaign_status

yes

Activate / pause / stop a campaign

test_campaign

yes

Send a real test push/email to named recipients

Custom segments (3)

Tool

Mutates

Purpose

create_custom_segment

yes

Create a filter segment — event shortcut ("executed X ≥N times in last D days") or full filter tree. Segment user counts are dashboard-only (no API exposes them)

get_custom_segment

no

Get one segment's definition by id, or list all custom segments

archive_custom_segment

yes

Archive (deferred delete, ~30d purge) or restore a segment

Email templates (9)

Tool

Mutates

Purpose

search_templates

no

Search templates with filters and pagination

analyze_template

no

Parse template HTML into structured content nodes

compare_templates

no

Structured diff of two templates

build_email_template

no

Build + validate a template, return a structured preview (no publish); autofix=true repairs mechanical layout issues (isolation spacers, missing disclaimer/footer)

get_server_info

no

Data center + dashboard base URL

publish_template

yes

Build + validate + publish to MoEngage

update_template

yes

Update an existing template

localize_template

yes

Publish a translated market variant

patch_template_text

yes

Modify specific text nodes without a rebuild

Tools return structured previews, never raw HTML — large payloads would overflow an agent's context window.

Gating writes: the server ships all tools; restrict the mutating ones in your MCP client (e.g. Claude Code permissions.allow listing only the read tools). Read and write tools share MoEngage's campaign-API rate limits (5/min, 25/hr, 100/day) — avoid fanning out calls.

Related MCP server: Brevo MCP Server

Install & run

pip install git+https://github.com/poddubnyoleg/moengage_mcp.git
moengage-mcp            # stdio

Claude Code / Claude Desktop config:

{
  "mcpServers": {
    "moengage": {
      "type": "stdio",
      "command": "moengage-mcp"
    }
  }
}

Configuration

Environment variables (or a local .env, see .env.example):

Variable

Required

Description

MOENGAGE_API_KEY

yes

Campaign/Content API key (dashboard → Settings → APIs)

MOENGAGE_DATA_API_KEY

for segments

Data API key (dashboard → Settings → APIs → Data) — the segment tools authenticate against MoEngage's Data API family, which rejects the campaign key with a 401 APP_SECRET key mismatch. Falls back to MOENGAGE_API_KEY

MOENGAGE_WORKSPACE_ID

yes

Workspace (app) ID

MOENGAGE_DATA_CENTER

yes

Regional DC, e.g. 02 for dashboard-02.moengage.com

MOENGAGE_FOOTER_CONFIG

no

Brand links for the email footer component — inline JSON or a file path (schema in footer.py); without it the footer carries only an Unsubscribe link

MOENGAGE_ENABLE_STATS

no

Set true to register get_campaign_stats (hidden by default while the upstream endpoint is disabled)

API errors (including 401 on rotated keys) come back as structured error dicts, so a consuming agent can report them instead of failing opaquely.

Notes

  • content/email/TEMPLATE_GUIDELINES.md documents an example house style the template validator enforces (component order, CTA compliance, Jinja rules) — adapt to your brand.

  • Audience reachability counts are only returned by MoEngage for one-time scheduled campaigns, not periodic ones.

License

MIT

Available Tools

18 tools
analyze_templateA

Fetch existing template from MoEngage, parse HTML, return structured content map (NO HTML).

Both parameters are required — together they pin the exact template revision to fetch. Never omit version: without it the wrong revision may be fetched and cached, causing localize_template to patch the wrong HTML.

Provides ~8:1 compression vs raw HTML. Agent sees structured text nodes instead of HTML.

Returns:

  • template_meta: name, id, version, subject, sender, preview_text

  • content_map: ordered list of {id, context, text, localizable, jinja_expressions, link?}

  • images: list of {id, context, url, alt_text, link_url}

  • structure_summary: one-line description

  • html_bytes: size metric

The HTML is cached in-memory (15-min TTL) for subsequent localize_template / patch_template_text calls.

Inputs: external_template_id (required), version (required). Returns: object

build_email_templateA

Build and validate email template, returning structured preview (NO HTML).

Each component is a dict with a "type" key and component-specific parameters. Component types: header, title, text, button, spacer, divider, image, disclaimer, footer, jinja_block.

Returns a rich structured preview with:

  • structure: Ordered list of components with content previews

  • personalization: Jinja variables, user attributes, conditionals

  • summary: Auto-generated human-readable description

  • validation: Errors and warnings

  • component_count, html_bytes

HTML is built internally but NOT returned (prevents context overflow). Use debug=True to save HTML to temp file for inspection.

Inputs: title (required), components (required), debug. Returns: object

change_campaign_statusA

Change the lifecycle state of 1-10 campaigns.

action: STOP, PAUSE, or RESUME. campaign_ids: List of 1-10 campaign IDs to update.

STOP: Only valid for ONE_TIME campaigns in SCHEDULED state. Fails if the campaign is already Active or has passed that state. PAUSE/RESUME: Valid for Email and Push campaigns with delivery types PERIODIC, EVENT_TRIGGERED, DEVICE_TRIGGERED, or LOCATION_TRIGGERED.

Only campaigns created via the API can have their status changed.

Rate limit: 5/min, 25/hr, 100/day.

Processes all IDs in a single API call. Returns per-campaign result list. Returns: {success: true, results: [{campaign_id, success: true, dashboard_url}]} on full success. {success: false, error: "All N campaign(s) failed: ", results: [{campaign_id, success: false, error}], api_response} on API failure. {success: false, error: ""} on input validation failure.

Inputs: action (required), campaign_ids (required). Returns: object

compare_templatesA

Structured diff of two templates' text content (e.g. EN vs ES review).

Returns per-node comparison with match_type:

  • identical: text is the same in both

  • changed: text differs

  • only_in_a: node exists only in template A

  • only_in_b: node exists only in template B

Inputs: template_a_id (required), template_b_id (required). Returns: object

create_campaignA

Create an Email or Push campaign in MoEngage.

Uses flat scalar params by default. Dict overrides replace auto-built sub-objects.

--- REQUIRED --- channel: EMAIL or PUSH. campaign_delivery_type: ONE_TIME, PERIODIC, EVENT_TRIGGERED, BUSINESS_EVENT_TRIGGERED, DEVICE_TRIGGERED (Push only), LOCATION_TRIGGERED (Push only), BROADCAST_LIVE_ACTIVITY (Push only). created_by: Creator email address (must contain @). campaign_name: Campaign display name.

--- EMAIL CONTENT (required for EMAIL unless campaign_content override) --- subject: Email subject line (required unless template_id provided). sender_name: Display name for sender (defaults to campaign_name). from_address: Sending email address (required). reply_to_address: Reply-to address (defaults to from_address). html_content: Raw HTML body (mutually exclusive with template_id). template_id: Saved template ID (mutually exclusive with html_content). preview_text: Email preheader text shown in inbox previews. cc_ids: CC email addresses list. bcc_ids: BCC email addresses list. custom_template_version: Template version number override. attachments: List of attachment dicts.

--- PUSH CONTENT (required for PUSH unless campaign_content override) --- platforms: Target platforms list — ANDROID, IOS, WEB (required). push_title: Notification title (required). push_message: Notification body (required). android_notification_channel: Android channel ID (default: "default"). android_default_click_action: Click action type (default: "DEEPLINKING"). android_default_click_action_value: Deep link URL for DEEPLINKING. android_image_url: Android notification image URL. android_input_gif_url: Android notification GIF URL. android_key_value_pairs: Custom key-value pairs for Android. android_buttons: Android push action buttons list. android_advanced: Android advanced options dict. android_push_content_override: Replaces auto-built Android content block entirely. android_summary: Android notification summary text. android_push_amp_plus_enabled: Enable Push Amplification Plus (default: False). android_template_type: BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT, TIMER, TIMER_WITH_PROGRESS_BAR, or Custom (default: "BASIC"). android_custom_template_id: Custom template ID (with Custom template_type). android_custom_template_version: Custom template version. android_timer: Timer config dict for countdown notifications. android_template_backup: Fallback template dict for custom templates. android_carousel_content: Carousel content dict. android_background_color_code: Hex color for notification background. android_app_name_color_code: Hex color for app name text. android_notification_control_color: LIGHT or DARK control color. android_include_app_name_and_time: Show app name and time. android_include_title_and_message: Show title and message. android_apply_background_color_in_text_editor: Apply bg color in text editor. android_image_scaling: FIT_INSIDE_IMAGE_CONTAINER or FILL_IMAGE_CONTAINER. android_banner_image_url: Banner image URL (IMAGE_BANNER_WITH_TEXT). android_collapsed_push_notification: Collapsed push style. ios_title: iOS title (falls back to push_title). ios_message: iOS message body (falls back to push_message). ios_default_click_action: iOS click action type. ios_default_click_action_value: iOS click action URL/value. ios_subtitle: iOS notification subtitle. ios_allow_bg_refresh: Allow background refresh for iOS push. ios_rich_media_type: IMAGE, VIDEO, AUDIO, or GIF. ios_rich_media_value: Rich media URL value. ios_image_url: iOS notification image URL. ios_input_gif_url: iOS notification GIF URL. ios_key_value_pairs: Custom key-value pairs for iOS. ios_background_color_code: Hex color for notification background. ios_apply_background_color_in_text_editor: Apply bg color in text editor. ios_template_type: BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, or Custom. ios_custom_template_id: Custom template ID. ios_custom_template_version: Custom template version. ios_template_backup: Fallback template dict. ios_carousel_content: Carousel content dict. ios_send_to_all_eligible_device: Send to all eligible iOS devices (default True). ios_exclude_provisional: Exclude provisional push devices. ios_send_to_only_provisional: Send only to provisional push devices. ios_buttons: iOS push action buttons list. ios_advanced: iOS advanced options dict. ios_push_content_override: Replaces auto-built iOS content block entirely. web_redirect_url: Web push redirect URL (required for WEB platform). web_image_url: Web push notification image URL. web_auto_dismiss_notification: Auto-dismiss web notification. web_buttons: Web push action buttons list. web_advanced: Web advanced options dict. web_icon_image_type: DEFAULT or ICON_URL. web_icon_url: Custom icon URL for web push. web_push_content_override: Replaces auto-built Web content block entirely.

--- BASIC DETAILS --- content_type: PROMOTIONAL or TRANSACTIONAL (EMAIL only, default: PROMOTIONAL). subscription_category: Subscription list category (EMAIL PROMOTIONAL only). tags: Campaign tags list. team: Team name. business_event: Business event name. send_to_triggered_platform_only: Send only to triggering platform (PUSH only). broadcast_live_activity_id: Live Activity broadcast ID (PUSH iOS only). geofences: Geofence config dict (PUSH LOCATION_TRIGGERED only).

--- SCHEDULING --- scheduling_delivery_type: AT_FIXED_TIME, ASAP, SEND_IN_BTS, or SEND_IN_USER_TIMEZONE. start_time: ISO 8601 start datetime. end_time: ISO 8601 expiry datetime. periodic_details: Periodic scheduling config dict (PERIODIC campaigns). bts_details: Best-time-to-send config dict (SEND_IN_BTS). user_timezone_details: User timezone config dict (SEND_IN_USER_TIMEZONE).

--- CONNECTOR (EMAIL only, defaults to AMAZON_SES/default) --- connector_type: Email service provider (default: "AMAZON_SES"). connector_name: Connector config name (default: "default").

--- SEGMENTATION SHORTCUTS (defaults to all users) --- is_all_user_campaign: Target all users (default: True). custom_segment_id: Target a specific segment (sets is_all_user_campaign=False).

--- UTM --- utm_source: UTM source parameter. utm_medium: UTM medium parameter. utm_campaign: UTM campaign parameter. utm_term: UTM term parameter. utm_content: UTM content parameter. utm_custom: UTM custom parameter.

--- DICT OVERRIDES (replace auto-built sub-objects when provided) --- basic_details: Full basic_details dict. Flat scalars merged as defaults. campaign_content: Full campaign_content dict. Replaces all content flat params. scheduling_details: Full scheduling_details dict. Flat scheduling scalars merged. segmentation_details: Full segmentation_details dict. connector: Full connector dict. trigger_condition: Trigger config (required for EVENT_TRIGGERED). delivery_controls: Delivery controls dict. conversion_goal_details: Conversion goal config dict. control_group_details: Control group config dict. utm_params: Full UTM params dict. Replaces utm_* flat params. advanced: Advanced push options dict (PUSH only). campaign_audience_limit: Audience limit config (EMAIL only). locales: Locale configuration for A/B testing. variation_details: Variation metadata for A/B testing.

Rate limit: 5 campaigns/min, 25/hr, 100/day.

Returns: {success: true, campaign_id, dashboard_url} on success. {success: false, error} on validation error. {success: false, error, status_code, api_response} on API error.

Inputs: channel (required), campaign_delivery_type (required), created_by (required), campaign_name, +110 more. Returns: object

get_campaign_metaA

Get detailed campaign metadata including reachability_details for scheduled campaigns.

Accepts the same filters as search_campaigns. Returns the full campaign object from MoEngage — no field curation. reachability_details (count + last_updated_time) is only populated for scheduled campaigns (one-time, business event-triggered, and event-triggered delivery types). Absent for periodic, active, or other non-scheduled campaigns. Reachability is calculated once daily and cached for 24 hours.

Supported channels: EMAIL, PUSH, SMS, WHATSAPP, FACEBOOK, GOOGLE ADS, CONNECTORS Supported delivery_type: ONE_TIME, PERIODIC, EVENT_TRIGGERED, BUSINESS_TRIGGERED Supported status: SCHEDULED, ACTIVE, PAUSED, SENT, STOPPED, RETIRED, ARCHIVED

created_date_from and created_date_to must both be provided together (ISO 8601 dates). include_child_campaigns: Include child campaigns (flow nodes and periodic children). When true, use flow_id, flow_name, or parent_campaign_id in the response to identify parent-child relationships. Periodic parent campaigns include total_child_campaigns.

When campaign_id is provided and no campaign is found: {success: false, error: "Campaign not found", campaign_id: ""}

Rate limit: 5/min, 25/hr, 100/day.

Pagination: page (1-indexed) + limit (max 15). has_more is heuristic (count == limit) — may false-positive on exact multiples of limit.

Additional fields in response: campaign_team, platform array, among others.

Field name differences vs search_campaigns: campaign_status vs status, campaign_name vs basic_details.name, parent_campaign_id vs parent_id.

Returns: {success: true, campaigns: [full_campaign_object], page, limit, has_more} Each campaign may include: total_child_campaigns (periodic parents), parent_campaign_id (child campaigns), reachability_details (scheduled only). {success: false, error: "Campaign not found", campaign_id} if id lookup finds nothing. {success: false, error, status_code, api_response} on API error.

Inputs: campaign_id, channels, delivery_type, status, +8 more. Returns: object

get_campaign_statsA

⚠ UNAVAILABLE: The Campaign Stats API has been disabled on MoEngage's side. This tool is currently non-functional. Do not use until further notice.

Get performance statistics for campaigns from MoEngage.

Both start_date and end_date are required — the MoEngage stats API has no lifetime summary mode. Max date range is 30 days.

start_date: Start of the stats window in YYYY-MM-DD format (required). end_date: End of the stats window in YYYY-MM-DD format (required). Must be within 30 days of start_date. attribution_type: Conversion attribution model (required). One of: VIEW_THROUGH, CLICK_THROUGH, IN_SESSION, TOTAL_CONVERSIONS, CLICK_CONVERSIONS. metric_type: Counting mode (required) — TOTAL or UNIQUE. campaign_ids: Optional list of campaign IDs to filter (max 10 per call). Omit to get stats for all campaigns in the date range. offset: Pagination offset (0-indexed). Default 0. limit: Results per page, max 10. Default 10.

Per-campaign stats include:

  • performance_stats: sent, delivered, opened, clicked, ctr, open_rate, etc.

  • delivery_funnel: reachable_users_in_segment, after_fc, after_dup, etc.

  • conversion_goal_stats: conversions, cvr, uplift, revenue, ARPU per goal

  • failure_breakdown: categorized delivery failures

Pagination: offset (0-indexed) + limit (max 10). Uses total_pages from the API (accurate, unlike heuristic in search/meta).

Rate limit for this endpoint: 100 requests/minute (separate from the 5/min limit on campaign create/update operations).

Returns: {success: true, response_id, total_campaigns, current_page, total_pages, data: {campaign_id: [{platforms: {...}}]}} {success: false, error: str} on validation error (e.g. >10 campaign_ids). {success: false, error, status_code, api_response} on API error.

Inputs: start_date (required), end_date (required), attribution_type (required), metric_type (required), +3 more. Returns: object

get_child_executionsA

Get child executions for a periodic or business-event-triggered campaign.

Returns a curated list of executions with sent_time, status, and campaign_id per execution, plus total_instances (total count across all pages). Sort: most recent sent_time first.

Note: this endpoint only works for PERIODIC and BUSINESS_EVENT_TRIGGERED parent campaigns. Calling it on a ONE_TIME campaign returns no results.

parent_campaign_id: The ID of the parent periodic or business-event-triggered campaign. Any version ID is accepted — automatically resolved to the latest version. page: Page number, starting at 1 (default: 1) limit: Results per page, max 15 (default: 15)

Supported channels: Email and Push only.

Rate limit: not explicitly documented.

Pagination: page (1-indexed) + limit (max 15). has_more uses total_instances when available; None when total_instances is missing (unknown).

Returns: {success: true, executions: [{campaign_id, dashboard_url, sent_time, status}], total_instances: N, page, limit, has_more, parent_campaign_id, parent_dashboard_url} Status values are mixed-case: Sent, Sending, Scheduled, Failed. {success: false, error, status_code, api_response} on API error.

Inputs: parent_campaign_id (required), page, limit. Returns: object

get_personalized_previewA

Get a personalized preview with all {{UserAttribute[...]}} and {{EventAttribute[...]}} placeholders resolved.

channel: EMAIL, PUSH, or SMS. personalization_details: Dict with user_attributes, event_attributes, and/or event_name. event_name (str) is required when event_attributes are provided (event-triggered personalization). Example (user attrs): {"user_attributes": {"First Name": "Alice"}} Example (event attrs): {"event_name": "App Opened", "event_attributes": {"App_Version": "1.0"}} payload: Dict of content fields with placeholder strings to render. Example: {"subject": "Hello {{UserAttribute['First Name']}}", "body": "..."} All Jinja-style personalization expressions supported by MoEngage are passed through:

  • Content blocks: {{ContentBlock['block_name']}}

  • Product sets: {% if ProductSet.set_name %}...{% endif %}

  • Content API references: {{Content['api_name'].field}} custom_template_data: Use an existing template instead of inline payload. Requires both template_id and version. Example: {"template_id": "tmpl-abc", "version": "v1.0"} user_details: Optional identifier to resolve personalization against an actual MoEngage user profile. Requires both fields: {"identifier": "ID", "identifier_value": "USER_12345"}.

Provide either payload OR custom_template_data — not both, not neither.

Rate limit: 10,000/min.

Returns: {success: true, personalized_content: {payload: {...}}} on success. {success: false, error, status_code, api_response} on API error. {success: false, error: str} on validation failure (missing fields, invalid args).

Inputs: channel (required), personalization_details (required), payload, custom_template_data, +1 more. Returns: object

get_server_infoA

Return MCP server metadata including data_center and dashboard base URL.

Inputs: no named parameters. Returns: object

localize_templateA

Create a localized version of an existing template for a target market.

translations format: [{"id": "node_id", "translated_text": ""}, ...]

translated_text is the INNER content of the HTML element only — do not include the outer tag. The outer tag and all CSS attributes are preserved automatically. Inline HTML is supported: , , , may be used freely.

Jinja expression rules:

  • Preserve {{...}} structure exactly: variable names, filters, attribute keys

  • You MAY adapt the string VALUE inside |default('value') to sound natural

  • Do NOT modify {%...%} control flow expressions

image_overrides: Optional list of image URL/alt swaps. Each entry: {"id": "img_0", "url": "...", "alt_text": "...", "link_url": "..."}. IDs come from analyze_template's images list.

rtl: Set to True for right-to-left locales (Arabic, Hebrew, Farsi, etc.).

source_version: Integer revision number from search_templates. Pass this to ensure the correct HTML version is fetched on cache miss.

If publish=True and any localizable nodes have no translation, publishing is blocked. Set force=True to publish anyway.

Inputs: source_external_template_id (required), translations (required), target_locale (required), target_template_id (required),… Returns: object

patch_template_textA

Modify specific text nodes in an existing template without full rebuild.

Useful for small copy edits (e.g. fix a typo, update a date) without reconstructing the entire component list.

patches format: [{"id": "node_id", "new_text": "replacement text"}, ...]

Set publish=True to update the template in MoEngage immediately.

Inputs: external_template_id (required), patches (required), new_version (required), updated_by (required), +2 more. Returns: object

publish_templateA

Validate, build, and publish an email template to MoEngage.

Runs TemplateValidator before publishing (unless force=True). Returns success status, external_template_id, and structured preview on success. HTML is never exposed to agent context.

Use force=True to bypass validation. Use debug=True to save HTML to temp file for inspection.

Inputs: title (required), components (required), template_id (required), template_name (required), +7 more. Returns: object

search_campaignsA

Search MoEngage campaigns with optional filters and pagination.

All filters combine with AND logic — all provided filters must match. Zero results is not an error: returns {success: true, campaigns: [], has_more: false}.

channels: List of channels to filter by (e.g. ["EMAIL", "PUSH", "SMS"]) delivery_type: List of delivery types (ONE_TIME, PERIODIC, EVENT_TRIGGERED, BUSINESS_EVENT_TRIGGERED, DEVICE_TRIGGERED, LOCATION_TRIGGERED, BROADCAST_LIVE_ACTIVITY) status: List of statuses (ACTIVE, SCHEDULED, PAUSED, SENT, STOPPED, ARCHIVED) created_by: List of creator email addresses created_date_from: ISO date string for range start (required with created_date_to) created_date_to: ISO date string for range end (required with created_date_from) campaign_id: Filter by specific campaign ID (regular filter, not a direct lookup) name: Substring match on campaign name (case-insensitive) tags: List of tags to filter by page: Page number, starting at 1 (default: 1) limit: Results per page, 1–15 (default: 10) include_child_campaigns: Include child campaign executions in results (default: false) include_archive_campaigns: Include archived campaigns in results (default: false)

Date range: created_date_from and created_date_to must both be provided together.

Rate limit: 5/min, 25/hr, 100/day.

Pagination: page (1-indexed) + limit (max 15). has_more is heuristic (count == limit) — may false-positive on exact multiples of limit.

Note: Returns full raw campaign objects from the API — no field curation. Additional fields beyond the basics include: flow_id, flow_name, parent_id, basic_details.name, basic_details.tags, scheduling_details, among others.

Field name differences vs get_campaign_meta: status vs campaign_status, basic_details.name vs campaign_name, parent_id vs parent_campaign_id.

Returns: {success: true, campaigns: [full_campaign_object], page, limit, has_more} {success: false, error, status_code, api_response} on API error.

Inputs: channels, delivery_type, status, created_by, +9 more. Returns: object

search_templatesA

Search templates in MoEngage API with advanced filtering and pagination.

Set include_html=False (default) for listing/counting to avoid context overflow. Only use include_html=True when inspecting the actual HTML of a specific template.

Filters:

  • template_name: Partial match on template name

  • template_id: Exact match on custom template identifier

  • external_template_id: Exact match on MoEngage UUID

  • template_source: ["API"] for programmatic, ["MOENGAGE"] for dashboard-created

  • template_type: ["CUSTOM"] for user-created, ["PRE_BUILT"] for MoEngage templates

  • version: Exact version string

  • created_by / updated_by: Filter by email addresses

Sorting: sort_by ("template_name", "last_modified_date"), sort_order ("ASCENDING", "DESCENDING")

Pagination: page (1-indexed), entries (default 10, max 15). Response includes has_more.

Returns dict with success, templates, total, page, entries, has_more.

Inputs: template_name, template_id, external_template_id, page, +9 more. Returns: object

test_campaignA

Send a test Email or Push campaign to specific recipients.

channel: EMAIL or PUSH. campaign_name: Name for the test campaign. user_attributes: List of dicts identifying recipients. Each dict has one key-value pair. EMAIL examples: [{"email_id": "alice@example.com"}, {"email_id": "bob@example.com"}] PUSH examples: [{"customer_id": "uid-123"}, {"push_token": "tok-abc"}] Maximum 10 recipients for EMAIL test campaigns.

Required for EMAIL: from_address, and either html_content or template_id. subject is required unless template_id is provided. Required for PUSH: platforms (list of ANDROID/IOS/WEB), push_title, push_message.

Only campaigns created via the MoEngage API can be tested (dashboard-created campaigns will be rejected by MoEngage with an appropriate error).

--- EMAIL PARAMS --- subject: Email subject line (required unless template_id is provided). sender_name: Display name for the sender (defaults to campaign_name). from_address: Sending email address (required). reply_to_address: Reply-to address (defaults to from_address). connector_type: Email connector type (defaults to "AMAZON_SES"). connector_name: Connector config name (defaults to "default"). email_content_type: PROMOTIONAL or TRANSACTIONAL (default: PROMOTIONAL). html_content: Raw HTML body (mutually exclusive with template_id). template_id: Saved template ID (mutually exclusive with html_content). subscription_category: Required for PROMOTIONAL emails. preview_text: Preheader text shown in inbox previews. utm_params: UTM tracking parameters dict (injected at payload top level). cc_ids: CC email addresses list. bcc_ids: BCC email addresses list. custom_template_version: Template version number override. attachments: List of attachment dicts.

--- PUSH PARAMS --- platforms: Target platforms — list of ANDROID, IOS, WEB (required). push_title: Notification title (required). push_message: Notification body (required). android_notification_channel: Android channel ID (default: "default"). android_default_click_action: Android click action (default: "DEEPLINKING"). android_default_click_action_value: Deep link URL for DEEPLINKING. android_image_url: Android notification image URL. android_input_gif_url: Android notification GIF URL. android_key_value_pairs: Custom key-value pairs for Android. android_buttons: Android push action buttons list. android_advanced: Android advanced options dict. android_push_content_override: Replaces auto-built Android content block entirely. Flat android_* params are ignored when this is provided. android_summary: Android notification summary text. android_push_amp_plus_enabled: Enable Push Amplification Plus for Android (default: False). android_template_type: Android template type — BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT, TIMER, TIMER_WITH_PROGRESS_BAR, or Custom (default: "BASIC"). android_custom_template_id: Custom template ID (used with Custom template_type). android_custom_template_version: Custom template version. android_timer: Timer configuration dict for countdown notifications. android_template_backup: Fallback template dict for custom templates. android_carousel_content: Carousel content dict for carousel notifications. android_background_color_code: Hex color for notification background (STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT). android_app_name_color_code: Hex color for app name text (STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT). android_notification_control_color: LIGHT or DARK control color (STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT). android_include_app_name_and_time: Show app name and time (IMAGE_BANNER_WITH_TEXT). android_include_title_and_message: Show title and message (IMAGE_BANNER_WITH_TEXT). android_apply_background_color_in_text_editor: Apply background color in text editor (STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT). android_image_scaling: FIT_INSIDE_IMAGE_CONTAINER or FILL_IMAGE_CONTAINER (SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT). android_banner_image_url: Banner image URL (required for IMAGE_BANNER_WITH_TEXT). android_collapsed_push_notification: Collapsed push style e.g. "SAME_AS_TEMPLATE_BACKUP" (IMAGE_BANNER_WITH_TEXT). ios_title: iOS title (falls back to push_title if not set). ios_message: iOS message body (falls back to push_message if not set). ios_default_click_action: iOS click action type. ios_default_click_action_value: iOS click action URL/value. ios_subtitle: iOS notification subtitle. ios_allow_bg_refresh: Allow background refresh for iOS push. ios_rich_media_type: iOS rich media type — IMAGE, VIDEO, AUDIO, GIF. ios_rich_media_value: iOS rich media URL value. ios_image_url: iOS notification image URL. ios_input_gif_url: iOS notification GIF URL. ios_key_value_pairs: Custom key-value pairs for iOS push. ios_background_color_code: Hex color for notification background (STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL). ios_apply_background_color_in_text_editor: Apply background color in text editor (STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL). ios_template_type: iOS template type — BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, or Custom (default: "BASIC"). ios_custom_template_id: Custom template ID (used with Custom template_type). ios_custom_template_version: Custom template version. ios_template_backup: Fallback template dict for custom templates. ios_carousel_content: Carousel content dict for carousel notifications. ios_send_to_all_eligible_device: Send to all eligible iOS devices (default True). ios_exclude_provisional: Exclude provisional push devices (mutually exclusive with ios_send_to_only_provisional). ios_send_to_only_provisional: Send only to provisional push devices (mutually exclusive with ios_exclude_provisional). ios_buttons: iOS push action buttons list. ios_advanced: iOS advanced options dict. ios_push_content_override: Replaces auto-built iOS content block entirely. Flat ios_* content params are ignored when this is provided. web_redirect_url: Web push redirect URL (required by MoEngage for WEB platform). web_image_url: Web push notification image URL. web_auto_dismiss_notification: Auto-dismiss web push notification after display. web_buttons: Web push action buttons list. web_advanced: Web advanced options dict. web_icon_image_type: DEFAULT or ICON_URL — web notification icon source. web_icon_url: Custom icon URL for web push (used when icon_image_type is ICON_URL). web_push_content_override: Replaces auto-built Web content block entirely. Flat web_* params are ignored when this is provided.

--- SHARED PARAMS --- tags: Campaign tags list (injected into basic_details). team: Team name (injected into basic_details). business_event: Business event name (injected into basic_details). send_to_triggered_platform_only: Send only to the platform that triggered the event (PUSH only). broadcast_live_activity_id: Live Activity broadcast ID (PUSH iOS only). geofences: Geofence configuration dict (PUSH LOCATION_TRIGGERED only). locales: List of locale codes for multi-locale content. For locale-keyed content structure, use campaign_content_override instead. variation_details: Variation metadata dict for A/B test content. personalization_details: Flat dict of attribute overrides for test rendering. Format: {"UserAttribute[First Name]": "Alice", "EventAttribute[App_Version]": "2.0"} identifier_type: Override auto-detected MoEngage identifier type (e.g. "PUSH_ID", "MOE_GAID", "ADVERTISING_IDENTIFIER", "CUSTOM_SEGMENT"). When set, bypasses key-based auto-detection from user_attributes keys entirely. locale_name: Locale name to inject into test_campaign_meta (e.g. "en", "ar"). variation: Variation name to inject into test_campaign_meta (e.g. "A", "B"). campaign_content_override: Replaces the entire auto-built campaign_content section. Highest-precedence override — all channel-specific content params are ignored.

Rate limit: 5/min, 25/hr, 100/day.

Returns: {success: true, recipients_requested, total_success_count, total_failed_count, batches: [{platforms, locale, variation, success_count, failed_count, succeeded: [[...]], failed}], note?: str} on success. When recipients_requested > total_success_count + total_failed_count, a note explains that MoEngage silently skipped recipients without eligible devices for the targeted platform(s). {success: false, error, status_code, api_response} on API error. {success: false, error: ""} on input validation failure.

Inputs: channel (required), campaign_name (required), user_attributes (required), subject, +89 more. Returns: object

update_campaignA

Update an existing campaign using PATCH semantics — only provided fields are sent.

All flat params are optional. Only sub-objects where at least one param is set are included in the PATCH payload. Dict overrides replace auto-built sub-objects.

PATCH semantics: When providing a dict override like campaign_content, include ALL fields you want to keep — the API replaces the entire sub-object, not deep merge.

Status restrictions (validated locally before API call):

  • STOPPED / ARCHIVED: All updates rejected.

  • ACTIVE: trigger_condition, segmentation_details, conversion_goal_details, scheduling_details.delivery_type, scheduling_details.start_time blocked.

  • SCHEDULED: scheduling_details.delivery_type blocked.

--- REQUIRED --- campaign_id: Campaign to update. updated_by: Updater email address (must contain @). channel: EMAIL or PUSH.

--- STATUS CONTEXT --- campaign_status: Current status — drives restriction validation. campaign_delivery_type: e.g. EVENT_TRIGGERED — drives cache_warning.

--- EMAIL CONTENT (sends campaign_content when any email param set) --- subject: Email subject line. sender_name: Display name for sender. from_address: Sending email address. reply_to_address: Reply-to address. html_content: Raw HTML body (mutually exclusive with template_id). template_id: Saved template ID (mutually exclusive with html_content). preview_text: Email preheader text. cc_ids: CC email addresses list. bcc_ids: BCC email addresses list. custom_template_version: Template version number override. attachments: List of attachment dicts.

--- PUSH CONTENT (sends campaign_content when any push param set) --- platforms: Target platforms list — ANDROID, IOS, WEB (required for push content). push_title: Notification title (required for push content). push_message: Notification body (required for push content). android_notification_channel: Android channel ID (default: "default"). android_default_click_action: Click action type (default: "DEEPLINKING"). android_default_click_action_value: Deep link URL. android_image_url: Android notification image URL. android_input_gif_url: Android notification GIF URL. android_key_value_pairs: Custom key-value pairs. android_buttons: Android push action buttons list. android_advanced: Android advanced options dict. android_push_content_override: Replaces auto-built Android content block. android_summary: Android notification summary text. android_push_amp_plus_enabled: Enable Push Amplification Plus. android_template_type: BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT, TIMER, TIMER_WITH_PROGRESS_BAR, or Custom. android_custom_template_id: Custom template ID. android_custom_template_version: Custom template version. android_timer: Timer config dict. android_template_backup: Fallback template dict. android_carousel_content: Carousel content dict. android_background_color_code: Hex color for notification background. android_app_name_color_code: Hex color for app name text. android_notification_control_color: LIGHT or DARK. android_include_app_name_and_time: Show app name and time. android_include_title_and_message: Show title and message. android_apply_background_color_in_text_editor: Apply bg color in editor. android_image_scaling: FIT_INSIDE_IMAGE_CONTAINER or FILL_IMAGE_CONTAINER. android_banner_image_url: Banner image URL. android_collapsed_push_notification: Collapsed push style. ios_title: iOS title (falls back to push_title). ios_message: iOS message (falls back to push_message). ios_default_click_action: iOS click action type. ios_default_click_action_value: iOS click action URL. ios_subtitle: iOS notification subtitle. ios_allow_bg_refresh: Allow background refresh. ios_rich_media_type: IMAGE, VIDEO, AUDIO, or GIF. ios_rich_media_value: Rich media URL value. ios_image_url: iOS notification image URL. ios_input_gif_url: iOS notification GIF URL. ios_key_value_pairs: Custom key-value pairs for iOS. ios_background_color_code: Hex color for notification background. ios_apply_background_color_in_text_editor: Apply bg color in editor. ios_template_type: BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, or Custom. ios_custom_template_id: Custom template ID. ios_custom_template_version: Custom template version. ios_template_backup: Fallback template dict. ios_carousel_content: Carousel content dict. ios_send_to_all_eligible_device: Send to all eligible iOS devices. ios_exclude_provisional: Exclude provisional push devices. ios_send_to_only_provisional: Send only to provisional. ios_buttons: iOS push action buttons list. ios_advanced: iOS advanced options dict. ios_push_content_override: Replaces auto-built iOS content block. web_redirect_url: Web push redirect URL. web_image_url: Web push notification image URL. web_auto_dismiss_notification: Auto-dismiss web notification. web_buttons: Web push action buttons list. web_advanced: Web advanced options dict. web_icon_image_type: DEFAULT or ICON_URL. web_icon_url: Custom icon URL for web push. web_push_content_override: Replaces auto-built Web content block.

--- BASIC DETAILS (sends basic_details when any param set) --- campaign_name: New campaign name. content_type: PROMOTIONAL or TRANSACTIONAL (EMAIL only). subscription_category: Subscription category (EMAIL PROMOTIONAL only). tags: Campaign tags list (replaces existing tags). team: Team name. business_event: Business event name. send_to_triggered_platform_only: Send only to triggering platform (PUSH). broadcast_live_activity_id: Live Activity broadcast ID (PUSH iOS). geofences: Geofence config dict (PUSH LOCATION_TRIGGERED).

--- SCHEDULING (sends scheduling_details when any param set) --- scheduling_delivery_type: AT_FIXED_TIME, ASAP, SEND_IN_BTS, SEND_IN_USER_TIMEZONE. start_time: ISO 8601 start datetime. Blocked for ACTIVE campaigns. end_time: ISO 8601 expiry datetime. periodic_details: Periodic scheduling config dict. bts_details: Best-time-to-send config dict. user_timezone_details: User timezone config dict.

--- CONNECTOR --- connector_type: Email service provider. connector_name: Connector config name.

--- SEGMENTATION SHORTCUTS --- is_all_user_campaign: Target all users. custom_segment_id: Target a specific segment.

--- UTM --- utm_source, utm_medium, utm_campaign, utm_term, utm_content, utm_custom.

--- DICT OVERRIDES --- basic_details: Full basic_details dict. campaign_content: Full campaign_content dict. scheduling_details: Full scheduling_details dict. segmentation_details: Full segmentation_details dict. Blocked for ACTIVE. connector: Full connector dict. trigger_condition: Full trigger_condition dict. Blocked for ACTIVE. delivery_controls: Full delivery_controls dict. conversion_goal_details: Full conversion_goal_details dict. Blocked for ACTIVE. control_group_details: Full control_group_details dict. utm_params: Full UTM params dict. advanced: Full advanced dict (PUSH only). locales: Locale configuration for A/B testing. variation_details: Variation metadata for A/B testing.

Rate limit: 5/min, 25/hr, 100/day.

Returns: {success: true, campaign_id, dashboard_url} on success. (+ cache_warning if EVENT_TRIGGERED with content changes) {success: false, error, campaign_id} on status restriction. {success: false, error, status_code, api_response} on API error.

Inputs: campaign_id (required), updated_by (required), channel (required), campaign_status, +111 more. Returns: object

update_templateA

Validate, build, and update an existing email template in MoEngage.

Runs TemplateValidator before updating (unless force=True). Returns success status, external_template_id, and structured preview on success. HTML is never exposed to agent context.

Requires external_template_id from MoEngage (obtain via search_templates). Use force=True to bypass validation. Use debug=True to save HTML to temp file for inspection.

Inputs: title (required), components (required), external_template_id (required), template_name (required), +7 more. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 18 tools

    Disambiguation5/5

    Every tool targets a distinct operation: template analysis, building, localization, patching, publishing, updating; campaign creation, status changes, searching, metadata retrieval, statistics, child executions, testing; plus personalization previews and server info. No two tools have overlapping purposes.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern in snake_case (e.g., analyze_template, create_campaign, search_templates). The naming is predictable and uniform across the entire tool surface.

    Tool Count5/5

    With 18 tools covering templates, campaigns, testing, personalization, and metadata, the count is well-scoped for a marketing automation MCP server. Each tool serves a clear purpose without redundancy or unnecessary complexity.

    Completeness4/5

    Core CRUD and lifecycle operations are covered for both templates and campaigns. However, there is no delete/archive tool for campaigns or templates, which is a minor gap. The missing deletion operations could cause agent failures in cleanup scenarios.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Rule.io marketing automation platform. Enables managing subscribers, tags, campaigns, custom fields, and automations through the MCP interface.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      MCP server for Brevo email marketing platform enabling campaign management, analytics, and automation through natural language.
      15
      227 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      This MCP server provides a modern web interface and a set of tools for interacting with the Facebook Marketing API, enabling campaign management, ad set operations, and insights retrieval. It supports multiple connection modes including STDIO, SSE, and HTTP.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for managing cold email campaigns, leads, email accounts, sequences, analytics, webhooks, and client sub-accounts via the Smartlead API.
      15 npm
      8
      MIT