MCP Servers and Project Context

The Salesforce Development plugin uses Salesforce CLI and configured Model Context Protocol (MCP) tools for development tasks. A configured server can still be unavailable because of authentication, permissions, or client sandbox restrictions.

MCP server configuration can change between plugin releases. Check the configuration shipped with your installed plugin:

  • Claude Code: .mcp.json
  • Codex: .codex-plugin/plugin.json

For the latest public configuration, see the Claude Code MCP manifest and Codex plugin manifest. Use the plugin README and changelog to check requirements and changes for your installed version.

Confirm server status and authentication in your coding client. Verify compilation, tests, and deployment with Salesforce CLI even when MCP diagnostics are available.

The salesforce-metadata-grounding MCP server finds existing org metadata by meaning when you don’t know its exact API name. Use platform-metadata-discovery-get to choose a discovery method and platform-metadata-grounding-get to find metadata such as objects, fields, flows, and Apex classes by what they store or do. See Find Existing Metadata for an example.

Grounding requires Salesforce Catalog provisioned in the selected org. To prepare the org:

  1. Ask an administrator to enable Salesforce Catalog through Feature Manager in Data Cloud Setup. Enabling Catalog requires a Data Cloud license.
  2. In the org’s Setup Quick Find, search for MCP Servers and activate metadata-grounding.
  3. Ask the agent to check Salesforce setup or status. Verify that the grounding tools are available in your coding client.

Grounding is optional. Setup and status report a separate grounding connection row, and a warning doesn’t block scaffolding or other development. If the server isn’t available, the grounding workflow can use the Salesforce MCP (Headless 360) connection when available. If grounding isn’t available through either connection, the discovery workflow falls back to name and label matching. A missing connection or an access error doesn’t prove that the metadata doesn’t exist.

In Codex, the adapter binds the session to a Salesforce DX project and one explicit org. Target selection uses:

  1. SF_TARGET_ORG or SFDX_TARGET_ORG, if set. If both are set, they must identify the same target.
  2. The project’s .sf/config.json target-org value, or the legacy .sfdx/sfdx-config.json defaultusername value. The .sf configuration takes precedence.

The adapter doesn’t use a global default org. Missing or conflicting targets prevent the bundled Codex MCP launchers from starting; correct the project configuration or environment before retrying. See Set Up a Salesforce DX Project and Development Org.

The Codex startup banner reads local project facts and the configured alias without querying the org. Ask for Salesforce status when you need live org details.

Codex sandbox restrictions can prevent configured MCP servers from accessing stored Salesforce credentials. When a tool is unavailable, use Salesforce CLI or packaged references for the task. Don’t assume that a configured server has authenticated access.

Before deployment, verify the target org and review the proposed changes. Production deployment requires explicit confirmation. Unknown org types aren’t eligible for automatic deployment, and Codex post-edit automatic deployment is disabled. See the configuration reference for deployment controls.

Use platform-metadata-deploy for the production validate → quick-deploy workflow.

In Codex, confirm a production deployment with the entire reply confirm production deploy to <alias>, replacing <alias> with the exact org alias. The confirmation covers one deployment in the current session and expires after ten minutes. Inline override flags don’t count as confirmation.

Use one literal deploy or delete command per shell call, from the session’s working directory. Inline context changes and opaque shell execution are denied. Verify active hooks through /hooks; hook startup failures and host timeouts are outside the adapter’s guarantee that deployment checks will block unsafe commands.

The optional Headless 360 MCP Server (Beta) supports live Salesforce Setup workflows when an installed skill or purpose-built Salesforce CLI command doesn’t answer the question. It defaults off. Local enablement and org activation are separate steps.

  1. Ask an administrator to activate the server in the target org. In Setup Quick Find, search for MCP Servers, select MCP Servers under API Catalog, and enable the Headless 360 server. Activation can take up to two minutes.
  2. Enable the connection in your coding client:
    • In Claude Code, enable Headless 360 MCP server in the plugin settings.
    • In Codex CLI or desktop, ask the agent to enable Headless 360 with platform-headless-360-integrate. The workflow saves a local preference shared by both Codex clients. No shell export is required.
  3. Start a new session in your Salesforce DX project with the target org configured. The bundled connection uses your Salesforce CLI org login. A manually registered connection uses the separate OAuth setup described in the server guide.
  4. Ask the agent to check Headless 360 status and verify that the tools are available in the client. A reachable endpoint alone doesn’t prove that the client exposes its tools.

Headless 360 uses discover and describe to find and inspect an operation before calling it. Reads use dispatch_readonly. Every call through dispatch requires explicit approval after you review the target org and proposed request. After a change, verify the resulting org state. Optional connection warnings don’t block other development work.