Salesforce Marketing Cloud MCP Server
Create a powerful Model Context Protocol (MCP) server for Salesforce Marketing Cloud in minutes with our AI Gateway. This guide walks you through setting up seamless marketing automation integration with enterprise-grade security and instant OAuth authentication.
About Salesforce Marketing Cloud API
Salesforce Marketing Cloud (formerly ExactTarget) is the world's leading marketing automation platform, enabling personalized customer journeys across email, mobile, social, web, and advertising. The Marketing Cloud API provides comprehensive access to:
- Email Studio: Email campaign creation, sending, and tracking
- Journey Builder: Multi-channel customer journey orchestration
- Mobile Studio: SMS, push notifications, and in-app messaging
- Advertising Studio: Display, search, and social advertising
- Social Studio: Social media management and listening
- Data Extensions: Customer data management and segmentation
- Automation Studio: Workflow automation and scheduling
- Analytics Builder: Reports, dashboards, and insights
Key Features
- REST API: Modern RESTful interface
- SOAP API: Legacy integration support
- Transactional Messaging: Real-time triggered sends
- Journey API: Programmatic journey management
- Asset Management: Content and template management
- Einstein AI: Predictive analytics and recommendations
- Multi-Channel: Email, SMS, push, social integration
- Enterprise Scale: Handle billions of messages
What You Can Do with Salesforce Marketing Cloud MCP Server
The MCP server transforms Marketing Cloud's API into a natural language interface, enabling AI agents to:
Email Marketing Management
-
Campaign Operations
- "Create email campaign for Black Friday sale"
- "Schedule newsletter for next Monday at 9 AM EST"
- "Send test email to marketing team"
- "Clone last month's campaign with updated content"
-
Template Management
- "Create responsive email template for promotions"
- "Update header logo across all templates"
- "Build dynamic content blocks for personalization"
- "Import HTML template from design team"
-
List & Subscriber Management
- "Import new subscribers from CRM"
- "Create segment of engaged users from last 30 days"
- "Suppress bounced emails from all lists"
- "Export subscriber data for analysis"
Journey Builder Automation
-
Journey Creation
- "Build welcome journey for new customers"
- "Create abandoned cart recovery flow"
- "Design re-engagement campaign for inactive users"
- "Set up birthday email automation"
-
Journey Management
- "Pause journey for maintenance"
- "Update wait times between activities"
- "Add A/B test to journey path"
- "Monitor journey performance metrics"
-
Entry Sources
- "Configure API entry for real-time triggers"
- "Set up data extension entry source"
- "Create audience entry from Salesforce CRM"
- "Define entry criteria and filters"
Mobile Marketing
-
SMS Campaigns
- "Send promotional SMS to opted-in subscribers"
- "Create two-way SMS conversation flow"
- "Schedule SMS reminders for appointments"
- "Track SMS delivery and response rates"
-
Push Notifications
- "Send push notification to app users"
- "Create geofence-triggered notifications"
- "Target users based on app behavior"
- "Schedule recurring push campaigns"
-
In-App Messaging
- "Display promotional banner in mobile app"
- "Create onboarding messages for new users"
- "Show personalized product recommendations"
- "Track in-app message interactions"
Data & Analytics
-
Data Extension Management
- "Create data extension for event registrations"
- "Import customer data from external source"
- "Update subscriber preferences in bulk"
- "Clean and deduplicate contact records"
-
Segmentation
- "Build segment of high-value customers"
- "Create dynamic lists based on behavior"
- "Define SQL queries for complex segments"
- "Export segments for targeted campaigns"
-
Analytics & Reporting
- "Generate email performance report"
- "Track journey conversion rates"
- "Analyze subscriber engagement trends"
- "Create executive dashboard"
Personalization & AI
-
Einstein Recommendations
- "Enable product recommendations in emails"
- "Configure content recommendations"
- "Set up predictive audiences"
- "Optimize send time with Einstein"
-
Dynamic Content
- "Create personalized product blocks"
- "Build location-based content variations"
- "Set up language-specific content"
- "Configure customer-specific offers"
-
Behavioral Triggers
- "Trigger email on website behavior"
- "Send based on purchase history"
- "React to email engagement"
- "Automate based on data changes"
Integration & Automation
-
CRM Integration
- "Sync contacts from Sales Cloud"
- "Update lead scores in Salesforce"
- "Trigger journeys from CRM events"
- "Map custom objects to data extensions"
-
API Automation
- "Send transactional emails via API"
- "Update subscriber data programmatically"
- "Trigger journeys from external events"
- "Export data for warehouse integration"
-
Automation Studio
- "Schedule daily data imports"
- "Automate list refresh queries"
- "Set up file transfer automation"
- "Create multi-step workflows"
Prerequisites
- Access to Cequence AI Gateway
- Salesforce Marketing Cloud account
- Marketing Cloud API user with appropriate permissions
- Installed package with API integration components
Step 1: Create Marketing Cloud API Integration
Before setting up the MCP server, you need to create an API integration in Marketing Cloud.
1.1 Access Marketing Cloud Setup
- Log in to Marketing Cloud
- Navigate to Setup Apps Installed Packages
- Click New to create a package
1.2 Create Package
-
Package details:
- Name: "AI Gateway MCP Integration"
- Description: "MCP server for Marketing Cloud automation"
-
Add Component:
- Click Add Component
- Select API Integration
- Choose Server-to-Server integration type
1.3 Configure API Access
-
Select the required permissions:
- Email: Read, Write, Send
- Lists and Subscribers: Read, Write
- Data Extensions: Read, Write
- Journeys: Read, Write, Execute
- Automation: Read, Write, Execute
-
Save the component
1.4 Get Credentials
After saving:
- Note the Client ID
- Note the Client Secret
- Copy the Authentication Base URI
- Note your Subdomain (MID)
Step 2: Access AI Gateway Apps
- Log in to your Cequence AI Gateway dashboard
- Navigate to Apps in the left sidebar
- You'll see the list of available third-party applications
Step 3: Find and Select Salesforce Marketing Cloud API
- In the Apps section, browse through the Third-party category
- Look for Salesforce Marketing Cloud or use the search function
- Click on the Salesforce Marketing Cloud API card to view details
Step 4: Create MCP Server
- Click the Create MCP Server button on the API card
- You'll be redirected to the MCP Server creation wizard
Step 5: Configure API Endpoints
In the App Configuration step:
-
Base URL: Enter your Marketing Cloud REST endpoint
- Format:
https://{subdomain}.rest.marketingcloudapis.com
- Example:
https://mc563885gzs27c5t9-63k636ttgm.rest.marketingcloudapis.com
- Format:
-
Select API endpoints to expose to your MCP server
-
Click Next to proceed
Step 6: MCP Server Basic Setup
Configure your MCP server details:
-
MCP Server Name: Enter a descriptive name
- Example: "Marketing Cloud Automation Hub"
- This name will identify your server in the dashboard
-
Description (Optional): Add details about the server's purpose
- Example: "Email marketing and journey automation platform"
-
Production Mode: Toggle based on your needs
- ON for production environments
- OFF for development/testing
-
Click Next to continue
Step 7: Configure Authentication
This is where you'll use your API Integration credentials:
-
Authentication Type: Select OAuth 2.0
-
Fill in the OAuth configuration:
-
Authorization URL:
https://auth.exacttargetapis.com/v2/authorize
-
Token URL:
https://auth.exacttargetapis.com/v2/token
-
Client ID: Paste from Installed Package
-
Client Secret: Paste from Installed Package
-
Account ID: Your MID (Member ID)
-
-
Grant Type: Client Credentials
Available Salesforce Marketing Cloud OAuth Scopes
Configure the appropriate scopes based on your application needs:
Email Operations
-
email_read
- View email campaigns
- Read email templates
- Access email performance
- View subscriber status
-
email_write
- Create and update emails
- Manage templates
- Configure settings
- Update content blocks
-
email_send
- Send email campaigns
- Trigger sends
- Schedule deliveries
- Test sends
List & Subscriber Management
-
list_and_subscribers_read
- View lists and audiences
- Read subscriber data
- Access preferences
- View engagement history
-
list_and_subscribers_write
- Create and update lists
- Manage subscribers
- Update preferences
- Import/export data
Journey & Automation
-
journeys_read
- View journey definitions
- Access journey stats
- Read journey history
- Monitor performance
-
journeys_write
- Create journeys
- Update journey logic
- Configure activities
- Manage versions
-
journeys_execute
- Activate journeys
- Inject contacts
- Pause/resume
- Stop journeys
Data Management
-
data_extensions_read
- View data extensions
- Read records
- Access schemas
- Export data
-
data_extensions_write
- Create data extensions
- Insert/update records
- Modify schemas
- Delete data
Recommended Scope Combinations
For Email Marketing:
email_read
email_write
email_send
list_and_subscribers_read
list_and_subscribers_write
For Journey Automation:
journeys_read
journeys_write
journeys_execute
data_extensions_read
data_extensions_write
For Full Access:
email_read
email_write
email_send
list_and_subscribers_read
list_and_subscribers_write
data_extensions_read
data_extensions_write
journeys_read
journeys_write
journeys_execute
automations_read
automations_write
automations_execute
Step 8: Configure Security
Set up API protection features:
-
API Protection: Toggle ON to enable
- Protects against bot attacks, DDoS, and threats
- Monitors for suspicious activity
- Rate limiting and anomaly detection
-
Protection Features (when enabled):
- Auto-scaling protection
- Managed infrastructure
- Built-in monitoring
- Zero maintenance required
-
Click Next to continue
Step 9: Choose Deployment Method
Select your deployment preference:
Option A: Deploy to Cequence Cloud (Recommended)
- Fully managed deployment
- Automatic scaling and monitoring
- Built-in high availability
Option B: Deploy with Helm Chart
- Self-managed Kubernetes deployment
- Full control over infrastructure
- Requires Kubernetes expertise
Click Next after selecting.
Step 10: Review and Deploy
Review your MCP server configuration:
- MCP Server Name: Your chosen name
- Base URL: Your Marketing Cloud REST endpoint
- Selected Endpoints: Number of endpoints selected
- Authentication: OAuth 2.0 (Configured)
- API Protection: Enabled/Disabled
- Deployment: Your selected method
Click Create & Deploy to finalize the setup.
Using Your Salesforce Marketing Cloud MCP Server
With Claude Desktop
-
Open Claude Desktop settings
-
Add your MCP server:
{
"servers": {
"sfmc": {
"url": "your-mcp-server-url",
"auth": {
"type": "oauth2",
"client_id": "your-client-id"
}
}
}
} -
Start using natural language commands:
- "Create welcome email for new subscribers"
- "Show email performance from last campaign"
- "Build journey for abandoned cart recovery"
- "Export engaged subscribers from last 90 days"
- "Schedule birthday emails for next month"
API Integration Example
// Initialize MCP client
const mcpClient = new MCPClient({
serverUrl: 'your-mcp-server-url',
auth: {
type: 'oauth2',
client_credentials: {
client_id: process.env.SFMC_CLIENT_ID,
client_secret: process.env.SFMC_CLIENT_SECRET
}
}
});
// Create email
const email = await mcpClient.sfmc.email.create({
name: 'Summer Sale Campaign',
subject: 'Exclusive Summer Deals Inside! ',
htmlContent: '<html>...</html>',
textContent: 'Summer sale...',
categoryId: 12345
});
// Create subscriber list
const list = await mcpClient.sfmc.list.create({
name: 'Summer Sale Audience',
description: 'Engaged subscribers for summer campaign'
});
// Send email
const send = await mcpClient.sfmc.send.create({
emailId: email.id,
listId: list.id,
scheduledTime: '2025-06-01T09:00:00Z'
});
// Create journey
const journey = await mcpClient.sfmc.journey.create({
name: 'Post-Purchase Journey',
key: 'post_purchase_2025',
entryMode: 'Audience',
activities: [
{
type: 'Email',
configurationArguments: {
emailId: 'thank-you-email-id'
}
},
{
type: 'Wait',
configurationArguments: {
waitDuration: 3,
waitUnit: 'Days'
}
}
]
});
// Track email metrics
const metrics = await mcpClient.sfmc.analytics.getEmailMetrics({
emailId: email.id,
metrics: ['opens', 'clicks', 'bounces', 'unsubscribes']
});
Common Use Cases
Email Marketing
- Campaign creation and management
- A/B testing and optimization
- Personalization and dynamic content
- Automated email series
- Transactional messaging
Customer Journeys
- Welcome series automation
- Abandoned cart recovery
- Post-purchase follow-up
- Re-engagement campaigns
- Loyalty program communications
Data Management
- Customer data unification
- Behavioral segmentation
- Preference center management
- Data import/export automation
- Cross-channel identity resolution
Analytics & Optimization
- Campaign performance tracking
- Journey analytics
- Einstein recommendations
- Predictive audiences
- ROI measurement
Security Best Practices
-
API Security:
- Use IP allowlisting
- Rotate credentials regularly
- Monitor API usage
- Implement least privilege
-
Data Protection:
- Encrypt sensitive data
- Follow data retention policies
- Implement consent management
- Audit data access
-
Compliance:
- GDPR compliance tools
- CAN-SPAM adherence
- Preference management
- Unsubscribe handling
Troubleshooting
Common Issues
-
401 Unauthorized
- Verify client credentials
- Check token expiration
- Ensure correct subdomain
- Validate account permissions
-
403 Forbidden
- Check user permissions
- Verify business unit access
- Review IP restrictions
- Confirm feature access
-
429 Rate Limited
- Implement request throttling
- Use batch operations
- Check rate limit headers
- Consider async processing
Getting Help
- Documentation: AI Gateway Docs
- Support: support@cequence.ai
- Community: AI Gateway Forum
- SFMC Docs: Marketing Cloud Developer Center