---
schema_version: "1"
id: c5fb22c1e9a2c206dce46a2e1f4bd8f70f5f2a79cfcd49bb4c5ba05e5ce003e2
title: Set Up the MCP Server
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/mce-mcp/guide/mce-mcp-setup.md
canonical_url: https://developer.salesforce.com/docs/marketing/mce-mcp/guide/mce-mcp-setup.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: fd4afae819c837cb53519bde4473c02aadba4911c176d53f8a8b4ed580ccf363
products:
  - MCP Server for Marketing Cloud Engagement
  - Marketing Cloud
---
# Set Up the MCP Server

Marketing Cloud Engagement includes a hosted Model Context Protocol (MCP) server. By connecting to this MCP server, your AI assistants can help you manage customer data, orchestrate campaigns, and coordinate data transfers between systems.

## Prerequisites

Before you complete these steps, install and configure an AI assistant that supports MCP, such as Claude Code or Gemini CLI.

## Create the Package

To use the MCP server, create a managed package in Marketing Cloud Engagement, and then connect your AI assistant to the server.

1. In Marketing Cloud Engagement Setup, go to **Apps**, and then select **Installed Packages**.
2. Create an installed package:

   1. Click **New**.
   2. Enter a name for the package.
   3. Save your changes.

3. Create an API component:

   1. On the detail page for the package you created, click **Add Component**.
   2. For the component type, select **API Integration**.
   3. Click **Next**.
   4. For the integration type, select **Public App**.
   5. Click **Next**.
   6. In the Redirect URIs section, for **URIs**, enter `https://salesforce.com`.

      The address that you enter in this field is a temporary placeholder. You change it in a later step.

   7. In the Scope section, select the permission scopes to grant the MCP server connection.

      **important:** Assign only the permission scopes that are necessary for the AI assistant to complete the tasks you assign it. See [API Integration Permission Scopes](/docs/marketing/marketing-cloud/guide/data-access-permissions.html).

      For example, if you want the assistant to create and modify data extensions, assign it the **Data | Data Extensions | Read** and **Data | Data Extensions | Write** permission scopes.

4. On the detail page for the installed package, find your client ID and tenant ID.

   The client ID is a 24-character alphanumeric string.

   The tenant ID is a 28-character alphanumeric string that’s part of the authentication and API URIs. For example, if your Authentication Base URI is `https://mcphchq9d5b8mlzeyc2v1example.auth.marketingcloudapis.com/`, your tenant ID is `mcphchq9d5b8mlzeyc2v1example`.

5. In the API Integration section, click **Edit**.
6. In the Redirect URIs section, for **URI**, enter a redirect URL. Choose from these options:

   - To use the MCP server hosted in the United States, specify `https://mai-mce-mcp-cdp1.sfdc-yfeipo.svc.sfdcfc.net/t/{tenantId}/c/{clientId}/api/mcp/oauth/callback`
   - To use the MCP server hosted in the European Union, specify `https://mai-mce-mcp-cdp1.sfdc-yzvdd4.svc.sfdcfc.net/t/{tenantId}/c/{clientId}/api/mcp/oauth/callback`

     In these URLs, replace `{tenantId}` with your tenant ID and `{clientId}` with your client ID.

     **note:** Select the MCP server that’s located nearest to your location. The MCP server that you select only impacts the latency of your connection to it. The MCP servers don’t store any data that they access.

7. Configure your AI assistant to use the MCP server. Choose from these URLs:

   - To use the MCP server hosted in the United States, use `https://mai-mce-mcp-cdp1.sfdc-yfeipo.svc.sfdcfc.net/t/{tenantID}/c/{clientID}/api/mcp`
   - To use the MCP server hosted in the European Union, use `https://mai-mce-mcp-cdp1.sfdc-yzvdd4.svc.sfdcfc.net/t/{tenantID}/c/{clientID}/api/mcp`

   In these URLs, replace `{tenantId}` with your tenant ID and `{clientId}` with your client ID.

   For example, if you use Claude Code, run this command at the command line to connect to the US-based MCP server, replacing `CONFIG_NAME` with a name for the server connection:

   ```
   claude mcp add \
     -s user \
     --transport http \
     CONFIG_NAME \
     https://mai-mce-mcp-cdp1.sfdc-yfeipo.svc.sfdcfc.net/t/{tenantID}/c/{clientID}/api/mcp
   ```

8. In your AI assistant, authenticate the connection to Marketing Cloud Engagement. The process for completing this step depends on which application you use.

   For example, in Claude Code, enter `/mcp`, select the MCP connection, and then select **Authenticate**.

---

_Any third-party AI assistant or LLM that you choose to install and configure with MCP (such as Anthropic’s Claude or Google’s Gemini) is provided directly by that third party, may be subject to applicable terms by that third party, and is not provided, supported, or warranted by Salesforce._
