Loading
Agentforce and Einstein Generative AI
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Considerations for MCP for Agentforce

          Considerations for MCP for Agentforce

          Carefully review the current considerations and limitations for MCP for Agentforce.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type.

          MCP Servers and Registrations

          • MCP for Agentforce supports servers that use the Streamable HTTP transport protocol. HTTP+SSE and other protocols are unsupported.
          • MCP for Agentforce supports no authentication and OAuth 2.0 client credentials only. Other OAuth flows aren’t supported, including authorization code, CIMD, DCR, JWT bearer, and PKCE. Some advanced authentication patterns are available with additional configuration, including OAuth 2.1 client credentials.
          • User-level authentication isn’t supported. We don’t currently support use cases that require individual user IDs or personalized responses. For example, you can’t use MCP for Agentforce to give an individual user a refund, but you can use it to get all of your customers’ invoices.
          • MCP for Agentforce supports server tools only. MCP server apps, prompts, and resources aren’t supported.
          • Tool names can be up to 128 characters and support the following characters: ^a-zA-Z0-9./-{1,128}$
          • When an MCP server is out of sync or unavailable, the Registrations list view and server record page currently show the server as connected. A fix is on the way.
          • Changes made to a server registration or the server itself can break the associated MCP tool actions in an agent. Before making any changes, including deleting the registration, remove any associated actions from your agent, delete the associated agent actions from the asset library, and then delete your server registration. Then you can re-register your server and add the new MCP tool actions to your agent.

          Packaging and Deployment

          To ensure security, Salesforce supports packaging or deployment of agents that contain MCP tool actions, but MCP server registration metadata isn’t packaged. Any MCP tool actions added to the agent don’t work out of the box.

          Before you deploy a package in the new environment, register the MCP servers and allowlist the tools the agent uses. Then after you deploy, remove any existing MCP tool actions from the agent and replace them with the new actions from the asset library.

          Agent metadata can be packaged for draft or committed agents. If the agent is in a draft state in your new environment, you can edit it. If the agent is in a committed state, create a new draft to make the changes.

          Agentforce Platform and Builder Support

          • Agent actions that reference MCP server actions (MCP tool actions) are billed at the same rate as other agent actions. Reporting on usage is available in Digital Wallet. See Agentforce and Generative AI Usage and Billing.
          • Agentforce Builder support is strongest for primitive values and shallow field access. Therefore, select MCP server tools with simple structured JSON responses or adjust your responses, where possible. Top-level objects, top-level object properties, and top-level arrays of objects are supported. More complex shapes aren’t currently supported end to end, including nested properties, arrays of objects, and dynamic object payloads. Learn more.
          • Agentforce Builder uses Lightning types to render action inputs and outputs. Not all MCP tool input and output schemas map to Lightning types. When an MCP tool action’s data can’t be resolved to a Lightning type, you can still use the action with your agent. However, the input or output can’t be stored in a variable. Learn more.
          • When you add an MCP tool action to your agent:
            • The input and output labels for some data types (for example, numbers) can be replaced with the label “string.” This doesn’t affect your agent’s logic or reasoning. However, for ease of use, we recommend replacing the labels with the original values from the MCP tool action in the asset library or the MCP tool input or output schema. A fix is on the way.
            • The Reference Action Type field appears empty. The action can run without a reference action type, even though it’s identified as a required field, because the reference action is populated. If you click into or change the Reference Action Type field, the reference action is reset and can’t be manually reset to the MCP tool. In this case, remove the action from your agent and re-add it from the asset library. A fix is on the way.
            • For MCP servers and tools, properties are required to be less than or equal to 255 characters. A property that exceeds 255 characters isn’t currently supported.
          • MCP server responses are subject to these timeout windows. Adjust responses to fit these limits, where possible.
            • The MCP client timeout limit is 60 seconds. For example, when a server is unavailable or takes longer than 60 seconds to respond.
            • The Atlas reasoning engine timeout is 120 seconds. For example, when multiple servers are called and collectively take longer than 120 seconds to respond.
          • In Script View, don't change the developer name of an MCP action in a subagent. In this Agent Script example, the developer name (UUID) is a4ace7b43ff031459019d3f5c350629a.
               actions:
                  a4ace7b43ff031459019d3f5c350629a:
                     description:
                        Retrieves a list of customer support cases for a given customer Id.
                     label: "custom_cases_by_id"
                     require_user_confirmation: False
                     include_in_progress_indicator: False
                     source: "a4ace7b43ff031459019d3f5c350629a"
                     target: "mcpTool://mcptoolx5xf5customerxfcasesxfbyxfid"
            You can change the alias of an MCP action, however, and refer to that alias in the instructions. In this example, get_cases_from_id is the alias of the MCP action referenced in the instructions section and defined under actions.
            Get customer support cases and answer questions
               reason:
                  instructions:
                     Get customer cases by customer id by calling {{actions.get_cases_from_id}}.
                     If customer provides only email, call {{actions.customer_id_from_email}}
                     to get the customer id first.
                  actions:
                     get_cases_from_id: @actions.a4ace7b43ff031459019d3f5c350629a
                        with customer_id = ...
                     customer_id_from_email: @actions.a365abc?3dabf237b28ce87f636204384
                        with email = ...
           
          Loading
          Salesforce Help | Article