Get the FREE Ultimate OpenClaw Setup Guide →

salesforce-mce -api

HTTP API bridge for Salesforce Agentforce to Marketing Cloud Engagement

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio slysly-code-salesforce-mce-mcp-server-api node /absolute/path/to/salesforce-mce-mcp-server-api/src/mcp-server.js \
  --env MCE_CLIENT_ID="your-client-id" \
  --env MCE_SUBDOMAIN="your-subdomain" \
  --env MCE_CLIENT_SECRET="your-client-secret"

How to use

This MCP server exposes Salesforce Marketing Cloud Engagement (MCE) capabilities as structured, discoverable tools for large language models. It provides a pre-flight and validation system to ensure requests adhere to MCE’s requirements before execution, enabling reliable creation of complex assets like Content Builder emails and multi-step journeys. You can run the server in two modes: a local Claude Desktop STDIO integration and an HTTP server suitable for production deployments. Use the Claude Desktop configuration to connect the MCP server under the salesforce-mce key, or start the HTTP server to expose REST endpoints that the LLM can call to perform email creation, journey orchestration, and data extension management through MCE APIs.

How to install

Prerequisites:

  • Node.js 18 or higher
  • Git
  • npm

Step 1: Clone the repository

git clone https://github.com/slysly-code/salesforce-mce-mcp-server-api.git
cd salesforce-mce-mcp-server-api

Step 2: Install dependencies

npm install

Step 3: Configure environment (example for HTTP mode)

# Create an environment file or set vars in your environment
# Example .env (not required if you pass via process env):
# MCE_SUBDOMAIN=your-subdomain
# MCE_CLIENT_ID=your-client-id
# MCE_CLIENT_SECRET=your-client-secret
# PORT=8080
# MODE=http

Step 4: Run the server (HTTP mode)

# Start in HTTP mode
npm start
# Or explicitly start the HTTP server script
node src/http-server.js

Step 5: Verify installation

# Health check
curl http://localhost:8080/health

Optional: Degenerate Claude Desktop (STDIO) mode

node src/mcp-server.js

Additional notes

Environment variables MCE_SUBDOMAIN, MCE_CLIENT_ID, and MCE_CLIENT_SECRET are required for authentication with Salesforce Marketing Cloud Engagement. The server supports two operation modes: STDIO for Claude Desktop development and HTTP for production deployments. If deploying to Fly.io or other cloud environments, ensure PORT is configured and the HTTP mode is selected. The pre-flight and validation system should be used by LLM prompts before attempting MCE API calls to reduce failures. If you encounter authentication errors, double-check the API credentials and that the connected MCE package has the necessary permissions (Email, Automation/Journey, Contacts). For local development, ensure Node.js version is 18 or newer and dependencies are installed with npm install.

Related MCP Servers

Sponsor this space

Reach thousands of developers