Installation and Setup
Before using MAGE, make sure that your environment meets these
requirements.
-
Operating System:
- macOS for iOS development
- Windows/Linux/macOS for Android development
- MCP Host: An AI coding environment compatible with the Model Context Protocol, such as Cursor, Claude Desktop, or Agentforce Vibes.
- Salesforce CLI: The foundational command-line interface must be installed. Download and install the Salesforce CLI.
- Salesforce Access: Access to a Salesforce organization.
- Native Build Tools:
-
Enable the server.
- Agentforce Vibes: The MCP server can be enabled with the a4d_mcp_settings.json file.
- Other MCP Hosts: Make sure that you have Node.js v22 installed, so that you can configure the MCP server via the NPM package by using this command: npx -y @salesforce/mobile-native-mcp-server
- Verify installation by opening your AI assistant and ensuring the sfmobile-native-project-manager tool is available in your tool inventory. Upon first interaction, the server runs an environment validation to check for required plugins (like sfdx-mobilesdk-plugin) and guides you through installation if they’re missing.
- Make sure that your Salesforce org has a Salesforce Connected App, and the environment variables in your configuration:
Example configuration for MacOS
1"magen": {
2 "disabled": false,
3 "timeout": 600,
4 "type": "stdio",
5 "command": "npx",
6 "args": [
7 "@salesforce/mobile-native-mcp-server"
8 ],
9 "env": {
10 "LOG_LEVEL": "debug",
11 "CONNECTED_APP_CONSUMER_KEY": "<INSERT KEY>",
12 "CONNECTED_APP_CALLBACK_URL": "<INSERT URL>"
13 }
14 }Example configuration for Windows
1"magen": {
2 "disabled": false,
3 "timeout": 600,
4 "type": "stdio",
5 "command": "cmd",
6 "args": [
7 "/c",
8 "npx",
9 "@salesforce/mobile-native-mcp-server"
10 ],
11 "env": {
12 "LOG_LEVEL": "debug",
13 "CONNECTED_APP_CONSUMER_KEY": "<INSERT KEY>",
14 "CONNECTED_APP_CALLBACK_URL": "<INSERT URL>"
15 }
16 }