# MCP Server Sfmc

> MCP Server Sfmc is an open-source MCP server for marketing and seo. Salesforce Marketing Cloud AMPscript, SSJS and Handlebars checks for AI coding assistants. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, vscode, self-hosted
- **Repository:** https://github.com/joernberkefeld/mcp-server-sfmc
- **MCP Registry name:** io.github.JoernBerkefeld/mcp-server-sfmc
- **Categories:** [marketing and SEO](https://ai-powered.com/categories/marketing-and-seo), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

This server gives an assistant working knowledge of Salesforce Marketing Cloud scripting. It validates AMPscript, server-side JavaScript and Guide Template Language, looks up function signatures and examples, reviews diffs, and suggests concrete fixes. It also ships two searchable documentation indexes: Marketing Cloud Engagement help and Marketing Cloud Next developer docs.

It detects whether a project targets Engagement or Marketing Cloud Next, then restricts completions and checks to what that platform supports. For Next it flags SSJS as unsupported, validates Handlebars templates and offers a migration toolkit that analyses code and rewrites between AMPscript, SSJS and Handlebars.

It runs locally over stdio through npx or a global npm install, and is built on the author's sfmc-language-lsp engine. A bundled sfmc-review-diff command lets CI jobs check pull-request diffs, with templates for several CI systems.

## Features

- **Code validation:** Catches syntax errors, unknown functions and arity mismatches in AMPscript and SSJS.
- **Function lookup:** Returns signatures, return types, compatibility notes and examples.
- **Diff-aware review:** Reports issues on the exact lines changed in a pull request.
- **Fix suggestions:** Offers replacement code for problems found.
- **Next migration toolkit:** Converts and analyses code for Marketing Cloud Next.
- **Searchable help indexes:** Searches Engagement help and Next developer documentation.
- **CI command:** sfmc-review-diff checks unified diffs and exits non-zero on errors.

## Good for

- Review an AMPscript change before merging
- Move Marketing Cloud Engagement code to Marketing Cloud Next
- Look up an AMPscript function while writing an email
- Add automated SFMC checks to a CI pipeline
- Validate Handlebars templates

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-server-sfmc -- npx -y mcp-server-sfmc
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-server-sfmc": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-sfmc"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `validate_handlebars`: Checks Marketing Cloud Next Handlebars helper names, arity, block balance and unsupported constructs.
- `review_change`: Reviews a unified diff and reports issues on changed lines.

## FAQ

### How do I run it?

With npx -y mcp-server-sfmc@latest, or install it globally with npm; Node.js is required.

### Do I need the VS Code extension?

No. The extension is optional and the MCP server works in any MCP client.

### Which language features does it cover?

AMPscript, SSJS, GTL and Marketing Cloud Next Handlebars.

### Can it run in CI?

Yes, through the bundled sfmc-review-diff command, which calls the review_change tool.

### Is MCP Server Sfmc free?

Yes. MCP Server Sfmc is open source, so you can use and self-host it for free.

### How do I add MCP Server Sfmc to Claude Code?

Run this command in your terminal: claude mcp add mcp-server-sfmc -- npx -y mcp-server-sfmc

### What are the best alternatives to MCP Server Sfmc?

The closest alternatives to MCP Server Sfmc are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/mcp-server-sfmc
