AIforce is the idea that Salesforce can be used anywhere, by humans or agents, without the browser UI. Headless Toolkit is the builder-facing layer that makes AIforce possible. It exposes Salesforce Platform capabilities to AI agents and external tools through MCP servers, APIs, CLIs, and skills and developer tooling. The approach is “headless” because it doesn’t require the browser UI.

Headless Toolkit gives you the freedom to choose your workspace:

  • Salesforce-hosted MCP Servers: Use Salesforce MCP servers, such as SObject Reads and Data 360 MCP. Use other MCP servers, such as Tableau, Informatica, MuleSoft, and Slack, to extend your Salesforce tasks and functionality.
  • Salesforce Development Tools: Choose how you build. Use Setup with Agentforce to configure your org in natural language, and Agentforce Vibes for pro-code development with live preview and automated test generation. Use Multi-Framework support to build with React and Angular without relearning the platform.
  • Plugins and Extensions: Plugins automate the setup and configuration of your Salesforce development environment. They offer prebuilt skills and hosted MCP servers that improve developer productivity and code quality in specific tools, such as Claude.
  • Third-Party AI Tools: Work with Salesforce data securely from outside Salesforce-specific environments. Use conversational tools such as ChatGPT and Claude, or coding tools such as Cursor and Windsurf, through Salesforce Hosted MCP Server.

Three points related to Headless Toolkit are worth settling at the outset:

  • It complements the Salesforce UI. The browser isn’t going away. For most enterprises, the dominant architecture is hybrid: some users in Lightning, some working through agents, and external systems operating headlessly.
  • It spans every cloud. The strategy covers every Salesforce surface, including agents, Slack, and custom applications.
  • It’s a path to logic and data. Without the right data foundation, every other layer produces unreliable output. Without the business logic layers, agents read records without invoking the rules that make those records meaningful.

Every enterprise using Salesforce has accumulated irreplaceable operational logic: pricing engines, SLA rules, entitlement schemas, compliance guardrails, and governed approval chains. That logic is how the enterprise operates, written down as code and hardened through years of production use.

For most of that time, the primary way to reach it was through the browser UI. An AI agent working through Claude, Cursor, or a proprietary client couldn’t see these rules without custom integration work. Imagine you were resolving a critical incident, or running an external orchestrator on AWS Bedrock that needed to trigger a Flow. You first needed custom-built, high-maintenance connectors that often took months to deliver. That barrier kept 27 years of enterprise logic away from the growing agent ecosystem, out of reach of the systems designed to automate it.

Headless Toolkit is the architectural response, built on one design principle: No browser required. The API is the UI. Headless Toolkit is a platform architecture made up of several capabilities rather than a single product. Together, they decouple the Salesforce data, business logic, orchestration, and engagement layers from the browser UI. They expose those layers as APIs, Model Context Protocol (MCP) tools, and CLI commands that any compliant client can call. The same permission model that protects the browser experience governs the agent.

Any AI agent, orchestrator, or custom application can now call almost three decades of embedded business logic, governed data, and security infrastructure. It can read data, invoke business logic, and act on CRM workflows without the Salesforce UI, without custom-built connectors, and without rebuilding established Salesforce logic. Salesforce works wherever you work, such as Slack, Microsoft Teams, WhatsApp, or AI tools like Claude or ChatGPT.

Headless Toolkit goes beyond those APIs in three ways:

  • Complete coverage: Agent orchestration and Data 360, which previously lagged the core platform, now have full API, MCP, and CLI support. Deployment and CI/CD operations are covered the same way.
  • MCP as a universal protocol: MCP gives every AI agent in the market a standard way to plug into Salesforce through a large number of tools, hosted servers, and a governed registry. A custom connector that once needed a Salesforce-certified developer is now a configuration.
  • AI Skills: A growing library of coding agent skills cover Agentforce agents, Lightning apps, Flow, Apex, SOQL, Lightning Web Components (LWC), UI bundles, objects and fields, permission sets, and related areas.

Going headless simplifies integration work and requires a new set of governance decisions for its automation. The platform now automates more plumbing than ever, with a growing library of MCP tools, hosted servers, and a governed registry. Your responsibility is the design work that uses it. You decide how far each agent’s scope reaches, where human-in-the-loop (HITL) gates sit, and how identity carries across vendors, as described in End-User Identity Propagation in Agents. These design decisions keep your agentic ecosystem auditable at scale.

If you treat headless as a deployment instead of a governance design exercise, then gaps can show up in production. Expect runaway agents exhausting API quotas, misconfigured permission scopes occurring silently at machine speed, or a multi-vendor audit trail that stops at each vendor boundary. The rest of this document helps you close these gaps before they occur.

Use this technical guide to make production decisions about Headless Toolkit. It first explains what each component provides: MCP, CLIs, AI Skills and Plugins, and the experience layer. It then covers how to integrate, secure, govern, and observe the toolkit in production. A single Production Readiness Checklist at the end brings it all together. Jump to the section that matches the decision you’re making now:

I want to…Go to
Understand what’s new and why this architecture mattersWhy Headless Matters
Understand MCP and how to choose a server typeModel Context Protocol: Architecture and Server Types
Understand command line interface and its comparison with APIs and MCPsCommand Line Interfaces (CLIs)
Speed up developer onboarding with AI Skills and PluginsAI Extensions
Build custom UIs with Multi-FrameworkExperience Delivery Architecture: Multi-Framework
Design the integration architecture: MCP, MuleSoft, and the custom layerIntegration Architecture: MCP, MuleSoft, and the Custom Layer
Lock down the security model before agents reach productionSecurity Architecture: Shared Responsibility
Avoid API quota exhaustion at scaleResource Optimization and Operational Governance
Instrument observability and prepare for incidents before go-liveObservability and Incident Readiness
Confirm requirements before go-liveProduction Readiness Checklist

Alongside APIs and CLIs, Salesforce uses MCP to expose platform capabilities, such as data, Flow tools, Apex, and agents, as a catalog of callable tools. Any MCP-compliant client (Claude, Cursor, ChatGPT, Codex, Windsurf, Microsoft Copilot, Databricks, or a custom application) can connect to a Salesforce-hosted MCP server.

When an MCP client connects to Salesforce, it authenticates through OAuth 2.0, receives the tool catalog of the activated server, and can then invoke any tool that server exposes. Salesforce enforces Field-Level Security (FLS), sharing rules, and all governance controls on every call to standard tools on Salesforce-hosted MCP servers. Custom tools and third-party MCP servers require explicit security implementation (see Custom Tool Security). For standard tools, the external model operates within the same authorization boundary as a user in Lightning Experience.

Hosted MCP connections are user-delegated. A human authenticates through the browser-based OAuth 2.0 Authorization Code Flow, and there are no service accounts or system-to-system flows. If a workload must run using service accounts, use APIs or the CLI instead. See Authentication: OAuth 2.0 and External Client Apps for more details.

Traditional API integration and agentic integration through MCP differ in one structural way that shapes every governance decision. In traditional integration, you govern the code, which decides which API is called and when. In agentic integration, you govern behavior, and the model’s reasoning determines that behavior at runtime instead of in compiled code.

This table captures the key differences.

Risk DimensionTraditional IntegrationAgentic InvocationImplication
PredictabilityDeterministic: the same input produces the same callNon-deterministic: same goal produces different tool sequence each runYou can’t pre-audit every execution path
Blast radiusBounded: each request performs a single operationUnbounded: the agent chains multiple operations autonomouslyOne misconfigured instruction can trigger a sequence of writes
AuthorizationExplicit: OAuth scopes define what the caller can doInferred: the agent derives scope from the available toolsWithout explicit scope design, there’s no hard enforcement boundary
Attack surfaceNarrow: the code and the API endpointBroad: the code, model inference, every tool output, and every retrieved data chunkEvery piece of context is a potential injection vector
Audit completenessComplete: the log captures every request and responsePartial: the log captures tool calls, but model reasoning stays internalForensics after an incident requires explicit trace capture

Agentic architectures aren’t inherently less secure, but their related security work extends beyond endpoint hardening. It also includes system prompt design, tool manifest scoping, and data boundary definition. These disciplines are new to many integration teams, and they need deliberate design at the architecture level instead of the implementation level.

The platform handles a defined portion of this work. Audit trails cover every MCP-initiated action on Salesforce-hosted servers, and FLS and sharing rules are enforced for standard tools. The platform doesn’t handle agent scope definition, HITL gate placement, or personally identifiable information (PII) protection at the data boundary. Security Architecture covers those in detail, and the Production Readiness Checklist at the end of this document lists the gates every MCP deployment passes before it reaches production.

Salesforce offers two kinds of hosted MCP server. Standard servers are prebuilt and scoped to a domain, such as SObject Reads or Data 360. Custom servers let you compose a tool from your own assets, such as Flow tools, Apex, and API Catalog endpoints.

Start with a standard server. Move to a custom server only if standard servers don’t cover your use case, or if you want to give a persona a narrower, purpose-built tool set. A custom server fits a persona whose workflow spans servers. It gives MCP clients one URL for every tool that person needs. Custom servers also expose your own Apex, Flows, Named Query APIs, or Apex REST methods as tools.

Use this table to map a use case to a server type.

Use CaseServer TypeWhy
Read-only CRM data access, such as an agent that answers questions about accounts or opportunitiesStandard: SObject ReadsEliminates modification risk. This is the recommended starting point.
Agent creates or updates records, but never deletes themStandard: SObject MutationsSupports create and update only. Deletion isn’t permitted.
Agent removes records, such as a data hygiene workflowStandard: SObject DeletesIsolates destructive capability so you can grant it only where required.
General purpose data querying and updating with full accessStandard: SObject AllConvenient, but it carries the widest blast radius. Prefer the narrower SObject servers.
Query, ingest, or activate Data 360 dataStandard: Data 360Use it in place of Data 360 Legacy, which is superseded.
Metrics, KPIs, and dashboard metadata from the semantic layerStandard: Tableau NextSemantic layer discovery and visualization metadata.
Read or author content management system (CMS) contentStandard: Content Read-Only or Content WriteSeparates read access from authoring.
Archive search or backup and recovery operationsStandard: Archive Connect or Backup and RecoverPurpose-built for data lifecycle tasks.
Multi-step business process already built as an autolaunched Flow, with branching or calloutsCustom: Flow toolReuses declarative logic without new code.
Complex calculation, custom integration, or performance-sensitive logic beyond FlowCustom: Apex Invocable Action toolExposes @InvocableMethod logic as a single, well-bounded tool.
Reuse logic from existing Lightning component controllersCustom: AuraEnabled Apex method toolMaps existing @AuraEnabled methods with no additional code.
Existing custom REST endpoints that agents callCustom: Apex REST method toolMaps existing @RestResource endpoints as tools.
Governed, predefined queries that agents run without writing their own SOQLCustom: Named Query API toolExposes your own query as a tool, so the query shape stays under your control.
Standard platform or Connect APIs combined into one persona-specific tool setCustom: API Catalog endpoint toolSelects only the registered endpoints that persona needs.

Two design rules apply when you choose a custom server. First, a custom tool hosted on the Salesforce-hosted server inherits the hosted server’s authentication, authorization, and observability, but FLS and sharing inside your Apex logic remain your job. Standard tools on hosted servers inherit FLS and sharing enforcement, but custom tools don’t, so you implement and test that security yourself (see Custom Tool Security). Second, write clear, specific tool descriptions. AI clients rely on them to select the right tool at the right time.

For setup steps, including how to add each tool type to a custom server, see the Custom MCP Servers guide. For the full list of standard servers and their tools, see the Standard MCP Servers Reference.

The CLI is the deterministic, scriptable, local-first interface to the platform. An agent or a pipeline runs a named command with explicit flags and gets predictable output, instead of reasoning over a tool catalog. CLIs cover build and ship loops (source, deploy, test, orgs, packaging) and increasingly platform admin and agent operations.

The CLI, the APIs and the MCPs are layers over the same platform, not rivals. The CLI is a client of the APIs (deploys, for example, use the Metadata and REST APIs), and MCP servers expose platform actions to agents as tools.

DimensionCLIAPIs (REST, SOAP, Bulk, Metadata, Tooling)MCP servers
Primary consumerDevelopers, CI/CD, coding agents with a shellApplications and integrationsAgents and MCP clients (Claude, ChatGPT, Cursor, Agentforce)
From where it’s calledLocal machine or CI runnerAnywhere that can make HTTPS callsSalesforce-hosted endpoint, called by the client
InterfaceNamed commands and flags, –json outputEndpoints and payloads you code againstTools discovered and called at runtime
DiscoveryHelp text and the command reference; the agent knows or looks up commandsOpenAPI and docs; developer must know the endpointsTool listing at runtime; the Salesforce MCP Server instance adds semantic discovery of actions
DeterminismHigh. Same command, same effectHigh, but you write the glue codeLower. The model chooses the tool and its arguments
AuthWeb or JSON Web Token (JWT) login, then org aliasOAuth flows, tokensOAuth to the hosted server with a human sign-in and no service accounts; user identity carries through
Best atSource deploy, retrieve, tests, scratch orgs, packaging, scripted adminCustom integrations, high-volume data, system-to-systemRuntime agents work on org data and logic with governed access
ObservabilityCommand output and CI logs; org-side audit via Event MonitoringAPI limits and Event MonitoringServer-side audit; Event Monitoring for third-party clients
Glue code neededLittle (shell scripts)MostLeast
TaskUseWhy
Retrieving, editing and deploying metadata from a repoCLISource-tracked, repeatable and testable
Running tests and quality gates in a pipelineCLI (–synchronous, –json)Deterministic exit codes and results
Validating an agent’s generated change before it landsCLI –dry-run, then deployCheck first, then change
Letting an external agent answer or act on live org dataMCPsGoverned, discoverable tools running as the user
Exposing your own Apex, Flow or Named Query API as a toolCustom MCP serverThe only way to expose your own logic on Salesforce-hosted MCP servers
Bulk data loads or system-to-system syncAPIs (Bulk, REST)Throughput and control, no model in the loop
An integration that behaves identically every timeAPIs, or CLI in a pipelineDeterminism over flexibility

MCP exposes Salesforce capabilities to any compliant client at runtime. AI Skills and Plugins address a different problem: giving the developer the right context and tooling at build time. Both are part of Headless Toolkit.

AI Skills include a growing number of prebuilt agentic skills. These skills cover Agentforce agents, Lightning apps, Flow, Apex, SOQL, LWC, UI bundles, objects and fields, permission sets, and related areas.

Each skill is a bundle of instructions, examples, and grounding content that tells an AI coding tool how to perform a specific Salesforce task. Examples include building an Agentforce agent with Agent Script or deploying metadata to a Salesforce org. Every skill packages Salesforce-specific implementation knowledge, so a coding agent (Claude, Cursor, or another compatible client) generates code that follows platform conventions on the first pass.

In practice, skills narrow the gap between “the agent can call Salesforce MCPs” and “the agent produces production-quality Salesforce code.” An agent with MCP access but no skill context can still query and invoke tools. With the relevant skill loaded, it also knows the recommended way to structure the change, whether that’s a Flow, an LWC component, or a permission set.

Popular Agentforce Development Lifecycle (ADLC) skills include:

  • agentforce-generate: Creates Agent Script (build phase)
  • agentforce-observe: Analyzes session traces (observe phase)
  • agentforce-test: Runs test suites against an agent (test and evaluate phase)

Like other agentic skills, Salesforce AI Skills don’t change the security and governance of MCP tools. A skill that invokes an MCP tool still can’t exceed the connecting user’s permissions.

Skills follow the open Agent Skills standard, so the same skill package works across Agentforce Vibes, Claude Code, Cursor, GitHub Copilot, Codex, Kiro, OpenCode, and more.

Plugins package related capabilities (like skills, MCP servers, and tools) so a coding agent can install a complete capability set in one step instead of installing each piece separately.

For example, the salesforce-development plugin installs in Claude Code in one step, so the coding agent can build, modify, debug, and deploy agents using Agent Script without requiring extra setup. To install in Claude Code, run claude plugin install salesforce-development@claude-plugins-official. The plugin is equivalent to the Salesforce Skills Library that’s pre-installed in Agentforce Vibes.

Salesforce in Claude, the Salesforce product line for sellers and revenue teams, is another example. It’s built on the Salesforce Platform and delivered through the Sales Cloud in Claude plugin. It connects Claude to your Salesforce org through a secure Salesforce MCP connection. After it’s connected, sellers and revenue teams can ask Claude about their accounts, their deals, and their pipeline. They can also use prebuilt skills to research prospects, prep for calls, build account plans, and more, all without leaving Claude. Before sellers can use Salesforce in Claude, an admin sets it up by activating the MCP Server, creating and configuring the External Client App (ECA), and connecting Claude to your org.

In a UI-first Salesforce architecture, the experience layer and the business logic layer are tightly coupled. A Flow, an Apex action, or a record update produces its result inside Lightning Experience, so the logic and the surface are part of the same delivery mechanism. Changing the surface means rebuilding the logic delivery.

Headless Toolkit separates these two concerns. Business logic, data access, and permissions are defined once in Salesforce. Salesforce Multi-Framework (MFW), controls how custom UIs are built using the frontend framework your team already uses (React and Angular) so you never replicate business rules in the frontend.

With MFW, developers build Salesforce experiences in the frameworks they work in, without being constrained to LWC or Lightning Web Runtime (LWR) templates. React and Angular are supported natively.

Salesforce UI development no longer requires Salesforce-specific frontend expertise. A frontend team that works in React can build natively in Salesforce without retraining on LWC or LWR. That shift has two architectural consequences:

  • Hiring and team composition: Frontend capacity for Salesforce-side development is no longer constrained to the pool of LWC-experienced developers.
  • Component reuse: React components built for other surfaces can be brought into Salesforce without rebuilding.

Use this table to choose between Lightning Web Component (LWC) and Multi-framework for a given UI. For each factor, find the condition that matches your situation.

Decision FactorChoose LWC when…Choose Multi-framework when…
Users and surfaceYour users are existing Salesforce users working on Lightning record pages, in App Builder, in Flows, or with packaged components. This is where LWC fits best.You are building a self-contained single-page app, a custom-branded portal, or an app with a custom user experience, including standalone apps launched from the App Launcher.
Data accessYou want to read and write Salesforce data declaratively, with the @wire decorator and Lightning Data Service (LDS) adapters.You are comfortable fetching data in your own code, with GraphQL and the Data SDK or direct REST calls using fetch. LDS adapters aren’t available.
Component reuseYou only want to reuse components inside Salesforce.You want to share components across Salesforce and non-Salesforce surfaces.

Rule of thumb:

  • Default to LWC when most surfaces are admin-composable and platform-integrated, or the team is small.
  • Choose MFW when you truly have a mixed portfolio, distinct team skills, a specific React-or-Angular only need, or a greenfield standalone app.
  • Account for the overhead each framework brings before adding a second framework. Each one adds build pipelines, security patching, design work, test tooling and on-call knowledge.

Headless Salesforce architecture changes the scope of what product designers own. In a Lightning-first deployment, the platform constrains the design space: components, layouts, and interaction patterns follow the Salesforce Lightning Design System (SLDS). In a headless deployment, the owner fully controls the frontend. The platform owns the business logic and data, and the design team manages the frontend experience.

That shift moves several design responsibilities that Lightning handles automatically:

A single agent workflow deployed across web and mobile frontends now maintains consistent behavior, because the logic is defined once in Salesforce and access is governed by the user’s permissions, field-level security (FLS), and sharing rules. Visual and interaction consistency across those surfaces is a design responsibility, not a platform guarantee.

In a headless deployment, the speed of a custom frontend depends largely on how it retrieves data from the platform APIs. Design retrieval deliberately: batch records instead of making individual record calls, cache repeated retrievals within a session, and use Named Queries for governed, predefined queries. Resource Optimization and Operational Governance covers these patterns.

In Lightning Experience, Salesforce manages accessibility conformance for standard components. In headless deployments with custom frontends, accessibility conformance for the full UI is the design team’s responsibility.

Headless Toolkit uses MCP as the default integration protocol for new agent-to-Salesforce connections. You still need an integration layer, but MCP changes where you need it and what it does.

Before MCP, every external system that consumed Salesforce capabilities required a custom connector. Each connector needed authentication handling, object model mapping, pagination logic, error recovery, and ongoing maintenance as both the external system and the Salesforce platform evolved. MCP standardizes those integration functions for Salesforce-to-Salesforce and Salesforce-to-MCP-compliant integrations. It replaces the per-connector build model with a single protocol that every compliant client shares.

In integration portfolio reviews, flag custom API layers that duplicate MCP capabilities for retirement. They carry ongoing maintenance costs for functionality the platform now provides as standard.

Use the Salesforce-hosted MCP server instead of building a custom proxy or wrapper around REST APIs. The hosted server handles authentication, authorization, and observability for you. A custom wrapper bypasses these guarantees, because it becomes a second place where you implement and audit identity, FLS, and sharing enforcement. It also adds a maintenance burden. Build a custom layer only for the capabilities the hosted server doesn’t cover, and expose them through custom tools on the hosted server where possible.

MCP doesn’t change the need to create and standardize APIs across the broader enterprise system landscape. Most companies have legacy systems with inconsistent or absent APIs, and Salesforce assumes that APIs exist on the other end of an integration. Where they don’t, that work still belongs to an orchestration layer, and MuleSoft still plays the same role there.

API orchestration is a common architectural question in headless deployments. In a headless deployment, an orchestration layer handles OAuth, rate limiting, error recovery, state, and sessions. This layer represents a substantial part of the implementation effort, which early scoping often underestimates.

With the MuleSoft Anypoint Platform, you can avoid building that entire orchestration layer from the ground up. Anypoint acts as the API orchestration layer, with prebuilt Salesforce connectors and minimal custom code. MuleSoft Omni Gateway provides centralized MCP access governance (authentication, rate limiting, PII detection, and cost management) as built-in policies applied across every MCP tool call in the estate. MuleSoft Anypoint is the recommended path if you have an existing MuleSoft footprint and a multi-vendor agent estate.

If you don’t have MuleSoft, put authentication, rate limiting, cost management, and PII detection for data that leaves the org in your own gateway or platform controls, and assign an owner for each.

Security for Headless Toolkit follows a shared responsibility model. Salesforce provides the platform controls, and you configure the identities, permissions, tool scope, approval points, and operational processes that determine how agents use those controls. A headless interaction uses the same authentication, authorization, and permission controls as a request from Lightning Experience. The entry point doesn’t matter: Claude Code through MCP, a custom React application, or an AWS Bedrock agent through Agent Fabric.

Headless architectures require explicit decisions about which agents, models, and tools can access which data and actions, and how activity is attributed to an accountable identity. These sections distinguish platform-provided controls from the controls that architects and administrators design and operate. Don’t assume that the platform handles everything, and don’t rebuild controls it already provides.

Salesforce frames trust for headless access in three pillars. The first two define who is responsible, and the third adds advanced tooling on top.

PillarResponsibilityWhat it is
FoundationalsSalesforceBuilt-in platform security that every customer gets
ConfigurablesCustomerControls you set up and operate
EnhanceablesTrusted Services (add-on products)Extra security, resilience, and compliance tooling

Headless access doesn’t bypass any of the three. Every action taken with Headless Toolkit is bound by the same FLS, sharing rules, and user and agent permissions as the rest of the platform. Teams can deploy agentic experiences without rebuilding their security models.

Foundationals are the platform security that every customer inherits. This table shows what each one means for a headless architecture.

Foundational capabilityWhat it means for a headless architecture
Isolation-centric, secure-by-design, multitenant platformAgents and external clients call into the same tenant isolation model as any other client.
Metadata-driven architectureAccess rules are defined as metadata, so agents inherit them without custom code.
HyperforceRegional infrastructure supports data residency commitments.
Host, storage, and network securitySalesforce secures the infrastructure that the MCP servers and APIs run on.
Site reliability and disaster recoveryPlatform-level availability. Customer data recovery is separate (see Backup & Recover under Pillar 3).
Secure developmentApplies to Salesforce-built components, not to your custom tools.
Third-party auditing and testingIndependent assurance of the platform.
Data residencyWhere data is stored and processed.
Compliance and certificationsInherited attestations. Confirm which ones cover each new surface at GA.
24/7 global monitoringSalesforce monitors the platform. Customer-side audit still needs Configurables and Enhanceables.
Contractual assuranceContract terms and commitments that accompany the foundation.

Foundationals don’t decide an agent’s access level in your org. That is your job, in Configurables.

Configurables are the controls you set up and operate. This table shows how to apply each one to headless and agent access.

ConfigurableHow to apply it to headless and agent access
Built-in controlsUse the platform’s native settings before you add custom logic.
Multi-Factor Authentication (MFA)Require it for human users who authorize agents, and for admins.
IP allowlistingRestrict where connections originate. Check how it fits hosted MCP servers and third-party clients.
User access controls and permission setsDefine who can use which tools.
Least-privilege accessGive each agent and integration user only what its job needs.
Auditing and Login History reportsReview who connected, from where, and when.
Health CheckMeasure the org’s security settings against a baseline, and fix drift before you open the org to agents.
EncryptionCustomer-configured encryption settings. Shield Platform Encryption is the Enhanceable that extends it.
Single sign-onKeep identity in the corporate identity provider (IdP), so MCP and API clients authenticate the same way users do.

An agent’s effective access is the intersection of its own scope and the user’s permissions. An over-permissioned user therefore stays over-permissioned through an agent, so run a permission review before you enable agent access.

Trusted Services are add-on products for security, resilience, and compliance. They matter more in a headless world, where agents operate far faster than humans. They add broader and deeper monitoring, and data recovery tools that reverse unwanted changes.

ServicePrimary jobRole in a headless architecture
Shield: Platform EncryptionProtectEncrypts sensitive data at rest beyond the default, so data reached through agents and APIs stays protected.
Shield: Event MonitoringDetect and auditThe main audit signal for third-party clients calling Salesforce MCP servers and APIs. Feed it into your security information and event management (SIEM) platform.
Shield: Data DetectDiscoverFinds where sensitive data sits, so you can scope what agents can access.
Shield: Field Audit TrailAuditRetains field history longer, so you can reconstruct what an agent changed.
Data Mask & SeedProtect (non-production)Masks sensitive data in sandboxes, so developers and coding agents build and test on realistic data without exposing production PII.
Security CenterGovernGives one view of security configuration and posture across orgs, so you can catch drift.
Backup & RecoverRecoverRestores data after an unwanted change. A bad automated change can spread quickly at agent speed.
ArchiveRetainMoves older data out of production while keeping it for compliance, which limits what agents can reach.
Privacy CenterComplyManages privacy requests and data retention policy.

For how Shield behaves in headless deployments, see Salesforce Shield in Headless Deployments.

Most real controls span all three pillars. These scenarios show how:

ScenarioFoundationalsConfigurablesEnhanceables
An external agent, such as Claude or Cursor, reads Opportunities through a Salesforce MCP serverTenant isolation and platform monitoringOAuth and SSO, permission sets, FLS, and least-privilege agent scopeEvent Monitoring for audit, and Data Detect to know what is exposed
A coding agent builds in a sandboxPlatform secure development and isolationA dedicated sandbox and a least-privilege integration userData Mask & Seed on the sandbox, and Backup & Recover as a safety net
An agent edits records in bulk by mistakePlatform availabilityApproval gates on writes and scoped permissionsBackup & Recover to restore, and Field Audit Trail to see what changed

Salesforce-hosted MCP Servers implement security across three layers that operate in sequence on every request. Understanding what each layer does, and where its responsibility ends, is the foundation for designing the controls you own.

Layer 1 (Authentication): Verifies the identity of the caller through OAuth 2.0 before any tool is accessible.

Layer 2 (Authorization): Determines what the authenticated caller is permitted to do, through OAuth scopes, app policies, and network controls.

Layer 3 (Permission Controls): Enforces granular object-level, field-level, and record-level restrictions at the data layer, using the same FLS and sharing rules that apply in Lightning Experience.

Salesforce-hosted MCP Servers support only browser-based OAuth 2.0 Authorization Code Flow. Every MCP connection requires a human to authenticate with Salesforce, and there are no service accounts or system-to-system flows. Every MCP tool call runs with the same permissions as the user who authorized the connection. The constraint is intentional. It preserves identity traceability for every action the agent takes on behalf of the authenticated user.

Proof Key for Code Exchange (PKCE) is required for all OAuth flows. Dynamic client registration isn’t supported, so a client can’t self-register. An administrator creates an ECA for every client before it can connect.

In a multi-vendor ecosystem, a request can pass through several agents, gateways, and services before it reaches Salesforce. End-User Identity Propagation in Agents describes patterns for keeping the user’s identity intact across those hops, including on-behalf-of token exchange and gateway-enforced policies.

The recommended pattern is to give each agent its own dedicated ECA. If an MCP client, such as Claude, Cursor, ChatGPT, or a custom application, runs only one agent, then that client gets its own ECA. If a client runs several agents, then each of those agents gets its own ECA. An ECA identifies the connecting application, not the tool it calls, so the ECA is the smallest unit you can revoke and attribute activity to. Don’t share an ECA across clients or agents. A shared ECA prevents you from revoking one client’s or agent’s access without affecting the others. Shared ECAs also make it difficult to attribute activity in Event Monitoring to a specific agent. With dedicated ECAs, administrators can:

  • Revoke access for a specific agent or AI client without disrupting others
  • Apply different user restrictions and network controls per client
  • Trace Event Monitoring activity to the specific agent that initiated it
  • Rotate or shorten token lifetimes independently per client

The principle is the same as in the Connected App permissioning model: treat each MCP-connected agent as a separate trust boundary with its own access controls.

By default, a refresh token has no fixed expiry. It stays valid as long as the client uses it at least once every 30 days, so an active AI client can hold one indefinitely. For production deployments, configure shorter token lifetimes (Salesforce recommends a Refresh Token Validity of 30 days or less) that suit the sensitivity of the data and operations exposed. The refresh token idle time-to-live control invalidates a refresh token that goes unused for 30 days, and each use of the refresh token flow resets that window. To de-authorize a client across all active sessions, use bulk revocation in the OAuth Usage interface.

Authentication establishes who the caller is. Authorization defines what they’re permitted to do.

Salesforce introduced a dedicated mcp_api OAuth scope for MCP server access. It grants MCP server connectivity without exposing the full Platform API permission set. Use it as the baseline for MCP-connected clients instead of broader API scopes. It reduces the authorization surface to what MCP interactions require.

By default, all users in the org can connect to an activated MCP server. With app policies, administrators can restrict access to users with specific profiles or permission sets, so the eligible user population is narrowed before a connection attempt is made. For production deployments, pre-authorization to a defined user set is the correct starting posture. Open access to all org users is appropriate only for developer sandbox contexts.

You can apply IP range restrictions globally or per profile through Network Access settings. Some agent deployments have a known network boundary, such as agents running in a private cloud environment with stable egress IPs. For those, IP restrictions add a network-level control that’s independent of the OAuth layer.

After a request passes authentication and authorization, the platform applies the full Salesforce permission model before any data is returned or any action is executed.

FLS and sharing rules are enforced at request time using the authenticated user’s permission set. An agent that can’t read the Account’s Annual Revenue field for the authenticated user in Lightning Experience can’t read it through MCP either. A developer using Cursor to update an Opportunity generates the same sharing rule evaluation as a sales rep editing the record manually. The permission model is inherited from org metadata, not re-implemented per integration.

Object-level Create, Read, Update, and Delete (CRUD) permissions apply to every MCP tool invocation. An agent calling sobject-mutations on an object the authenticated user doesn’t have Edit access to receives the same permission error as a direct API call with insufficient rights.

Custom MCP tools, such as Apex Invocable Actions, Named Query APIs, and Apex REST methods exposed through the API Catalog, require explicit security implementation. The platform doesn’t automatically apply FLS and sharing rule enforcement to custom Apex code the way it does to standard SObject operations. Build Apex permission checks and Flow-based access validation into custom tools, suited to the operations they expose. Use the runAs method in Apex tests to simulate varied permission levels, and validate that each tool behaves correctly for users with different access profiles before deployment.

Important constraint: Security inheritance applies to Salesforce-hosted MCP servers. Custom or third-party MCP servers don’t inherit these controls automatically and need explicit security implementation at the server level.

Annotations and granularity shape how safely a client uses a custom tool. MCP defines four boolean hint fields that tell clients what a tool does, so they can decide when to prompt for confirmation:

  • readOnlyHint: Set to true for read operations, such as SOQL queries and schema lookups.
  • destructiveHint: Set to true for operations that delete or irreversibly change data.
  • idempotentHint: Set to true when repeating the call with the same arguments has no additional effect.
  • openWorldHint: Set to true when the tool interacts with systems outside the org.

For custom tools backed by Flow tools, Apex, or REST endpoints, set conservative defaults. Assume that a tool isn’t read-only and is destructive until you’ve verified otherwise. Annotations guide the client; they don’t enforce access. The permission set remains the enforcing control, and accurate annotations help an MCP client place its own confirmation prompts, which complement the HITL gates you design.

Design tools at the correct level of grain. Two extremes cause problems:

  • Subatomic tools: Tools that require a prescribed call sequence produce incomplete results when the agent skips or reorders a step, and they multiply API calls per interaction.
  • Bundled workflows: Tools that wrap many steps into one call reduce flexibility and remove the agent’s ability to intervene between steps.

Aim for tools that return self-contained, reasonable results. Start with coarser tools and refine only if testing shows the agent needs finer control.

Use an incremental permission strategy. Start with the read-only SObject Reads server, which eliminates modification risk, and add write-capable servers only when a use case requires them. For controlled data access, expose Named Queries instead of open-ended SOQL. For narrow operations, build custom tools from Apex Invocable Actions, REST endpoints, or Flows, and restrict who can reach them through ECA policies linked to specific profiles and permission sets.

Beyond the three-layer defense model, Salesforce records headless interactions in its audit logs. The Setup Audit Trail and Event Monitoring log every action taken through a headless interaction on Salesforce-hosted MCP servers, exactly as if a human user performed the action in Lightning. MCP-initiated record changes generate the same audit records as manual edits.

Where Event Monitoring is available (it requires the Salesforce Shield add-on), it captures MCP server activity automatically. Filter by API_CLIENT_CATEGORY = SALESFORCE_HOSTED_MCP to isolate MCP-initiated activity from other API traffic. Each event record includes the authenticated user, affected objects, status codes, and the originating IP address. That’s sufficient for routine compliance monitoring, and the event record is the starting point for incident investigation.

The three-layer defense model and the platform’s audit controls handle a well-defined portion of the security architecture. Several concerns fall outside the platform boundary and need deliberate design.

The platform enforces what an agent can do within its permitted scope. Defining that scope is your architecture decision. An agent provisioned with access to all MCP tools has a blast radius that spans every record, Flow, and Apex action in the org. Define the minimum tool set each agent needs for its intended function.

You control how narrow an agent’s reach is at four levels:

  • Server Activation: Only activate the servers the agent needs. An inactive server exposes no tools.
  • ECA and App Policies: A dedicated ECA per agent, with app policies limiting which profiles or permission sets can connect, controls which clients and users can reach an activated server.
  • Permission Sets: Object, field, and record permissions determine what a tool call can do. A tool that’s visible to the agent still fails if the authenticated user’s permission set doesn’t allow the underlying operation.
  • Agent Instructions: Restrict the tools the agent is instructed to use to the list you define.

Treat the permission set as the enforcing control. If a server exposes tools the agent doesn’t need, make sure that the permission set denies the underlying access, for example no Delete permission on objects for a case creation agent.

Use these steps to minimize scope for each agent.

  • Start with read-only servers (such as SObject Reads), and add write-capable servers only when the use case requires them.
  • List every MCP tool the agent needs for its intended function, and add nothing beyond that list.
  • Confirm that the tool set matches the functional scope. For example, a case creation agent has no functional need for SObject Deletes access.
  • Define the OAuth permission set and ECA explicitly. Don’t rely on a default permission profile.
  • Document the scope and its rationale as an architecture artifact.
  • Review and revalidate the scope at every significant functional change to the agent.

The platform doesn’t define where human review is required in an agent workflow. For any operation with irreversible or significant consequences, such as contract execution, financial transactions, bulk record deletion, or regulated data access, design an explicit HITL gate. Design HITL gates as part of the interaction model. Use them when autonomous execution is inappropriate for the current confidence or risk level, not only after agent failures.

Build each gate so the agent doesn’t proceed without an explicit human approval, and so the approval fires back to trigger the downstream Salesforce workflow. The audit trail captures the approval event with the approver’s identity, the timestamp, and the action taken.

In headless deployments, every piece of retrieved data in the agent’s context window is a potential injection vector. An instruction embedded in a retrieved knowledge article, a record field, or an external data source can attempt to redirect agent behavior. Where you can act depends on where the agent’s reasoning runs. For Agentforce agents, defense begins at the agent configuration level: constrained topics and system prompt hardening. For external clients such as Claude, Cursor, or ChatGPT, the reasoning runs outside Salesforce, so you don’t control the prompt or topics. The controls you still own are on the Salesforce side: minimize tool scope and permissions, expose Named Queries instead of open-ended SOQL, and put human-in-the-loop (HITL) approval gates on writes.

Salesforce authentication controls who reads CRM data. It doesn’t control where that data goes after it leaves the org. For any deployment where agent-retrieved data transits through external systems, MuleSoft Omni Gateway with inline PII detection closes this gap at the data boundary.

Two specific conditions increase in headless deployments and are worth designing for explicitly.

Misconfigurations Surface Faster. A misconfigured sharing rule in a browser-based deployment can result in a user seeing a record they shouldn’t. The same misconfiguration on an MCP-connected agent means every request from that agent operates under it at machine speed, across every accessible record, without a human noticing. The misconfiguration is the same. The exposure rate is not.

Agents Can Exhaust Shared API Quota. Agent-driven usage can exhaust API quotas under load and affect every other system that depends on Salesforce APIs. Resource Optimization covers the risk scenarios and controls in API Quota as an Operational Risk Vector.

Traditional Salesforce resource optimization is primarily a developer discipline: write selective queries, optimize Apex code for bulk processing, and stay within governor limits per transaction. The resource consumption profile is largely predictable, bounded by the rate at which humans interact with the system.

Headless Toolkit changes this in a specific way. Agents operate at machine speed, invoke multiple tools per interaction, and run across many interactions simultaneously. Consumption is non-deterministic: the same goal can produce different tool sequences on different runs, with no human invoking it. A network of agents processing a high-volume use case can exhaust API quota or Large Language Model (LLM) context budget in minutes, under conditions that take days to replicate with browser-based users.

These sections cover four resource optimization responsibilities: API quota optimization, API quota risk, Data 360 Query efficiency, and computational waste. The Production Readiness Checklist at the end of this document lists their go-live gates, along with gates for LLM efficiency. Treat each one as a deployment gate, not a post-launch tuning exercise.

Standard CRM operations, such as SObject queries, Flow invocations, Apex calls, and metadata operations, consume API quota under the org’s existing edition limits. In a browser-based deployment, human interaction speed naturally paces this consumption. In a headless deployment with active agents, a single agent interaction can generate tens of API calls in seconds. Multiple agents running simultaneously multiply that rate across the org’s shared quota pool.

The optimization levers for API quota are architectural.

  • Use Flow, Apex, Workflows, and similar tools over agents when they’re functionally equivalent. The Atlas Reasoning Engine is the core decision engine behind Agentforce. It makes it possible for an agent to understand a request, plan the next steps, and take actions. A Flow invocation that achieves the same result as an Atlas Reasoning Engine call costs API quota, not Flex Credits. If the business logic is fully deterministic and doesn’t require reasoning, route the interaction through Flow, Apex, or Workflows. Routing logic is both a consumption decision and a performance decision, because calls to Flow, Apex, and Workflows are faster and more predictable.
  • Batch records instead of making individual record calls. For any agent operation that processes multiple records, Bulk API 2.0 processes millions of records with significantly lower API consumption than equivalent per-record REST calls. Design agent tool invocations that handle collections where the use case permits.
  • Use Change Data Capture instead of polling. For agents that detect CRM state changes, subscribe to Change Data Capture (CDC) events instead of polling with repeated SOQL queries. Polling calls that check for updates that don’t exist consume quota without returning value, and CDC eliminates them.
  • Use Composite API for multi-step transactions. Where an agent interaction requires multiple sequential operations, Composite API executes them in a single API call. A record creation, query, and update that separately consume three API calls can be consolidated into one.

Beyond steady-state consumption, headless deployments introduce three specific API quota risk scenarios that have no direct analogue in browser-based architectures.

An agent with a logic error, misconfigured retry policy, or unexpected input can enter a loop that exhausts API quota at machine speed. Unlike a human clicking through Lightning Experience, a runaway agent has no natural throttle. Within minutes, it can exhaust an org’s daily API allocation, which affects every other system that depends on Salesforce APIs, along with the agent workload that triggered the problem.

Three architectural controls apply.

  • Rate-limit per agent through MuleSoft Omni Gateway. Native org-level API limits don’t enforce per-agent circuit breaking. MuleSoft Omni Gateway applies spike control policies per agent, which prevents any single agent from consuming more than a defined share of available quota, regardless of what its reasoning produces. Omni Gateway is the primary control for runaway agent scenarios.
  • Review the retry policy in every agent configuration. Every agent configuration that includes a retry policy needs an explicit review of that policy. An aggressive retry on a transient error that recurs persistently turns a recoverable failure into a quota exhaustion event.
  • Alert on org-level quota at defined thresholds. Configure alerts at 50%, 75%, and 90% of daily API quota. At 75%, investigate which agents are consuming the highest volumes. At 90%, take an immediate response action, such as throttling or temporarily suspending the highest-consuming agents.

Agent reasoning paths are non-deterministic. Under specific input conditions, an agent designed for a narrow use case can trigger a wider array of tools than initially planned. That produces more API calls per interaction than the design anticipated. That’s emergent behavior within the agent’s defined permissions rather than a malfunction.

The control is to validate actual tool call patterns in a PoC, instead of relying on designed tool call patterns. Testing Center is where you evaluate an Agentforce agent at scale before it goes live. It runs batches of test conversations and scores behavior such as subagent selection, action execution, knowledge retrieval, accuracy, and latency. Use it to run high-volume simulations and observe actual tool selection behavior across the full range of inputs the agent encounters in production. Design-time assumptions about which tools an agent calls are no substitute for observational data.

In a multi-agent estate, high-volume agents and lower-volume agents share the same org-level API quota pool. Without prioritization, a high-volume batch agent processing a bulk operation can exhaust the quota that time-sensitive customer-facing agents depend on.

The mitigation is to design the agent estate with quota prioritization in mind. Use MuleSoft Omni Gateway policies that reserve quota for time-sensitive agent classes, or schedule high-volume batch agent operations during off-peak hours when interactive agent demand is lower.

Agents that retrieve unified customer data through Data 360 add load and latency with every query. These levers keep retrieval efficient.

  • Scope Data 360 queries precisely. A query that retrieves a broad unified customer profile when the agent needs only three fields returns more data than the interaction requires. Define the minimum data scope for each agent interaction, and apply it at the query design level instead of after the fact.
  • Prefer real time only when it delivers measurable value. When near-real-time data is adequate for agent interactions, such as case history, account tier, and historical purchase patterns, route against pre-computed calculated insights instead of real-time unified profiles. Reserve real-time queries for interactions where the immediate data state materially affects the agent’s output.
  • Cache repeated retrievals within interaction sequences. An agent that retrieves the same customer profile at multiple steps within a single session doesn’t need to re-query Data 360 each time. Session-scoped caching eliminates redundant retrievals without affecting data freshness for the user-facing output.
  • Validate actual retrieval patterns in a Developer Edition proof of concept (PoC) before go-live. Retrieval volume depends on actual query patterns, data volumes, and reasoning depth, not on design-time assumptions. PoC shows which MCP tools an agent calls and how often.

The sustainability principle from traditional resource optimization, eliminating computational waste, applies directly to agent deployments through three specific patterns.

Agents that are no longer actively used but remain provisioned still consume ECA slots and permission set assignments, and they can trigger credential renewal overhead. MCP servers that are activated but not connected to any active agent create an unnecessary access surface. Review the agent estate quarterly: deactivate agents whose use cases have been retired, remove ECA access for decommissioned tools, and deactivate MCP servers with zero recent activity in Event Monitoring.

Run batch agent operations, such as bulk data enrichment, scheduled analysis across large record sets, and nightly report generation, during off-peak hours. High-volume batch operations that run during business hours compete with time-sensitive customer-facing agent interactions for the same API quota pool. Stagger scheduled agent jobs across time windows instead of concentrating them at midnight.

Agents configured with overlapping tool access or redundant reasoning steps process more tool calls per interaction than necessary. Consider an agent that queries the same Data 360 profile three times in a single interaction, because three separate reasoning steps each trigger a fresh retrieval. The agent makes three calls where one call meets the need. Review agent configurations for redundant retrieval patterns, and consolidate where the data retrieved is the same across multiple steps.

In UI-first Salesforce architectures, observability is largely a platform side effect. User actions in Lightning Experience generate audit records automatically. Flow errors surface in debug logs. Page-level interactions are captured in Event Monitoring without instrumentation work. Customers can also instrument custom components using a lightning logger (and have that event type surfaced back to them via event monitoring).

In headless architectures, the observability surface expands significantly. An agent interaction can span multiple MCP tool calls, an Atlas Reasoning Engine’s reasoning cycle, one or more Flow invocations, and a human approval event. Those events can cross multiple systems and potentially multiple vendors. The platform captures each of these events individually. Assembling them into a coherent, end-to-end picture of what an agent did, why, and with what result takes deliberate instrumentation design, beyond enabling the default logging.

The distinction between deterministic and non-deterministic systems also matters here. In a traditional API integration, a specific input reliably produces a specific sequence of calls, and the audit trail is structurally predictable. In an agent interaction, the same goal can produce a different tool call sequence on different runs. In agentic deployments, observability captures what happened and enough context to understand why the agent took a specific reasoning path. That context is the forensic requirement after any unexpected result.

Salesforce provides observability and governance capabilities, described here as Event Monitoring (MCP) and Salesforce Shield, that together address this requirement. Event Monitoring is itself one of the Shield products, so the table separates the operational activity log from the wider Shield compliance suite. Each has a specific role in the observability stack. Instrument each one from the first production deployment instead of adding it as a hardening step after an incident.

CapabilityPrimary useScope
Event Monitoring (MCP)Operational activity log for all MCP-initiated actionsPer-tool-call records with user, object, status, IP
Salesforce ShieldRegulated industry compliance: encryption, extended retention, field auditField-level encryption, long term field history

Event Monitoring is the Salesforce platform-level audit and activity logging system. In headless deployments, it serves as the primary operational log for all MCP-initiated activity. Each event record captures the authenticated user, affected objects, status codes, originating IP address, and timestamp.

For headless deployments, Event Monitoring needs specific configuration to provide a useful signal.

  • Filter by API_CLIENT_CATEGORY = SALESFORCE_HOSTED_MCP to isolate MCP-initiated activity from other API traffic in the log.
  • Where dedicated External Client Apps are configured per agent (as Security Architecture recommends), filter by ECA to isolate activity per agent.

Event log data is accessible through the Event Log File Browser for ad hoc investigation. Some production deployments need continuous monitoring instead of on-demand investigation. For those, route Event Log File data to an external security information and event management (SIEM) or observability platform through the Event Log File API or a MuleSoft connector.

Event Monitoring captures that a tool call occurred and what its immediate effect was. It doesn’t capture the internal reasoning sequence of the Atlas Reasoning Engine. For an investigation that requires understanding why an agent took a specific action, Event Monitoring is the starting point, not the complete picture.

Salesforce Shield is a suite of platform security and compliance products, including Platform Encryption, Event Monitoring enhanced retention, and Field Audit Trail. In headless deployments, these behave the same way they do in browser-based deployments.

Platform Encryption provides field-level encryption for sensitive data at rest. MCP-initiated reads and writes respect the encryption configuration. Encrypted fields aren’t exposed to agents operating outside the authorized decryption scope, exactly as they aren’t exposed to users without the Manage Encryption Keys permission in Lightning Experience.

Shield extends Event Monitoring data retention and provides access to additional event log types that the standard Event Monitoring tier doesn’t include. For regulated deployments that need extended log retention for compliance, the Shield Event Monitoring tier provides the retention period required.

Field Audit Trail makes it possible for you to define a retention policy for field history. The policy sets how many months field history stays in Salesforce before it is archived, and by default archived data isn’t deleted automatically, so it stays until you delete it. It records agent-driven field modifications with the same precision as manual entries, which supports long-term change history compliance obligations in highly regulated sectors such as healthcare, legal, and financial services.

For regulated industry deployments, evaluate Shield requirements alongside the core deployment architecture instead of adding Shield after go-live. The encryption, retention, and audit trail configurations affect how agent-readable data is structured and what compliance evidence is available.

The observability capabilities in this section provide the data for incident investigation. Turning that raw material into an effective incident response capability requires design work before any incident occurs.

Session Tracing is the observability layer for Agentforce. It records a full, step-by-step history of what an agent does during a session and stores it in a structured data model in Data 360.

To define each production agent’s investigation sequence before go-live, answer these questions.

  • Which Event Monitoring filters isolate this agent’s activity?
  • Which Session Tracing records reconstruct a specific interaction?
  • Which Testing Center configuration reproduces the interaction for analysis?
  • Who is the accountable owner for this agent’s behavior, and what is their escalation path?

An investigation that answers these questions for the first time under pressure is significantly slower and less reliable than one that follows a predefined playbook.

For each production agent, document the Testing Center scoring results at go-live as the baseline. Define what counts as a regression, such as a specific drop in tool selection accuracy or a specific increase in unexpected reasoning paths. Then define the response action when the baseline is breached. Without a documented baseline, “the agent is behaving differently than it used to” isn’t an actionable incident report.

Well-designed HITL gates prevent a significant category of incidents, such as irreversible actions taken on incorrect agent reasoning, from becoming incidents at all. For operations teams, the HITL audit trail (who approved what, when, and on which surface) is also the evidence base for any investigation into an approved action that produced an unexpected result. Design HITL approval records as compliance evidence and workflow controls.

Three gaps cut across the observability capabilities in this section:

  1. Signals are fragmented per cloud. None of the existing native capabilities provides one aggregated view. To get one, build a custom Tableau or SIEM dashboard over data from multiple components.
  2. No shared prompt-to-response identifier exists. No built-in trace ID or correlation ID currently stitches the cross-system journey together.
  3. MCP tools aren’t natively attributed. For attribution, use one dedicated External Client App per agent, and filter Event Monitoring by ECA. The approach approximates per-agent activity visibility rather than providing it natively, so don’t share an ECA across multiple agents.

This checklist gathers the go-live gates for a headless deployment into one place. Each item is a binary check and a deployment gate. Treat unchecked items as blockers, not post-launch tasks.

  • Dedicated External Client App (ECA) created per agent (at minimum, per MCP client, not shared). The same ECA is the foundation for per-agent activity attribution in Event Monitoring.
  • mcp_api scope configured as the baseline OAuth scope for each ECA.
  • PKCE enabled on each ECA. Clients can’t self-register through dynamic client registration.
  • App policies configured to restrict access to the defined user set, not open to all org users.
  • IP range restrictions applied where the network boundary is known and stable.
  • All MCP servers confirmed inactive by default, with only explicitly required servers activated.
  • FLS and sharing rules reviewed for programmatic access patterns and human user workflows.
  • Least-privilege MCP tool set, OAuth scopes, and permission sets defined per agent before go-live, with the same rigor as a Connected App permissioning exercise.
  • Custom MCP tools validated with runAs tests across relevant permission profiles.
  • Custom MCP tools annotated (readOnlyHint, destructiveHint, idempotentHint, openWorldHint), with conservative defaults where behavior isn’t verified.
  • Custom tool granularity reviewed: no subatomic tools that need a prescribed call sequence, and no bundled workflows that remove agent flexibility.
  • Deployment started with read-only servers, with write-capable servers added only for defined use cases.
  • Hosted MCP server used instead of custom API wrappers wherever the hosted server covers the capability.
  • Org-level API quota alerting configured at 50%, 75%, and 90% of the daily limit, with an escalation action at each threshold.
  • Per-agent rate limiting and quota governance configured through MuleSoft Omni Gateway for production agent networks.
  • Retry policies reviewed on all agent configurations, with aggressive retry on recurring errors identified and addressed.
  • High-volume batch agent operations scheduled for off-peak hours.
  • Quota prioritization defined between time-sensitive interactive agents and batch agents that share the same org.
  • Agent system prompts reviewed for unnecessary verbosity, with content that doesn’t affect behavior removed.
  • Conversation history summarization implemented for multi-turn agent interactions that exceed 10–15 turns.
  • Model selection validated against use case complexity, with smaller models evaluated for lower-complexity interactions.
  • Semantic caching evaluated for high-volume interactions with repeated, semantically similar queries.
  • Agent credential inventory (ECA, OAuth token, and permission sets) documented with a named owner per agent.
  • Refresh token lifetimes reviewed and shortened from the default (no fixed expiry while the client keeps using the token) to the shortest period appropriate to the deployment context.
  • Process defined for reviewing and revoking MCP tool access, with connected agent credentials held to the same hygiene as service accounts.
  • Agent scope review cadence defined, for example at every significant functional change and quarterly otherwise.
  • Decommission process defined for retired agents, including credential revocation, ECA removal, and MCP server deactivation.
  • Quarterly agent estate audit scheduled for inactive agents, deactivated MCP servers, and redundant automation.
  • Event Monitoring configured with the API_CLIENT_CATEGORY = SALESFORCE_HOSTED_MCP filter for MCP activity isolation.
  • Audit logging enabled for all agent-initiated record changes.
  • Session Tracing enabled for conversation-level compliance coverage in regulated deployments.
  • Testing Center configured for pre-deployment reasoning validation, with scheduled runs for ongoing reasoning quality monitoring.
  • Data quality baselines established in Data 360 for all entities that agent interactions depend on, before autonomous actions are enabled.
  • Data quality monitoring instrumented with a defined response process for regressions, treated the same as API or infrastructure incidents.
  • Per-agent circuit breaking policies defined and configured before production go-live.
  • Response playbook defined for runaway agent scenarios: who identifies it, who throttles it, and what the investigation sequence is.
  • HITL gates designed for all agent actions with irreversible or significant consequences.
  • PII boundary protection evaluated, including whether the deployment context needs MuleSoft Omni Gateway.

Standard MCP Servers Reference

AIforce Release Notes

Salesforce Headless Toolkit Developer Resources

Which MCP Server Should I Use?

Custom MCP Servers

Hosted MCP Server Security Best Practices

End-User Identity Propagation in Agents

Trailhead: Introduction to AIforce

Trailhead: Use a Conversation to Build an Agent: Hands-On Challenge

Gulal Kumar is a Software Engineering Architect at Salesforce with over 20 years of experience. His expertise spans AI, integration, APIs, and enterprise architecture, with a focus on driving business transformation through secure, resilient, and innovative AI solutions. Follow him on LinkedIn.