Get the FREE Ultimate OpenClaw Setup Guide →

sfmc_mcp

A Node.js server implementing the Model Context Protocol (MCP) for Salesforce Marketing Cloud (SFMC). Provides modular tools for interacting with SFMC campaigns, assets, data extensions, etc. Enabling automation, integration, and advanced workflows via MCP-compatible clients.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio alandelacanal-sfmc_mcp node C:\wks\my\Projects\mcps\sfmc_mcp\build\server.js \
  --env MCP_WS_PORT="3000" \
  --env MCP_TRANSPORT="stdio" \
  --env SFMC_CLIENT_ID="your-client-id" \
  --env SFMC_AUTH_BASE_URI="https://yourdomain.auth.marketingcloudapis.com" \
  --env SFMC_CLIENT_SECRET="your-client-secret" \
  --env SFMC_REST_BASE_URI="https://yourdomain.rest.marketingcloudapis.com"

How to use

This MCP server for Salesforce Marketing Cloud (SFMC) exposes capabilities around Data Extensions and Assets. It currently supports querying data from Data Extensions, retrieving data from a specific Data Extension, and obtaining the fields of a Data Extension. In practice, you deploy the server, point an MCP client at the provided URL, and use the client’s interface to run the available operations against your SFMC instance. The server reads SFMC credentials from environment variables and uses the REST and Auth base URIs to authenticate and query SFMC resources. When running in server mode with a streamable transport, you can connect an Inspector tool to validate requests and monitor traffic.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Access to SFMC with a registered integration (Client ID and Client Secret)

Step-by-step installation:

  1. Clone or download the repository for sfmc_mcp.
  2. Install dependencies: npm install
  3. Build the MCP server: npm run build
  4. Prepare environment variables (example): SFMC_CLIENT_ID="your-client-id" SFMC_CLIENT_SECRET="your-client-secret" SFMC_AUTH_BASE_URI="https://yourdomain.auth.marketingcloudapis.com" SFMC_REST_BASE_URI="https://yourdomain.rest.marketingcloudapis.com" MCP_TRANSPORT="stdio" # or "stream" for remote development MCP_WS_PORT="3000"
  5. Run the server in client mode (example): node build/server.js
  6. Optional: add the SFMC server configuration to your MCP client: { "mcpServers": { "sfmc": { "command": "node", "args": [ "C:\wks\my\Projects\mcps\sfmc_mcp\build\server.js" ], "env": { "SFMC_CLIENT_ID": "your-client-id", "SFMC_CLIENT_SECRET": "your-client-secret", "SFMC_AUTH_BASE_URI": "https://yourdomain.auth.marketingcloudapis.com", "SFMC_REST_BASE_URI": "https://yourdomain.rest.marketingcloudapis.com" } } } }

Additional notes

Tips and common considerations:

  • Ensure your SFMC integration has the required permissions to access Data Extensions and their fields.
  • If you change SFMC base URIs, update SFMC_AUTH_BASE_URI and SFMC_REST_BASE_URI accordingly.
  • When running in server mode, MCP_TRANSPORT should be set to stdio for local development or stream for remote/ inspector usage.
  • The MCP WS port can be changed from the default 3000 to fit your network environment; ensure firewall rules allow this port.
  • For debugging, you can use the MCP Inspector by running the inspector tool and selecting the appropriate transport and URL, for example http://localhost:4042/mcp, as described in the readme.
  • If you encounter authentication errors, double-check the Client ID/Secret and the OAuth base URI in SFMC.

Related MCP Servers

Sponsor this space

Reach thousands of developers