Sfmc MCP Server logo

Sfmc MCP Server

Validates Salesforce Marketing Cloud SQL and provides read-only Data Extension discovery and querying through MCP.

Install Sfmc MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "sfmc-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "sfmc-mcp-server"
      ],
      "env": {
        "SFMC_SUBDOMAIN": "YOUR_VALUE_HERE",
        "SFMC_CLIENT_ID": "YOUR_VALUE_HERE",
        "SFMC_CLIENT_SECRET": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y sfmc-mcp-server

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1d ago.

Overview

The sfmc-mcp-server MCP server connects MCP clients to Salesforce Marketing Cloud for read-only Data Extension discovery, record queries, and Automation Studio SQL validation. It checks SQL against known SFMC dialect restrictions and the actual Data Extension schema before execution. Run it when you need to catch unsupported syntax, missing fields, invalid target columns, or missing destination keys before an automation runs. It uses Salesforce OAuth credentials supplied through environment variables and communicates over stdio.

Use cases

  • Validate Automation Studio SQL before running an automation
  • List Data Extensions and inspect their schemas
  • Query Data Extension records with filters and pagination
  • Check destination columns and primary-key requirements
  • Audit Data Extension fields and required columns

Key features

  • Automation Studio SQL dialect validation
  • Data Extension metadata and schema discovery
  • Filtered and paginated Data Extension queries
  • OAuth client-credentials authentication
  • Read-only mode by default
  • Retry handling for rate limits and server errors

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

8/10 checks healthy over the last 90d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 1d ago via OSV.dev · sfmc-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads108Package downloads in the last 30 days.
Last commit4mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.

How Sfmc MCP Server works

What the sfmc-mcp-server MCP server does

The sfmc-mcp-server MCP server exposes Salesforce Marketing Cloud data and schema operations to an MCP client. Its primary use is reviewing Automation Studio Query Activities before they run, reducing errors caused by unsupported SQL syntax or mismatches with Data Extension schemas.

It provides three tools:

  • validate_sql checks a query against known Automation Studio restrictions and the available Data Extensions and columns. It can identify unsupported constructs, missing tables or fields, undeclared aliases, incompatible output columns, and a destination primary key missing from the query result.
  • list_data_extensions returns Data Extension metadata, supports name filtering and pagination, and can return a complete schema.
  • query_data_extension retrieves records with filtering, ordering, and pagination.

Validation can flag constructs such as top-level ORDER BY, CTEs, DML and DDL, variables, temporary tables, cursors, stored procedures, FULL OUTER JOIN, unbalanced parentheses, risky SELECT *, and GETDATE() usage. Missing column suggestions may be generated from edit distance.

How it works

The process runs as a stdio MCP server. Salesforce authentication uses the OAuth client-credentials flow. Access tokens are cached with a 60-second expiry margin, and authentication is deferred until the first tool request, allowing the process to start before credentials are checked.

Requests use Salesforce Marketing Cloud REST APIs. The client applies exponential retry behavior for HTTP 429 and 5xx responses. Data Extension queries are paginated and capped at 50 rows per page to limit the amount of data returned to the model.

The server is read-only by default. Tool calls are written to stderr with a timestamp and arguments for audit logging, while retrieved Salesforce data is not persisted by the server.

Setup and configuration

Install and launch the sfmc-mcp-server MCP server with npx sfmc-mcp-server, or install the package globally with npm install -g sfmc-mcp-server. Create a Salesforce Marketing Cloud Installed Package with a server-to-server API Integration. The documented minimum permissions are read access to Data Extensions and Automations.

Set SFMC_SUBDOMAIN, SFMC_CLIENT_ID, and SFMC_CLIENT_SECRET in the MCP client's environment configuration. SFMC_MODE=read is the default and can be set explicitly. For multiple Business Units, define separate MCP entries and provide the relevant SFMC_ACCOUNT_ID (MID) for each one.

Restart the client after changing its configuration.

Limitations and notes

SQL validation covers known Automation Studio restrictions and schema existence, but it does not prove that a query is logically correct or performant. Shared Data Extensions referenced with ENT. are not checked against schema because they belong to the Parent BU and are outside the current Business Unit's REST scope.

In queries containing multiple joins, unqualified columns without an alias. prefix are not validated. The endpoint used for Data Extension access may also require a SOAP fallback on older Salesforce Marketing Cloud releases.

Planned capabilities include automation status, journeys, send statistics, row upserts, and Parent BU shared Data Extension support.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Sfmc MCP Server

sfmc-mcp-server is an MCP server that connects MCP clients to Salesforce Marketing Cloud. Its main tools validate Automation Studio SQL, list Data Extensions and their schemas, and query Data Extension records with filters, ordering, and pagination. It uses Salesforce OAuth credentials supplied through environment variables.

Install it with `npx sfmc-mcp-server` or run `npm install -g sfmc-mcp-server` for a global installation. Add the command to your MCP client's server configuration and provide the Salesforce environment variables before restarting the client.

Set `SFMC_SUBDOMAIN`, `SFMC_CLIENT_ID`, and `SFMC_CLIENT_SECRET` in the MCP server environment. Create an Installed Package in Salesforce Marketing Cloud with a server-to-server API Integration and read permissions for Data Extensions and Automations.

Yes, sfmc-mcp-server includes a Claude Desktop configuration using the `npx` command and environment variables. The README provides configuration paths for macOS and Windows; restart Claude Desktop after saving the MCP configuration.

No, the currently documented tools are read-only. `SFMC_MODE=read` is the default, while write tools such as row upserts are listed in the roadmap and are not currently provided.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSfmc MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/sfmc-mcp-server?style=directory)](https://allmcps.com/mcp/sfmc-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/sfmc-mcp-server"><img src="https://allmcps.com/api/badge/sfmc-mcp-server?style=directory" alt="Sfmc MCP Server on AllMCPs" /></a>