Skip to main content
Requires Momentic mobile CLI version 0.55.1 or greater.
Currently only one emulator can run at a time.
Momentic’s MCP server exposes tools so agents can:
  • Browse tests, modules, and environments
  • Edit tests and modules via tool calls (not direct YAML edits)
  • Create tests from natural language
  • Run sessions with a live emulator

Prerequisites

  • Momentic-mobile CLI installed: MCP is local only and requires the Momentic-mobile CLI on your machine.
  • Project setup complete: Finish CLI setup and ensure your project includes a valid momentic.config.yaml.

Step 1: Set up your MCP client

The MCP shell command must have access to MOMENTIC_API_KEY, JAVA_HOME, and ANDROID_HOME directly in the MCP command. You can provide it through the MCP server env block or pass the --api-key, --java-home, and --android-home flags directly to momentic-mobile mcp. Most MCP servers do not inherit your usual shell environment variables.
All configurations below use an absolute path to momentic.config.yaml. Replace it with your project’s actual path. For additional options, see the mcp command.
Setup Steps:
  1. Open Cursor’s command palette (usually Cmd+Shift+P on Mac OS).
  2. Search for and select the “View: Open MCP Settings” command.
  3. Click “Add a new Custom MCP server”.
  4. Add a block in the JSON file for “momentic-mobile” based on the code sample below. Replace the path with your true momentic.config.yaml location.
  5. Restart Cursor.
{
  "mcpServers": {
    "momentic-mobile": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "momentic-mobile",
        "mcp",
        "--config",
        "/absolute/path/to/momentic.config.yaml",
        "--android-home",
        "/absolute/path/to/Android/sdk",
        "--java-home",
        "/absolute/path/to/java-home"
      ]
    }
  }
}
These settings are optional.
{
  "mcpServers": {
    "momentic-mobile": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "momentic-mobile",
        "mcp",
        "--config",
        "/absolute/path/to/momentic.config.yaml",
        "--android-home",
        "/absolute/path/to/Android/sdk",
        "--java-home",
        "/absolute/path/to/java-home",
        "--session-idle-timeout-minutes",
        "5"
      ],
      "env": {
        "MOMENTIC_API_KEY": "your-api-key",
        "ANDROID_HOME": "/absolute/path/to/Android/sdk",
        "JAVA_HOME": "/absolute/path/to/java-home"
      }
    }
  }
}

Step 2: Install the Momentic skill

The Momentic skill gives your assistant explicit operating guidance for Momentic workflows: it teaches the model how to build reliable tests, construct test steps correctly, reuse modules in your workspace, and more. Without a skill, coding agents are far more likely to make malformed tool calls and waste time on unnecessary actions.

Global skill directory: ~/.cursor/skills/momentic-test/SKILL.mdCursor respected directories:
  • ~/.cursor/skills/<name>/SKILL.md
  • ~/.claude/skills/<name>/SKILL.md
  • ~/.codex/skills/<name>/SKILL.md
npx momentic-mobile install-skills --cursor

Step 3: Add an agent rule

Agent rules are stronger, global rulesets that agents are trained to strongly respect. They are usually stored in an AGENTS.md file at the root of your codebase. Some agents also support rules in their own custom directory (e.g. .cursor/rules). We recommend adding one of the following lines to your rules to prevent agents from bypassing Momentic’s MCP tools completely and directly editing your test or module YAML files. Direct edits will likely lead to parsing and caching errors.
Never directly edit Momentic test (`*.test.yaml`) or module YAMLs (`*.module.yaml`). Only use the Momentic MCP tools to edit Momentic YAMLs. If they are unavailable tell the user you are unable to edit the YAML files.

Step 4: Verify installation

The MCP server should now show up in a status page within your coding agent. CLI-based tools usually provide a command like /mcp to view all installed MCP servers. Start a new chat and ask the agent what MCP servers and tools are available. It should list tools whose names start with momentic_, such as momentic_get_artifacts. If tools don’t appear, restart the IDE completely. You’re now ready to use Momentic’s MCP! Select the Momentic skill and then insert your desired goal.

Usage

  1. Model selection: Choose the latest frontier models for the best performance. As of version 0.55.1, Momentic has benchmarked MCP performance on GPT5.4. If current agent performance is acceptable, Medium reasoning can improve speed by about 20%.
  2. Invoke Momentic’s skill: Explicitly invoke the skill in your assistant (e.g. in Codex, type /momentic and choose the autocompleted skill).
  3. Prompting: Specific instructions generally lead to better outcomes. For exploratory testing, we recommend specifying a step limit so that the agent knows when to stop.
  4. Session management: Allow sessions to clean up properly. You should notice the model calling the momentic_session_terminate tool, which will shut down the emulator session. Repeatedly stopping your coding agent may leak emulator resources and slow down your machine.

Configurable settings

For all available flags and environment variables, see the mcp command reference.