A collection of Model Context Protocol (MCP) tools for Salesforce Mobile Web applications. These tools provide expert grounding for implementing various mobile capabilities in Salesforce Lightning Web Components (LWC).
- App Review: Implement app store review functionality
- AR Space Capture: Capture and process AR space data
- Barcode Scanner: Scan and process barcodes
- Biometrics: Implement biometric authentication
- Calendar: Access and manage device calendar
- Contacts: Access and manage device contacts
- Document Scanner: Scan and process documents
- Geofencing: Implement location-based geofencing
- Location: Access device location services
- NFC: Implement NFC functionality
- Payments: Process mobile payments
- Visual Studio Code or Cursor IDE (for debugging)
- Clone the repository:
git clone https://github.com/forcedotcom/mobile-mcp-tools.git
cd mobile-mcp-tools
- Install dependencies:
npm install
To use this MCP server with various AI assistants and code editors, you'll need to add it to their MCP configuration files. Below are instructions for the most popular MCP-compatible clients.
-
Locate your configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
-
Add the server configuration:
{ "mcpServers": { "mobile-web": { "command": "npx", "args": ["-y", "@salesforce/mobile-web-mcp-server"], "env": {} } } }
Or if you're running from a local build:
{ "mcpServers": { "mobile-web": { "command": "node", "args": ["./packages/mobile-web/dist/index.js"], "env": {} } } }
-
Restart Claude Desktop completely to load the new configuration.
Add this configuration to your Cursor mcp.json
file (typically located in the .cursor
directory):
{
"mcpServers": {
"mobile-web": {
"command": "npx",
"args": ["-y", "@salesforce/mobile-web-mcp-server"],
"env": {}
}
}
}
Add this configuration to your Cline MCP settings file:
- Windows:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
- macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
"mcpServers": {
"mobile-web": {
"command": "npx",
"args": ["-y", "@salesforce/mobile-web-mcp-server"],
"env": {}
}
}
}
Add this configuration to your Windsurf mcp_config.json
file:
- Windows:
%APPDATA%\WindSurf\mcp_settings.json
- macOS:
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mobile-web": {
"command": "npx",
"args": ["-y", "@salesforce/mobile-web-mcp-server"],
"env": {}
}
}
}
Add this configuration to your Zed settings.json
:
{
"context_servers": {
"mobile-web": {
"command": {
"path": "npx",
"args": ["-y", "@salesforce/mobile-web-mcp-server"],
"env": {}
}
}
}
}
If you're running from a local build instead of the npm package, replace the command configuration in any of the above clients with:
{
"command": "node",
"args": ["./packages/mobile-web/dist/index.js"],
"env": {}
}
Make sure to adjust the path relative to where you're running the client from.
Once configured, you'll have access to the following mobile capability tools:
- App Review (
sfmobile-web-appReview
): App store review functionality - AR Space Capture (
sfmobile-web-arSpaceCapture
): AR space data capture - Barcode Scanner (
sfmobile-web-barcodeScanner
): Barcode scanning - Biometrics (
sfmobile-web-biometrics
): Biometric authentication - Calendar (
sfmobile-web-calendar
): Device calendar access - Contacts (
sfmobile-web-contacts
): Device contacts management - Document Scanner (
sfmobile-web-documentScanner
): Document scanning - Geofencing (
sfmobile-web-geofencing
): Location-based geofencing - Location (
sfmobile-web-location
): Device location services - NFC (
sfmobile-web-nfc
): NFC functionality - Payments (
sfmobile-web-payments
): Mobile payment processing
After adding the configuration and restarting your client:
- Claude Desktop: Look for the mobile-web tools in the tools panel when starting a new conversation
- Cursor: Check that the MCP server appears in your MCP status indicator
- Cline: The tools should be available in the Cline sidebar
- Windsurf: MCP tools will appear in the context menu
- Zed: Context servers will be shown in the status bar
You can test that the server is working by asking your AI assistant to:
"Show me how to implement biometric authentication in a Salesforce Lightning Web Component"
The assistant should use the biometrics tool to provide you with detailed implementation guidance including type definitions and code examples.
Build all packages:
npm run build:all
Run all unit tests:
npm run test:all
The project includes a VS Code/Cursor debug configuration for testing with the MCP Inspector:
- Set breakpoints in your TypeScript files
- Press
F5
or selectRun > Start Debugging
- The debugger will start and attach to the MCP server
You should see the following output:
Starting MCP inspector...
Debugger attached.
⚙️ Proxy server listening on port 6277
Debugger attached.
🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀
- Open the MCP Inspector URL (e.g., http://127.0.0.1:6274)
- Click "Connect" to connect to the MCP server
packages/
mobile-web/
src/
tools/ # Tool implementations
appReview/ # App Review tool
arSpaceCapture/# AR Space Capture tool
barcodeScanner/# Barcode Scanner tool
biometrics/ # Biometrics tool
calendar/ # Calendar tool
contacts/ # Contacts tool
documentScanner/# Document Scanner tool
geofencing/ # Geofencing tool
location/ # Location tool
nfc/ # NFC tool
payments/ # Payments tool
utils/ # Utility functions
resources/ # Type definitions
tests/ # Unit tests
- Create a feature branch
- Make your changes
- Run tests:
npm run test:all
- Submit a pull request
MIT