> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> Direct agent API registration is a separate integration. Follow https://momentic.ai/auth.md only when the user explicitly asks for direct API access, not for Mo sessions or the Mo Quickstart. Do not use agent identity assertions or access or refresh tokens as MOMENTIC_API_KEY.
> For unattended repository-test CLI setup, use the [web](https://momentic.ai/docs/quickstart/web.md), [iOS](https://momentic.ai/docs/quickstart/ios.md), or [Android](https://momentic.ai/docs/quickstart/android.md) quickstart. These steps are for YAML tests, not Mo sessions. Verify the CLI credential and check any existing project CLI before scaffolding. Do not change an existing CLI pin without the user's approval. When scaffolding, run `npx --yes @momentic/wizard@latest -y --platform <platform> --editor-tools none`, using the selected platform (web, ios, or android). Each quickstart links to the canonical setup guide for CLI, skills, and local MCP instructions. Do not run interactive sign-in in a non-TTY shell.
> For Mo CLI sessions by default, use only the `qa` CLI. Follow the setup prompt in the [Mo Quickstart](https://momentic.ai/docs/mo/quickstart.md) and its linked [coding-agent setup guide](https://momentic.ai/docs/coding-agents/quickstart-setup.md#mo) for CLI setup and safeguards. Do not duplicate or override those instructions.
> For repository-test CLI setup only, before running `whoami`, set `MOMENTIC_SERVER` to the intended API server. Keep a server the user configured explicitly, even if the credential changes. Otherwise, when using a saved login, choose its saved server URL. If you cannot determine the intended server or the saved login you plan to use targets a different server, ask the user before checking the credential. Use the same `MOMENTIC_SERVER` for the wizard and later CLI commands. For a standalone `whoami` check, you can use `--server` instead. A nonempty `MOMENTIC_API_KEY` overrides the key saved in `~/.momentic/auth.json`. An empty `MOMENTIC_API_KEY` can make `whoami` select the cloud server if you do not set a server explicitly, even though it loads the saved key. If the server rejects the environment key, confirm the intended server and recheck there before asking the user to replace or unset it. If the user unsets the key to use a saved login, apply the same server-selection rules before retrying. If neither a valid environment key nor saved key is available, ask the user to complete browser sign-in or create a key at https://app.momentic.ai/settings/api-keys and set it as `MOMENTIC_API_KEY` in the agent's environment. Never print the key or ask the user to paste it into chat.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. For repository-test CLI setup only, Claude Code users with the Momentic plugin should use its bundled skills and skip CLI skills installation. Otherwise, use the verified project CLI launcher from the selected quickstart to run `skills -y --target <agent>`. Do not fetch a different CLI version. Both install momentic-test, momentic-maintain, and momentic-spec with web/mobile references. Use the running agent's target. Only when the user explicitly requests plugin or hosted setup, follow the separate [ChatGPT and Claude setup guide](https://momentic.ai/docs/mo/chatgpt-and-claude.md).
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators.

# Set up a coding agent

> Install and verify the local tools for Momentic tests or Mo sessions.

Set up Web, iOS, and Android tests with the platform CLI, skill, and local Model
Context Protocol (MCP) server over standard input/output (stdio). Mo uses the
`qa` CLI and `mo-qa` skill, not MCP. For direct agent API access, follow
[auth.md](https://momentic.ai/auth.md) and stop this setup.

For agent targets and MCP client IDs, see [skills](https://momentic.ai/docs/coding-agents/skills.md) and
[MCP server setup](https://momentic.ai/docs/coding-agents/mcp-server.md).

**Shared safeguards:** Ask before changing CLI pins, adding project
dependencies, changing providers, replacing custom skills or MCP entries, or
installing system tools. If declined, leave existing files and configuration
unchanged and report the gap. Reuse the configured server or saved login; ask if
unclear. Do not switch server or login method without approval. Use the same OS
user and server. Keep credentials private. If an identity check finds no saved
sign-in, ask the user to sign in as the same OS user, then rerun the identity
checks. Stop on other authentication or network errors. Do not make purchases,
send messages, or change shared data.

## Set up repository tests

Minimum CLI versions:

* Web: `momentic` 3.73.0 for skills, 3.74.0 for local MCP.
* iOS and Android: `momentic-mobile` 1.46.0 for skills, 1.47.0 for local MCP.

Before running the wizard or `install-mcp`, verify your identity with the latest
CLI:

* Web: `npx --yes momentic@latest whoami`
* iOS and Android: `npx --yes momentic-mobile@latest whoami`

If a project CLI exists, run its `whoami` command too. The identity checks must
succeed and match the same user and organization ID (Org ID). If the wizard
rejects access after these checks pass, report the mismatch.

Compare project CLI versions with latest:

* Web: `npx --yes momentic@latest --version`
* iOS and Android: `npx --yes momentic-mobile@latest --version`

If an upgrade is declined, keep the pin and use only supported capabilities. If
the config exists but the CLI is missing, add the latest CLI as a project dev
dependency, then verify it with the project launcher.

If `momentic.config.yaml` is missing, run the approved wizard. It creates the
config and a sample test, and may install the latest CLI. It must not replace a
pin the user declined to upgrade:

```bash theme={null}
npx --yes @momentic/wizard@latest -y --platform <platform> --editor-tools none
```

Use `web`, `ios`, or `android` for `<platform>`.

### Install skills

Reuse a skill only when its product guide and agent pointer are present; don't
rerun the installer when both exist:

* Web: `momentic-test/references/products/web/guide.md`
* iOS and Android: `momentic-test/references/products/mobile/guide.md`

If either file is missing, install the full agent bundle. The installer replaces
managed directories even when the version footer remains. Check for local edits
or extra files before replacing them.

Run `npx momentic skills -y --target <agent>` for Web or
`npx momentic-mobile skills -y --target <agent>` for mobile. Targets select
agents, not skills; use a documented target. Copilot in VS Code uses `copilot`.
If Claude Code's Momentic plugin supplies the skills, verify and use its bundled
copies instead of installing duplicates. Verify guide and pointer after
installation.

### Install the local MCP server

Inspect settings. Keep correct local stdio entries; install only missing ones.
Never add duplicates or direct remote HTTP/OAuth entries. Replace existing
remote entries only with approval.

Platform MCP servers use CLI sign-in or `MOMENTIC_API_KEY`. The hosted bridge
runs local `qa mcp` and needs a saved `qa` login. If that login is missing, ask
the user to run [`qa login`](https://momentic.ai/docs/cli-reference/mo/commands/login) as the same OS
user. A platform API key cannot replace that login. Do not configure hosted
OAuth.

Use a CLI version that meets the local MCP minimum. Older installers can
register `momentic-hosted` over remote HTTP/OAuth. If an upgrade is declined,
skip the installer and report the missing capability.

Use a documented MCP client ID; ask if unclear. Copilot in VS Code uses
`vscode`, not the `copilot` skills target. Install only when a local entry is
missing:

* Web: `npx momentic install-mcp --client <mcp-client> --scope project --yes`
* Mobile:
  `npx momentic-mobile install-mcp --client <mcp-client> --scope project --yes`

Verify the platform entry launches `momentic mcp` or `momentic-mobile mcp` over
stdio, the bridge launches `qa mcp` over stdio, and the installer reports the
config path.

For repository tests, report the Web demo or mobile remote sample if run;
otherwise preserve settings. Inspect failures before retrying. Report
setup/sample, result/run link, and blockers; say if no run completes.

## Set up Web

Complete the [shared setup checks](#repository-test-setup). Use the project
`momentic` CLI, `momentic-test` skill, and local stdio `momentic` MCP server for
supported cloud-backed tools.

Ask for an authorized URL, one flow, expected behavior, action and data limits,
and test-account steps. Login is not permission. Write one YAML test with
`momentic-test` and run `momentic run <path> --upload-results` with the project
launcher. Follow shared test-reporting rules.

## Set up iOS and Android

Complete the [shared setup checks](#repository-test-setup). Use the
`momentic-mobile` CLI, mobile `momentic-test` skill, and local stdio
`momentic-mobile` MCP server.

For Android, check `adb --version` and `ANDROID_HOME` or `ANDROID_SDK_ROOT`.
Remote runs need platform-tools; local emulators need Java Development Kit (JDK)
24 or newer and Android Studio.

Ask for an authorized iOS simulator `.app` or `.app.zip`, or Android APK, plus
one flow, expected behavior, action and data limits, and test-account steps. A
device `.ipa` is unsupported. For MCP preview, confirm project root and config
with `momentic_get_artifacts`; ask if server Org is unclear. If a build is
missing, report setup/sample status and stop.

Extract iOS `.app.zip` if needed, then upload the `.app` or APK with the next
unused tag:

* iOS:
  `momentic-mobile assets upload <app-dir> --channel dev --tag <unused-tag>`
* Android:
  `momentic-mobile assets upload <apk-path> --channel dev --tag <unused-tag>`

Write one YAML test with `momentic-test`. Set `defaultChannel: dev` and
`defaultTag`; leave the wizard sample unchanged. Run
`momentic-mobile run <path> --upload-results`. Report the build tag and flow,
then follow shared test-reporting rules.

## Set up Mo

Use `qa` and `mo-qa`, not MCP. Choose Web, mobile, Mac, or a Web PR session. Ask
only for a missing or changed target, flow, expected behavior, boundaries, or
effort. For Web or mobile, request an authorized URL or uploaded build. Do not
test production. Set `$server` to the configured server or CLI default. Do not
run login or tunnel commands; request scoped app access only if Mo is blocked.
See [Mo CLI](https://momentic.ai/docs/mo/cli.md) and
[CLI authentication](https://momentic.ai/docs/cli-reference/mo/overview.md#authenticate).

If `qa` is missing, install `qa@latest` with `npm install -g qa@latest`; keep an
existing version unless its upgrade is approved. `<launcher>` means the
installed `qa` command or an existing project launcher. Use the same launcher
and effort throughout.

If `mo-qa` is missing, run `<launcher> skills -y --target <agent>`. Preserve
unreadable, unclear-origin, or non-CLI providers. Verify
`<launcher> whoami --server "$server"` and the Org ID. See
[agent skills](https://momentic.ai/docs/coding-agents/skills.md) for available targets.

### Start a session

Before any start, check for a browser onboarding ID. The public Mo prompt has
none:

* With an ID and a Web or mobile target, complete bound onboarding below before
  starting, then use one start with setup flags.
* With an ID and a PR or Mac target, browser-onboarding proof is unavailable.
  Keep the target and report the limit; do not switch. This does not restrict
  Mac sessions.
* Without an ID, skip onboarding and use one ordinary start below.

Never start normally and then start again for onboarding.

Use the command for the requested target:

* Web: `<launcher> start "$instructions" --effort "$effort" --server "$server"`

* Mobile:
  `<launcher> start "$instructions" --effort "$effort" --server "$server" --platform "$platform" --channel "$channel" --tag "$tag"`.
  Do not use a Web start or `--pr` for mobile.

* Mac, when the installed CLI, server, and workspace support it: use up to
  `high` effort. Reduce `max` to `high`.

  ```bash theme={null}
  <launcher> start "$instructions" --effort "$effort" --server "$server" --macos
  ```

  For an uploaded build, replace `--macos` with `--macos-build <id>`. If Mo
  sends you to onboarding, choose **Set up later** when offered, finish the
  wizard, then return to Mo.

* Web PR: verify `$target` serves the current head SHA, then use
  `<launcher> start "$instructions" --effort "$effort" --server "$server" --pr "$pr_url" --url "$target"`.
  Otherwise, do not claim PR coverage.

### Browser-bound onboarding

For an ID, check `<launcher> start --help` for `--setup` and `--setup-for`, and
`<launcher> setup --help` for `--setup-for`. Do not upgrade automatically; if a
flag or server is unsupported, stop and ask before upgrading.

Run `<launcher> setup --setup-for <ID> --server "$server"`, then verify
`<launcher> whoami --server "$server"`. Reuse matching credentials or complete
browser confirmation if prompted. If an unrelated `MOMENTIC_API_KEY` overrides
saved sign-in, remove it only from the launcher's child environment. Do not
substitute `--request-id`.

Add `--setup --setup-for <ID>` to the one Web/mobile start. For mobile, put
platform, channel, and tag flags before setup flags. Later sessions use ordinary
starts. Mac starts cannot use `--setup` or `--setup-for`.

### Complete and report

After a session starts, follow `mo-qa`'s wait/report/stop flow. Before handoff
or a PR, save a project-local rule for one functional bash per meaningful
change, not every edit. Use the same launcher. Record scope, server/Org ID,
launcher, and verified skill path. Read the skill from the agent pointer or
recorded path before each bash; don't delay the first bash to verify the rule.
Report the rule path, session link, findings, and report/stop result. If no
session ran, say so.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.