# mcp-server-sfmc

Gives an AI assistant working knowledge of AMPscript, SSJS, GTL and Handlebars in Salesforce Marketing Cloud, plus code validation and a path to Marketing Cloud Next.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: JoernBerkefeld
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/JoernBerkefeld/mcp-server-sfmc
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-server-sfmc

## What it does

The server exposes Salesforce Marketing Cloud language intelligence as Model Context Protocol tools, resources and prompts. It runs on `sfmc-language-lsp`, the engine behind the SFMC Language Service VS Code extension. Your assistant can then check code: syntax errors, unknown functions, wrong argument counts, SSJS syntax that is not supported.

Two searchable doc indexes ship with it — Salesforce Help for Marketing Cloud Engagement administration, and the Marketing Cloud Next developer reference covering the REST API. The server figures out whether a project targets MCE or MCN on its own. On MCN, completions and validation stick to functions that platform supports, SSJS is flagged as unsupported, and behavioural differences show up in hover text and diagnostics. A migration toolkit analyses code and rewrites AMPscript into Handlebars and SSJS into Handlebars.

It runs locally over stdio and needs Node.js and npm, since `npx` comes from npm. The first run may pull the package from npm. In VS Code, version 1.101+ of the SFMC Language Service extension registers the server for you, so `.vscode/mcp.json` stays untouched. For CI there is a bundled CLI, `sfmc-review-diff`: it spawns the server, calls `review_change` on a unified diff and exits non-zero on `ERROR` by default. Ready-made pipeline files sit in `ci-templates/` for GitHub Actions, GitLab CI, Jenkins, Azure Pipelines and Bitbucket Pipelines.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-server-sfmc -- npx -y mcp-server-sfmc
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp-server-sfmc -- npx -y mcp-server-sfmc
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-server-sfmc": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-server-sfmc"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-server-sfmc": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mcp-server-sfmc"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-server-sfmc npx -y mcp-server-sfmc
```

## When to use it
- catch syntax errors and unknown functions in AMPscript
- convert AMPscript or SSJS to Handlebars for Marketing Cloud Next
- pull up the right MCE help page or MCN doc from the assistant
- spot MCN-incompatible functions before deploy
- fail a CI job when a diff review reports an error

## Example prompts
- Check this AMPscript for errors and tell me what Marketing Cloud Next does not support
- Rewrite the SSJS in `process.js` as Handlebars for MCN
- Find the MCE help page on sending through the API

## Similar
- [dx-code-analyzer-configure](https://affpapa.org/en/nevibecode/skills/dx-code-analyzer-configure.md) — skill · 5800 installs
- [babysit](https://affpapa.org/en/nevibecode/skills/babysit.md) — skill · 4900 installs
- [om-auto-fix-pr](https://affpapa.org/en/nevibecode/skills/om-auto-fix-pr.md) — skill · 3400 installs
- [om-pr-autopilot](https://affpapa.org/en/nevibecode/skills/om-pr-autopilot.md) — skill · 2500 installs
- [ghost](https://affpapa.org/en/nevibecode/skills/ghost.md) — skill · 828 installs
- [task-to-pr](https://affpapa.org/en/nevibecode/skills/task-to-pr.md) — skill · 413 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
