MCP server · Marketing Cloud

mcp-sfmc: 126 Marketing Cloud tools for AI assistants

Released March 2026 to now

MCP TypeScript SFMC REST SFMC SOAP
Type
MCP server over stdio, plus setup CLI
Stack
TypeScript, MCP SDK, axios, zod
Version
1.3.x on npm
Licence
MIT

The problem

AI assistants are good at reasoning about a Marketing Cloud account, but only if they can read it. mcp-sfmc gives any MCP client a typed, documented way to call the SFMC REST and SOAP APIs: data extensions, automations, journeys, assets, contacts, transactional messaging and more.

What it does

  • 126 tools across REST (assets, contacts, journeys, transactional messaging, push, SMS, event notifications, audit) and SOAP (data extensions, automations, subscribers, users, accounts).
  • Several business units, picked by name in the chat.
  • A setup CLI in the same binary: init, add, list, test and remove. It verifies credentials and detects the MID.
  • Config hot reload: add an account and the running server picks it up without a restart.

How it is built

The server runs locally over stdio and authenticates with an installed package's client credentials. Credentials are typed into the CLI without echo and written atomically to a config file with owner-only permissions. They are never passed as an MCP tool argument, because a tool argument ends up in model context. The installed package's scopes are the real permission boundary, and the README says so plainly.

Releases publish to npm with provenance through trusted publishing, and a guard rejects any tarball that contains files outside the build output. The README also includes a fair comparison with Salesforce's own hosted Marketing Cloud Engagement MCP server, including when theirs is the better choice.

What I learned

  • Two processes, two config files. A business unit added with the CLI did not show up in the server, because the MCP client injected a config path that a plain shell did not have. The server now reports its config source and warns about other files that hold accounts.
  • A one-in-eight flake is a real bug. The secret prompt wrote its text before attaching the stdin listener, and a pseudo-terminal test caught the race roughly once in eight runs.