joernberkefeld avatar

Mcp Server Sfmc

joernberkefeld/mcp-server-sfmc

If you write AMPscript, SSJS, or GTL for Salesforce Marketing Cloud, this gives your AI assistant validation, function lookup, and diff-aware PR review through MCP tools. It bundles the same language engine that powers the SFMC Language Service VS Code extension, so you get syntax checks, arity validation, and fix suggestions for all three languages plus HTML with embedded blocks. The review_change tool is built for CI: it only flags issues in added lines and maps diagnostics back to diff line numbers. You also get searchable excerpts from mirrored Salesforce Help covering Marketing Cloud Engagement setup and operations, with explicit scoping to avoid confusion with Marketing Cloud Next. Works with Cursor, Claude Desktop, Windsurf, and VS Code via stdio transport.

GitHub stars
5
tools
21
transport
STDIO
last updated
Oct 15, 2026

Tools

21 tools

Public tool metadata for what this MCP can expose to an agent.

validate_ampscriptValidate AMPscript code — unknown functions, arity, delimiter balance, comment syntax. `target: 'next'` flags MCN-incompatible functions.

Validate AMPscript code — unknown functions, arity, delimiter balance, comment syntax. `target: 'next'` flags MCN-incompatible functions.

No parameter schema in public metadata yet.

validate_ssjsValidate SSJS — ES6+ usage, missing Platform.Load, wrong API calls. `target: 'next'` flags all SSJS as unsupported.

Validate SSJS — ES6+ usage, missing Platform.Load, wrong API calls. `target: 'next'` flags all SSJS as unsupported.

No parameter schema in public metadata yet.

validate_sfmc_htmlValidate HTML with embedded AMPscript, SSJS, and GTL blocks. `target: 'next'` enables MCN validation.

Validate HTML with embedded AMPscript, SSJS, and GTL blocks. `target: 'next'` enables MCN validation.

No parameter schema in public metadata yet.

lookup_ampscript_functionFull signature, parameters, return type, MCN compatibility badge (API version), behavioral notes for MCN, and examples

Full signature, parameters, return type, MCN compatibility badge (API version), behavioral notes for MCN, and examples

No parameter schema in public metadata yet.

lookup_ssjs_functionFull signature and description for any SSJS Platform function or method

Full signature and description for any SSJS Platform function or method

No parameter schema in public metadata yet.

list_ampscript_functionsList all AMPscript functions, optionally filtered by `platform: 'next'` to return only MCN-supported functions

List all AMPscript functions, optionally filtered by `platform: 'next'` to return only MCN-supported functions

No parameter schema in public metadata yet.

review_changeReview a unified diff — validates only added lines, maps back to diff line numbers

Review a unified diff — validates only added lines, maps back to diff line numbers

No parameter schema in public metadata yet.

suggest_fixGenerate fix suggestions for each diagnostic in a code snippet. `target: 'next'` includes MCN fixes.

Generate fix suggestions for each diagnostic in a code snippet. `target: 'next'` includes MCN fixes.

No parameter schema in public metadata yet.

get_ampscript_completionsList valid completions at a given cursor position; MCN-unsupported functions marked `[MCE only]` when `target: 'next'`

List valid completions at a given cursor position; MCN-unsupported functions marked `[MCE only]` when `target: 'next'`

No parameter schema in public metadata yet.

get_ssjs_completionsList SSJS Platform API completions, optionally filtered by prefix; redirects to AMPscript completions when `target: 'next'`

List SSJS Platform API completions, optionally filtered by prefix; redirects to AMPscript completions when `target: 'next'`

No parameter schema in public metadata yet.

format_sfmc_codeApply basic formatting conventions (keyword casing, quote normalisation)

Apply basic formatting conventions (keyword casing, quote normalisation)

No parameter schema in public metadata yet.

detect_sfmc_platformDetect the target platform for a project — checks `.mcdevrc.json` (→ `"engagement"`) or `sfdx-project.json` (→ `"next"`)

Detect the target platform for a project — checks `.mcdevrc.json` (→ `"engagement"`) or `sfdx-project.json` (→ `"next"`)

No parameter schema in public metadata yet.

check_mcn_compatibilityAnalyze one or more AMPscript/HTML files for MCN readiness. Returns per-function classification, SSJS block migration difficulty, and an executive summary with overall migration effort. Run this before `rewrite_for_mcn`.

Analyze one or more AMPscript/HTML files for MCN readiness. Returns per-function classification, SSJS block migration difficulty, and an executive summary with overall migration effort. Run this before `rewrite_for_mcn`.

No parameter schema in public metadata yet.

rewrite_for_mcnDeterministic MCN rewrite engine: fixes `.NET → Java` format strings, removes `StringToDate` wrappers, converts convertible SSJS to AMPscript, marks unsupported functions, annotates the rest as `MANUAL_REWRITE_REQUIRED`. **Prefer the `rewrite_for_mcn` prompt** for interactive...

Deterministic MCN rewrite engine: fixes `.NET → Java` format strings, removes `StringToDate` wrappers, converts convertible SSJS to AMPscript, marks unsupported functions, annotates the rest as `MANUAL_REWRITE_REQUIRED`. **Prefer the `rewrite_for_mcn` prompt** for interactive...

No parameter schema in public metadata yet.

convertSsjsToAmpscriptRule-based SSJS → AMPscript conversion engine: `Platform.Function.*` → AMPscript equivalents, variable/request access, control flow. Flags JS-native constructs as `MANUAL_REWRITE_REQUIRED`. **Prefer the `convertSsjsToAmpscript` prompt** for interactive use.

Rule-based SSJS → AMPscript conversion engine: `Platform.Function.*` → AMPscript equivalents, variable/request access, control flow. Flags JS-native constructs as `MANUAL_REWRITE_REQUIRED`. **Prefer the `convertSsjsToAmpscript` prompt** for interactive use.

No parameter schema in public metadata yet.

convertAmpscriptToSsjsRule-based AMPscript → SSJS conversion engine: variables, control flow, function calls. Flags AMPscript-only constructs as `MANUAL_REWRITE_REQUIRED`. **Prefer the `convertAmpscriptToSsjs` prompt** for interactive use.

Rule-based AMPscript → SSJS conversion engine: variables, control flow, function calls. Flags AMPscript-only constructs as `MANUAL_REWRITE_REQUIRED`. **Prefer the `convertAmpscriptToSsjs` prompt** for interactive use.

No parameter schema in public metadata yet.

validate_handlebarsValidate MCN Handlebars template code — helper names, arity, block balance, and unsupported constructs (partials, decorators, built-in helpers absent from the locked-down MCN engine).

Validate MCN Handlebars template code — helper names, arity, block balance, and unsupported constructs (partials, decorators, built-in helpers absent from the locked-down MCN engine).

No parameter schema in public metadata yet.

lookup_handlebars_helperSignature, parameters, description, origin, and MCN API version for a single MCN Handlebars helper (case-insensitive).

Signature, parameters, description, origin, and MCN API version for a single MCN Handlebars helper (case-insensitive).

No parameter schema in public metadata yet.

list_handlebars_helpersList all MCN Handlebars helpers, optionally filtered by `category` and/or `origin` (`handlebars-builtin`, `mcn-helper`, `mcn-platform`).

List all MCN Handlebars helpers, optionally filtered by `category` and/or `origin` (`handlebars-builtin`, `mcn-helper`, `mcn-platform`).

No parameter schema in public metadata yet.

get_handlebars_completionsList MCN Handlebars helper completions, optionally filtered by prefix.

List MCN Handlebars helper completions, optionally filtered by prefix.

No parameter schema in public metadata yet.

convertAmpscriptToHandlebarsRule-based AMPscript → MCN Handlebars conversion. Maps functions to helpers where an equivalent exists; flags unsupported functions and runtime gaps as `MANUAL_REWRITE_REQUIRED`. **Prefer the `convertAmpscriptToHandlebars` prompt** for interactive use.

Rule-based AMPscript → MCN Handlebars conversion. Maps functions to helpers where an equivalent exists; flags unsupported functions and runtime gaps as `MANUAL_REWRITE_REQUIRED`. **Prefer the `convertAmpscriptToHandlebars` prompt** for interactive use.

No parameter schema in public metadata yet.

Sponsors

Readme

mcp-server-sfmc

MCP server providing Salesforce Marketing Cloud language intelligence — AMPscript, SSJS, GTL, and Marketing Cloud Next (MCN) Handlebars — as Model Context Protocol tools, resources, and prompts for AI-assisted development and code review. Ships two searchable doc indexes: MCE help (Salesforce Help for Marketing Cloud Engagement administration and setup) and MCN developer docs (Marketing Cloud Next REST API and developer reference). Includes full Marketing Cloud Next (MCN) platform awareness: auto-detects whether a project targets MCE or MCN, restricts completions and validation to MCN-supported functions, flags SSJS as unsupported in MCN, surfaces MCN behavioral differences in hover and diagnostics, validates MCN Handlebars templates, and provides a migration toolkit to analyze and rewrite code for MCN — including AMPscript ↔ Handlebars and SSJS → Handlebars conversion.

Built on sfmc-language-lsp, the same engine that powers the SFMC Language Service VS Code extension.

Shared-diagnostic migration


View the full README on GitHub

Details

Repository
github.com/joernberkefeld/mcp-server-sfmc
Package
mcp-server-sfmc
Transport
STDIO
Registry
MCP registry, active

More from joernberkefeld