# io.github.JoernBerkefeld/mcp-server-sfmc (npm · mcp-server-sfmc)

SFMC AMPscript/SSJS/GTL tools + searchable help for 7 MC products (Engagement, Pardot…) via MCP.

- Trust score: 77/100 (medium)
- Change this week: +47
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `mcp-server-sfmc`: 77/100 (this document), [markdown](https://verifymcp.io/servers/joernberkefeld-mcp-server-sfmc/mcp-server-sfmc.md), [page](https://verifymcp.io/servers/joernberkefeld-mcp-server-sfmc/mcp-server-sfmc)

## Channel facts

- Registry: `npm`
- Package: `mcp-server-sfmc`
- Version: `2.4.5`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 88/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (100 of 104), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (100 of 104), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to JoernBerkefeld/mcp-server-sfmc).
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 3 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 65/100
  - 55% of prompts and resources have a non-trivial description (not blank, and not just the item's name).
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 5072 tokens (~137/item across 37 items; 28 tools + 9 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 23/100
  - Stability observed for 7 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add joernberkefeld-mcp-server-sfmc -- npx -y mcp-server-sfmc
```

### Codex

```bash
codex mcp add joernberkefeld-mcp-server-sfmc -- npx -y mcp-server-sfmc
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "joernberkefeld-mcp-server-sfmc": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "mcp-server-sfmc"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add joernberkefeld-mcp-server-sfmc --command npx --arg -y --arg mcp-server-sfmc
```

### Hermes

```yaml
mcp_servers:
  joernberkefeld-mcp-server-sfmc:
    command: "npx"
    args: ["-y", "mcp-server-sfmc"]
```

### Other

```json
{
  "mcpServers": {
    "joernberkefeld-mcp-server-sfmc": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-sfmc"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-02 (score 77, +54)

- [security regression] Provenance: pass → unverified
- [security regression] Install scripts: pass → unverified
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Malware scan: unverified → pass
- [security] The attested source repository moved: JoernBerkefeld/mcp-server-sfmc
- [functional regression] License: pass → unverified
- [functional regression] Maintenance: pass → unverified
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Tool coverage: unverified → 100
- [functional improvement] Schema quality: unverified → 55
- [functional improvement] Stability: unverified → 0.20
- [functional improvement] MCP protocol: unverified → pass
- [functional] Licence: MIT

### 2026-08-01 (score 23, −40)

- [security regression] Stability: 0.13 → unverified
- [security regression] Known CVEs: partial → unverified
- [functional regression] Dependency health: partial → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional regression] Schema quality: 55 → unverified
- [functional regression] Capabilities: pass → unverified

### 2026-07-31 (score 63, +26)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 37, +7)

- [functional regression] Schema quality: 55 → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional improvement] Schema quality: unverified → excellent
- [functional] Package version: 2.4.4 → 2.4.5

### 2026-07-27 (score 30)

First indexed and scored.

## MCP tools (28)

### `validate_ampscript` (~119 tokens)

Validate AMPscript code for syntax errors, unknown functions, arity mismatches, and style issues. Returns a list of diagnostics with line numbers and severity. Set target to 'next' to also report functions not supported in Marketing Cloud Next.

Input parameters:

- `code` (string, required): The AMPscript code to validate. May include HTML context.
- `maxProblems` (integer): Maximum number of problems to return (default 100).
- `target` (string): Target platform. Use 'next' to flag AMPscript functions not supported in Marketing Cloud Next.

### `validate_ssjs` (~133 tokens)

Validate SSJS (Server-Side JavaScript) code for unsupported ES6+ syntax, missing Platform.Load, and incorrect usage patterns. Returns diagnostics with line numbers. Set target to 'next' to flag all SSJS as unsupported (SSJS is not available in Marketing Cloud Next).

Input parameters:

- `code` (string, required): The SSJS code to validate. May include <script runat="server"> tags.
- `maxProblems` (integer): Maximum number of problems to return (default 100).
- `target` (string): Target platform. Use 'next' to flag SSJS code as unsupported in Marketing Cloud Next.

### `validate_sfmc_html` (~139 tokens)

Validate an HTML file that contains embedded AMPscript and/or SSJS blocks. Checks both languages and GTL template syntax. Set target to 'next' to flag MCN-unsupported AMPscript functions and all SSJS as errors.

Input parameters:

- `code` (string, required): HTML source that may contain %%[ ]%%, %%= =%%,  <script runat="server">, or {{ }} blocks.
- `maxProblems` (integer): Maximum number of problems to return (default 100).
- `target` (string): Target platform. Use 'next' to flag MCN-incompatible code (unsupported AMPscript functions and all SSJS).

### `lookup_ampscript_function` (~69 tokens)

Look up the signature, parameters, description, and examples for an AMPscript function by name. Case-insensitive. Returns null if the function is not found.

Input parameters:

- `name` (string, required): The AMPscript function name, e.g. "Lookup", "DateAdd", "IIf".

### `list_ampscript_functions` (~104 tokens)

List all AMPscript functions, optionally filtered by category and/or target platform. Use platform: 'next' to return only functions supported in Marketing Cloud Next.

Input parameters:

- `category` (string): Filter by function category (case-insensitive substring match), e.g. "data extension", "string", "date".
- `platform` (string): Filter by target platform. Use 'next' to show only functions available in Marketing Cloud Next (API v67.0+).

### `validate_handlebars` (~118 tokens)

Validate Marketing Cloud Next (MCN) Handlebars template code. Checks helper names, arity, block balance, and flags unsupported constructs (partials, decorators, and built-in helpers absent from the locked-down MCN engine). MCN Handlebars lives inside the combined sfmc language and is always validated for the 'next' target.

Input parameters:

- `code` (string, required): The MCN Handlebars template code to validate. May include HTML context.
- `maxProblems` (integer): Maximum number of problems to return (default 100).

### `lookup_handlebars_helper` (~72 tokens)

Look up the signature, parameters, description, and origin for a Marketing Cloud Next Handlebars helper by name. Case-insensitive. Returns null if the helper is not found.

Input parameters:

- `name` (string, required): The Handlebars helper name, e.g. "uppercase", "if", "formatDate".

### `list_handlebars_helpers` (~81 tokens)

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

Input parameters:

- `category` (string): Filter by helper category (case-insensitive substring match), e.g. "string", "date", "comparison".
- `origin` (string): Filter by helper origin.

### `lookup_ssjs_function` (~282 tokens)

Authoritative lookup (sourced ONLY from the LSP + ssjs-data) for anything you want to use in SSJS. Call this BEFORE writing any SSJS identifier — do not rely on general JavaScript knowledge. Covers (a) SFMC APIs — Platform functions, WSProxy methods, HTTP methods, global functions (with signature, parameters, description, deprecation, Platform.Load requirement, static/alias metadata), and (b) plain-JavaScript ECMAScript built-ins (Array/String/Math/JSON/Object/Date/RegExp/global), returning one of: supported, supported-with-caveat (caveat + any polyfill), polyfillable (with ES3-safe polyfill source to emit), unsupported (no polyfill), or unknown. Case-insensitive. Examples: "Lookup", "Platform.Function.Lookup", "Array.prototype.slice", "JSON.parse", "Math.max".

Input parameters:

- `name` (string, required): The function/method/property name. May include a namespace or owner, e.g. "Platform.Function.Lookup", "Array.prototype.slice", "JSON.parse", "Math.max", or a bare name like "Lookup" or "slice".
- `owner` (string): Optional owner to disambiguate a bare ECMAScript built-in name, e.g. "Array.prototype", "String.prototype", "Math", "JSON".

### `review_change` (~110 tokens)

Review a code diff for SFMC (AMPscript, SSJS, or HTML) quality issues. Extracts added/changed lines from the diff and validates them. Returns structured feedback with line-level diagnostics and style suggestions.

Input parameters:

- `diff` (string, required): A unified diff (git diff format) containing the changed code.
- `language` (string): Language of the changed file. Defaults to "auto" for automatic detection.
- `maxProblems` (integer): Maximum number of problems to report (default 50).

### `suggest_fix` (~122 tokens)

Generate a corrected version of SFMC code based on validation diagnostics. Returns the original code with inline fix suggestions or a corrected replacement. Set target to 'next' to include MCN platform compatibility in the analysis.

Input parameters:

- `code` (string, required): The SFMC code snippet to fix.
- `issueDescription` (string): Optional human description of the specific issue to fix.
- `language` (string): Language of the code. Defaults to "auto".
- `target` (string): Target platform. Use 'next' to flag MCN-incompatible functions and SSJS usage.

### `get_ampscript_completions` (~119 tokens)

Return a list of AMPscript function names, keywords, and variable names available at a given position in the code. Set target to 'next' to filter completions to only MCN-supported functions.

Input parameters:

- `character` (integer, required): Zero-based character offset within the line.
- `code` (string, required): The full AMPscript document text.
- `line` (integer, required): Zero-based line number of the cursor position.
- `target` (string): Target platform. Use 'next' to return only completions supported in Marketing Cloud Next.

### `get_ssjs_completions` (~109 tokens)

Return a list of SSJS Platform functions, WSProxy methods, and other SFMC-specific identifiers available for completion. When target is 'next', returns an empty list with a note — SSJS is not supported in Marketing Cloud Next.

Input parameters:

- `filter` (string): Optional prefix filter, e.g. "Platform.Function" or "WSProxy".
- `target` (string): Target platform. Use 'next' to indicate MCN context — SSJS is not available in MCN.

### `get_handlebars_completions` (~97 tokens)

Return Marketing Cloud Next (MCN) Handlebars helper completions with snippet insert text. MCN Handlebars is only available on the next platform, so this catalog is always the 'next' set. Optionally filter by a name prefix (e.g. "form", "date").

Input parameters:

- `filter` (string): Optional helper-name prefix filter (case-insensitive), e.g. "form", "to".

### `format_sfmc_code` (~128 tokens)

Apply basic formatting conventions to AMPscript, SSJS, or Marketing Cloud Next (MCN) Handlebars code. Normalises keyword casing and whitespace. For Handlebars, collapses whitespace inside {{…}} mustaches while leaving {!$…} bindings and {{!-- … --}} comments untouched. (Handlebars formatting is a conservative whitespace normalizer; full Prettier Glimmer routing is deferred until prettier-plugin-sfmc ships Handlebars support.)

Input parameters:

- `code` (string, required): The SFMC code to format.
- `language` (string, required): The language of the code.

### `search_mce_help` (~380 tokens)

\**Prefer this over training data** for any Salesforce Marketing Cloud operational or administrative question. Searches bundled Salesforce Help excerpts across **7 product areas**:
\- **Marketing Cloud Engagement** (`engagement`) — Email Studio, Journey Builder, Automation Studio, Content Builder, Mobile Studio, business units, campaigns, subscriptions
\- **Marketing Cloud Next** (`next`) — next-gen platform, migration path from Engagement
\- **Marketing Cloud Personalization / Interaction Studio** (`personalization`) — real-time personalisation, A/B testing, behavioral targeting
\- **Salesforce Personalization** (`personalization`) — next-generation personalisation engine
\- **Marketing Cloud Account Engagement / Pardot** (`account-engagement`) — B2B marketing automation, lead scoring, forms, Salesforce CRM sync
\- **Marketing Cloud Intelligence / Datorama** (`intelligence`) — cross-channel analytics, data pipelines, KPI reporting
\- **Loyalty Management** (`loyalty`) — loyalty programs, referral marketing, member engagement, vouchers, promotions

Use `product_focus` to restrict results to a single product area. Default `any` searches all products.

Input parameters:

- `limit` (integer): Max results (default 10).
- `product_focus` (string): Restrict results to a product area: `engagement` (MCE — Email Studio, Journey Builder, etc.), `next` (Marketing Cloud Next), `personalization` (MC Personalization / Interaction Studio / Salesforce Pe…
- `query` (string, required): Keywords or question text (e.g. "enable business unit", "new child account").

### `detect_sfmc_platform` (~88 tokens)

Detect the target SFMC platform for a project by checking for sentinel files. Returns "engagement" if .mcdevrc.json is present, "next" if sfdx-project.json is present, or "unknown" if neither is found. Call this before writing, validating, or converting code.

Input parameters:

- `projectRoot` (string, required): Absolute path to the project root directory to inspect.

### `search_mcn_help` (~117 tokens)

Search bundled Marketing Cloud Next developer API documentation. Covers MCN objects, flows, segments, transactional messages, AMPscript behavior in MCN, and REST/SOAP API references. Use this for MCN developer questions; use search_mce_help for MCN migration or operational/admin questions.

Input parameters:

- `limit` (integer): Maximum number of result chunks to return (default 5).
- `query` (string, required): The search query, e.g. "AMPscript FormatDate MCN", "transactional message API", "segment objects".

### `search_help` (~273 tokens)

Unified help search that automatically detects the target platform (MCE or MCN) from the project root and routes the query to the right bundled doc index. For MCN projects it searches both the Marketing Cloud Next developer API reference (`search_mcn_help`) and the MCN operational/admin help (`search_mce_help` with product_focus:"next") and merges the results. For MCE projects it searches the full MCE help index (`search_mce_help` with product_focus:"any"). Pass `projectRoot` to enable auto-detection, or set `target` explicitly to skip detection.

Input parameters:

- `limit` (integer): Maximum total results to return across all searched indexes (default 8).
- `projectRoot` (string): Absolute path to the project root directory. Used to auto-detect the platform by checking for `.mcdevrc.json` (MCE) or `sfdx-project.json` (MCN). Omit if you already know the target platform.
- `query` (string, required): Keywords or question text to search for.
- `target` (string): Override the detected platform. `engagement` → MCE help only; `next` → MCN developer docs + MCN operational help. When both `projectRoot` and `target` are given, `target` takes precedence.

### `check_mcn_compatibility` (~93 tokens)

Analyze one or more AMPscript/HTML files for Marketing Cloud Next (MCN) readiness. Returns an executive summary and a per-file, per-function report with migration difficulty. SSJS blocks that only use Platform.Function.* calls are classified as "Needs conversion" (not "Not migratable"). Use this tool before using rewrite_for_mcn.

Input parameters:

- `files` (array, required): List of files to analyze.

### `rewrite_for_mcn` (~146 tokens)

Deterministically rewrite AMPscript (and optionally SSJS) code for Marketing Cloud Next compatibility. Handles: FormatDate(StringToDate(x)) simplification, .NET→Java format strings, MCE-only function annotations, SSJS→AMPscript rule-based conversion. Flags complex constructs as MANUAL_REWRITE_REQUIRED. Use the rewrite_for_mcn PROMPT (not this tool) for AI-enhanced handling of MANUAL_REWRITE_REQUIRED sections.

Input parameters:

- `code` (string, required): The AMPscript or HTML code to rewrite for MCN.
- `context` (string): Content context. Use 'cloudpage' to immediately flag as not migratable. Default 'auto' detects context.

### `convertSsjsToAmpscript` (~146 tokens)

Deterministically convert SSJS (Server-Side JavaScript) code to AMPscript using rule-based transformations. Handles: Platform.Function.* → AMPscript equivalents, Platform.Variable.GetValue/SetValue → @variable, Platform.Response.Write → OutputLine, var declarations → SET, if/else → IF/ELSE/ENDIF. Flags JS-native constructs (try/catch, array methods, JSON, regex) as MANUAL_REWRITE_REQUIRED. Use the convertSsjsToAmpscript PROMPT for AI-enhanced handling of flagged sections.

Input parameters:

- `code` (string, required): The SSJS code to convert (may include <script runat="server"> tags).

### `convertAmpscriptToSsjs` (~133 tokens)

Deterministically convert AMPscript code to equivalent SSJS using rule-based transformations. Handles: SET @x → var x, IF/ELSEIF/ELSE/ENDIF → JS conditionals, FOR/NEXT → for loops, Output/OutputLine → Platform.Response.Write, AMPscript functions → Platform.Function equivalents. Flags AMPscript-only constructs (email-specific functions, personalization strings) as MANUAL_REWRITE_REQUIRED. Use the convertAmpscriptToSsjs PROMPT for AI-enhanced handling of flagged sections.

Input parameters:

- `code` (string, required): The AMPscript code to convert to SSJS.

### `convertAmpscriptToHandlebars` (~180 tokens)

Deterministically convert AMPscript to Marketing Cloud Next (MCN) Handlebars using the three-category model built from ampscript-data: (A) functions with a Handlebars helper equivalent become {{helper …}}; (B) functions with no MCN counterpart become a MANUAL_REWRITE_REQUIRED comment; (C) mcnHandlebarsGap functions (e.g. ContentBlockByKey) become a DISTINCT MANUAL_REWRITE_REQUIRED comment noting they are documented as MCN-supported but currently fail at runtime. Procedural AMPscript blocks (SET/VAR/IF/FOR) have no Handlebars equivalent and are flagged. Use the convertAmpscriptToHandlebars PROMPT for AI-enhanced handling of flagged sections.

Input parameters:

- `code` (string, required): The AMPscript code to convert to MCN Handlebars.

### `convertHandlebarsToAmpscript` (~142 tokens)

Deterministically convert Marketing Cloud Next (MCN) Handlebars to AMPscript (best-effort, lossy). Inline helper calls that map back to an AMPscript function become %%=Fn(…)=%%; bare variables {{name}} become %%=v(@name)=%%. Block helpers ({{#each}}/{{#if}}), partials, dotted binding paths, and helpers with no AMPscript equivalent are flagged MANUAL_REWRITE_REQUIRED. Use the convertHandlebarsToAmpscript PROMPT for AI-enhanced handling.

Input parameters:

- `code` (string, required): The MCN Handlebars code to convert to AMPscript.

### `convertSsjsToHandlebars` (~133 tokens)

Deterministically convert SSJS to Marketing Cloud Next (MCN) Handlebars transitively (SSJS → AMPscript → Handlebars). Because Handlebars is declarative, most imperative SSJS has no Handlebars counterpart and is conservatively flagged MANUAL_REWRITE_REQUIRED; inline Platform.Function.* calls that map through AMPscript to a Handlebars helper are converted. Use the convertSsjsToHandlebars PROMPT for AI-enhanced handling of flagged sections.

Input parameters:

- `code` (string, required): The SSJS code to convert (may include <script runat="server"> tags).

### `write_handlebars` (~145 tokens)

Validate a Marketing Cloud Next (MCN) Handlebars-in-HTML draft so it can be finalized as authored content. Runs the MCN Handlebars validator (locked-down engine) on the draft and returns whether it is clean, plus any diagnostics (unknown/too-new helpers, unsupported constructs, arity). Use the write_handlebars PROMPT to AUTHOR from intent — that prompt instructs the model to use only catalog helpers and then call this tool to verify.

Input parameters:

- `draft` (string, required): The Handlebars-in-HTML draft to validate before finalizing.
- `intent` (string): Optional human description of what the content should do (echoed for context).

### `get_server_version` (~50 tokens)

Return the running mcp-server-sfmc version and the size of the bundled Salesforce Marketing Cloud help datasets (MCE and MCN). Use this to confirm which server build and documentation bundle are loaded.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/joernberkefeld-mcp-server-sfmc/mcp-server-sfmc#diagnostics

## Score history

- 2026-08-03: 77
- 2026-08-02: 77
- 2026-08-01: 23
- 2026-07-31: 63
- 2026-07-30: 37
- 2026-07-28: 30
- 2026-07-27: 30

## Links

- npm package: https://www.npmjs.com/package/mcp-server-sfmc
- Socket report: https://socket.dev/npm/package/mcp-server-sfmc
- Repository: https://github.com/JoernBerkefeld/mcp-server-sfmc
- Changelog RSS feed: https://verifymcp.io/servers/joernberkefeld-mcp-server-sfmc/mcp-server-sfmc/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/joernberkefeld-mcp-server-sfmc/mcp-server-sfmc/changelog.json
- HTML version of this page: https://verifymcp.io/servers/joernberkefeld-mcp-server-sfmc/mcp-server-sfmc
