Use MCP Tools for Mobile LWC and Offline Development (Beta)

The Mobile Model Context Protocol (MCP) tools, which include the Mobile Offline tools and the Mobile Native Capabilities tools, help developers create Lightning web components that adhere to Mobile Offline design patterns and integrate with device-native features.

We recommend that you use the MCP tools through Agentforce Vibes Extension. This setup offers the most integrated and robust experience, including real-time code analysis, context-driven completions, and direct access to Salesforce data models.

The Salesforce DX MCP Server and its tools are beta. Within the context of the DX MCP Server, tools are categorized as those that are fully ready to use (GA) and those still in preview (NON-GA).

Note

For developers using other clients, such as VS Code with Copilot or Cursor, install the Salesforce DX MCP Server to enable the Mobile MCP tools.

Mobile Toolset

The mobile toolset provides tools to assist in creating Lightning web components that integrate with device-native capabilities such as calendar access, contact access, and document scanning.

Mobile Core Toolset

The mobile-core toolset contains a subset of tools from the mobile toolset focused on development, testing, and optimization of offline capable Lightning web components and the most essential device-native capabilities such as barcode scanning, location services, and biometric functionality.

Add the Salesforce DX MCP Server to Your MCP Client

The Salesforce DX MCP Server is an npm package called @salesforce/mcp. Adding the DX MCP Server to an MCP client typically involves updating a JSON file that tells the MCP client how to run the @salesforce/mcp package using npx and specifying the args option to configure the DX MCP Server. We recommend that you also use the @latest tag (@salesforce/mcp@latest) so you always get the latest version of the DX MCP Server.

While each MCP client has different JSON files, the format of the args option is always the same. The example below uses Visual Studio Code (VS Code) with GitHub Copilot to configure the mobile and mobile-core toolsets by adding a .vscode/mcp.json to the root of the DX project.

1{
2  "servers": {
3    "Salesforce DX": {
4      "command": "npx",
5      "args": ["-y", "@salesforce/mcp@latest", 
6               "--orgs", "DEFAULT_TARGET_ORG", 
7               "--toolsets", "orgs,metadata,mobile,mobile-core", "--allow-non-ga-tools"]
8    }
9  }
10}
11

For more information on how to update the JSON file for other popular MCP clients (Cursor, Cline, etc.), see Install and Configure the Salesforce DX MCP Server (Beta).