# SF Marketing Cloud MCP

> Salesforce Marketing Cloud MCP Server lets you manage campaigns, track leads, and measure marketing ROI by connecting your AI client directly to SFMC data. Use it to search for campaign details, add members, or pull aggregate performance metrics like total conversions and cost per lead—all through natural conversation.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** campaign-management, lead-tracking, marketing-roi, customer-engagement, crm-integration, performance-metrics

## Description

This server connects your AI client directly to Salesforce Marketing Cloud (SFMC), letting you handle campaigns, track leads, and measure marketing return on investment without ever touching the platform UI. You can manage everything—from setting up a new email blast to calculating total cost per lead—just by talking to your agent.

**Setting Up and Locating Campaigns**

You need a campaign? Use `sf_create_campaign` to build one from scratch. You specify the name, type (like Webinar or Email), dates, budget, and initial status right there. If you're looking for something that already exists, use `sf_search_campaigns`; it finds campaigns by partial names so you can check their current status, type, allocated budget, and conversion metrics fast. Need to see every campaign that matches a lifecycle stage? Run `sf_campaigns_by_status` to list all initiatives—say, 'Completed' or 'Planned'—and get instant reports on their lead count and conversion data.

**Managing Members and Tracking Engagement**

The core of tracking is membership. Use `sf_add_campaign_member` when you want to enroll a specific lead or contact into an active campaign, starting the attribution process for that person. To see who's actually in there, run `sf_campaign_members`; it retrieves a full list of every member in a given campaign, including their membership status and precisely when they responded.

**Calculating Performance and ROI**

When you need to know if the effort paid off, you use performance tools. The `sf_campaign_performance` tool aggregates everything into one report: it calculates total leads generated, conversions, budgeted costs, and actual return on investment across all campaigns, grouped by type. You'll get a clear picture of your overall marketing health without pulling reports manually.

## Tools

### sf_add_campaign_member
Adds an existing lead or contact to a marketing campaign to begin tracking their engagement and attribution.

### sf_campaign_members
Retrieves the names, types, statuses, and response dates for all members currently in a specific campaign.

### sf_campaign_performance
Calculates aggregate marketing data, including total leads generated, conversions, budgets, and actual costs by campaign type.

### sf_campaigns_by_status
Lists all campaigns in SFMC filtered by status (Planned, Completed, etc.) along with their respective lead counts and conversion data.

### sf_create_campaign
Builds a new marketing campaign structure in SFMC using required parameters like name, type, dates, and budget.

### sf_search_campaigns
Finds existing campaigns by partial name to get an overview of their status, type, budget, and conversion metrics.

## Prompt Examples

**Prompt:** 
```
What is the conversion rate of our Email campaigns?
```

**Response:** 
```
📧 **Email Campaign Performance**
- 5 active campaigns
- 1,200 total leads
- 340 conversions (28.3%)
- Total cost: $12,500
```

**Prompt:** 
```
Create a new webinar campaign for Q2 product launch
```

**Response:** 
```
✅ **Campaign Created!**
- Name: Q2 Product Launch Webinar
- Type: Webinar
- Status: Planned
- Budget: $5,000
```

**Prompt:** 
```
Show me all in-progress campaigns
```

**Response:** 
```
🎯 **In Progress Campaigns**
| Name | Leads | Converted | Budget |
|---|---|---|---|
| Spring Webinar | 450 | 89 | $3,000 |
| LinkedIn Ads Q1 | 1,200 | 234 | $15,000 |
```

## Capabilities

### Create campaigns
Build a new marketing initiative in SFMC by specifying the name, type (Webinar, Email, etc.), dates, budget, and initial status.

### Search campaign details
Find existing marketing campaigns using partial names to retrieve their current status, budget, lead counts, and conversion metrics.

### Filter campaigns by status
List all campaigns in SFMC that match a specific lifecycle status (e.g., 'Completed' or 'In Progress'), along with their full performance metrics.

### Add members to campaign
Enroll specific leads or contacts into an existing marketing campaign, allowing you to track attribution and engagement for that member.

### View all campaign members
Retrieve a full list of every lead and contact enrolled in a given campaign, including their membership status and when they responded.

### Calculate overall performance metrics
Generate an aggregate report showing total leads, conversions, budgeted cost, and actual ROI across all campaigns grouped by type.

## Use Cases

### Need to report Q2 ROI quickly
A Campaign Manager needs to show the board the total performance metrics for Q2. Instead of pulling reports from three different tabs, they ask their agent to run `sf_campaign_performance`. The result gives them a single view of leads, conversions, and costs by campaign type.

### Launched an event and need initial tracking
A Demand Gen Specialist just finished an industry webinar. They use the agent to run `sf_search_campaigns` first to get the Campaign ID, then immediately call `sf_add_campaign_member` for every attendee's contact ID. This starts the attribution clock.

### Checking if a specific campaign is finished
A Marketing Ops Manager wants to know which campaigns are done and what their final results were. They use `sf_campaigns_by_status` filtered by 'Completed' status, getting the full metrics for every initiative that hit its end date.

### Assessing campaign pipeline health
The team needs to see all campaigns that are currently in development but haven't launched. They use `sf_search_campaigns` and filter the output by 'Planned' status to build a list for executive review.

## Benefits

- Get a clear picture of overall marketing health. By calling `sf_campaign_performance`, you instantly see total leads, conversions, and costs grouped by campaign type—no dashboard clicking required.
- Track every lead's journey. Use `sf_add_campaign_member` to enroll contacts into a campaign, then use `sf_campaign_members` to check their specific response status and date.
- Audit your active projects easily. You can run `sf_campaigns_by_status` to see every 'In Progress' or 'Planned' campaign, along with its budget and current lead count.
- Quickly locate initiatives. If you just know the name of a campaign but not its ID, use `sf_search_campaigns`. It returns status, type, dates, and core metrics immediately.
- Build campaigns programmatically. Instead of clicking through forms, use `sf_create_campaign` to generate a new campaign structure with all necessary details in one call.

## How It Works

The bottom line is that you use these tools sequentially: define the campaign, populate it with members, then ask for the final performance report.

1. First, you use `sf_search_campaigns` or `sf_create_campaign` to identify or build the campaign container.
2. Next, you call `sf_add_campaign_member` with a specific contact ID and the Campaign ID to enroll users for tracking.
3. Finally, you run `sf_campaign_performance` to pull combined metrics like total leads generated and overall ROI based on the populated data.

## Frequently Asked Questions

**How do I use sf_campaign_performance to get total leads?**
You run `sf_campaign_performance` and ask for an aggregate report that includes the 'total leads generated' metric. This gives you a single number representing all leads across the campaigns it analyzes.

**Can I find out which campaigns are currently running using sf_campaigns_by_status?**
Yes. You pass the status 'In Progress' to `sf_campaigns_by_status`. This returns all active campaign IDs and their current lead counts.

**What information does sf_search_campaigns give me?**
It provides an overview of campaigns found by name, including the status, type (Webinar/Email), start/end dates, budget, and conversion metrics for quick reference.

**How do I use sf_add_campaign_member?**
You must provide both a Campaign ID and either a Contact ID or a Lead ID. The tool then adds that individual to the campaign tracking list.

**How do I use sf_campaign_members to check who is currently enrolled in a campaign?**
It returns a detailed list of every lead and contact associated with the specified campaign. You get their membership name, whether they were added as a Lead or Contact, their current status (like Responded), and the date they responded.

**What parameters do I need for sf_create_campaign?**
You must provide a campaign Name. You also specify the Type (e.g., Webinar or Email) and set the budget and dates. The system defaults the status to 'Planned' if you don't include one.

**When using sf_add_campaign_member, what is the difference between providing a Lead ID versus a Contact ID?**
The tool requires you to provide only one or the other—never both. Using a Lead ID adds an unverified prospect; using a Contact ID means linking an existing, verified record.

**If I want to compare my budgeted spending against actual costs across different initiatives, which tools should I use?**
Use sf_campaigns_by_status or sf_search_campaigns. Both return the budgeted cost and the actual cost for each campaign type, letting you see where your money went versus what was planned.

**What campaign data can I access?**
Search campaigns, view members, track conversions, measure costs and ROI — all grouped by type.

**Can I add leads to campaigns?**
Yes! Add any Lead or Contact as a campaign member with a specific status.

**How is campaign performance measured?**
Aggregate metrics: total leads, conversions, actual cost per campaign type. Compare ROI across channels.