Skip to main content
Use Devin to set up Momentic and run your first test. Copy the prompt below into your repository setup chat.

Prerequisites

  • Your repository checked out in Devin.
  • A Momentic API key in Devin’s secret environment as MOMENTIC_API_KEY, or an existing CLI sign-in Devin can use.
The prompt asks Devin to check and install missing local dependencies.

Setup with coding agent

Copy this prompt into Devin. It follows the platform quickstart and adds the Devin-specific MCP settings:
Copy for coding agents

Set up with the wizard

For direct CLI setup, use a supported Node.js version and the Momentic credentials above. The project needs a package.json; run npm init -y if it has none. Run the wizard from that directory:
Use --platform ios or --platform android for mobile. For a new project, the wizard installs the matching CLI (momentic for web, momentic-mobile for mobile), creates the config and sample test, and runs the sample. The --editor-tools devin option installs the skills and writes Devin’s MCP config to .devin/mcp_config.json without relying on agent detection.

Add MCP to an existing setup

If Momentic is already installed and only the MCP registration is missing, run the installer from the directory containing momentic.config.yaml:
Web
Mobile
Both commands merge their server entry into .devin/mcp_config.json. Use --client devin if automatic detection reports No coding agent detected. For config scopes and manual server options, see the MCP setup instructions.

Setup notes

These settings apply after either the wizard or the MCP installer registers the server. The copyable prompt above has Devin configure them. Append --daemon to the args of each Momentic server entry in .devin/mcp_config.json. This preserves browser or device sessions across MCP process reconnects. The wizard and MCP installer do not add it automatically. See the web and mobile MCP references. On a VM without a display, add "--headful" and "false" as separate args entries in each Momentic MCP server config. Both servers default to true. For web, false makes browser sessions headless. For mobile, it skips opening the remote-control viewer without changing the emulator UI. The wizard and MCP installer do not add this flag automatically. The momentic_session_start tool accepts headful to override the server default for an individual session; the legacy headfulBrowser parameter remains an alias. See the web MCP browser options and mobile MCP session options. Check npx momentic mcp --help before changing an existing web entry. If the installed release does not list --headful, use "--headful-browser" and "false" instead. For MCP session overrides, use headfulBrowser if the installed server’s tool schema does not list headful. The wizard installs Chromium for web. Android needs adb and ANDROID_HOME or ANDROID_SDK_ROOT, including for remote emulators; have Devin install missing Android platform-tools. Use remote iOS simulators on Devin’s Linux machine; local simulators require macOS. See the iOS prerequisites.

Verify

Start a new Devin session in the configured repository. Ask it to list tools whose names start with momentic_ and call one, such as momentic_get_artifacts. Confirm that MOMENTIC_API_KEY is available where Devin starts MCP if the call fails to authenticate. For a new project, also confirm that the wizard’s sample test passed. The web sample tests Momentic’s demo app; the iOS and Android samples create a contact in the native Contacts app. None of these samples test your app. Continue with the setup prompt to write and run a test for your own user flow. If MCP tools are not available in the session, Devin can use the installed skills and CLI instead.

Fix a failing run

When a cached locator no longer matches, Momentic tries to resolve the target again from its description. If the run still fails, Devin can read the evidence through MCP and investigate the cause.
1

Run the affected tests

Ask Devin to run them from the project directory, for example npx momentic run --labels smoke --upload-results.
2

Point it at the failing step

Name the maintenance skill in the prompt:
The agent reads the failing step’s before and after screenshots, the trace with the DOM, network requests, and console output, and the run history for the branch.
3

Let it decide where the fix belongs

A product bug goes back into the code. A stale locator or an intended behavior change goes into the test file, in the same pull request as the product fix.
See run artifacts and request visual evidence.