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.
Cursor
VS Code (GitHub Copilot)
Claude Code
Codex
OpenCode
Setup Steps:
Open Cursor’s command palette (usually Cmd+Shift+P on Mac OS).
Search for and select the “View: Open MCP Settings” command.
Click “Add a new Custom MCP server”.
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.
Name the server when prompted (e.g., “momentic-mobile”).
Open Extensions and confirm the MCP server connects and detects the tools.
Allow all tools from Momentic.
GitHub Copilot may require your organization to allow MCP server usage. VS Code may only allow MCP usage in agent mode.
Setup Steps:
Open your terminal and navigate to your project directory.
Run the command below. Replace the config path with your
project’s momentic.config.yaml. To add optional settings (API key,
session idle timeout), see the mcp command.
Note: All options (e.g. --transport stdio, --env) must come before the
server name. The -- separates the server name from the command and its
arguments.Windows: On native Windows (not WSL), wrap npx with cmd /c:
claude mcp add --transport stdio momentic-mobile -- cmd /c npx momentic-mobile mcp --config C:\path\to\momentic.config.yamlNeed help configuring advanced Claude flags (for example --env,
--scope, or auth options)? See Claude Code MCP server
setup.
Setup Steps:
Open your terminal in your project directory (or ensure the config path is
absolute).
Run the command below. Replace the config path with your
project’s momentic.config.yaml. To add optional settings (API key,
session idle timeout), see the mcp command.
Codex saves this configuration to ~/.codex/config.toml. You can always edit your MCP configuration through this file.
Restart Codex. Open a new chat and type /mcp to confirm that the Momentic mobile MCP server is active.
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.
Cursor
Claude Code
Codex
OpenCode
Copilot (VS Code)
Custom path
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
Copy
Ask AI
npx momentic-mobile install-skills --cursor
Global skill directory:
~/.claude/skills/momentic-test/SKILL.mdClaude Code respected directories:
~/.claude/skills/<name>/SKILL.md
Copy
Ask AI
npx momentic-mobile install-skills --claude-code
Global skill directory:
~/.agents/skills/momentic-test/SKILL.mdCodex respected directories:
~/.agents/skills/<name>/SKILL.md
Copy
Ask AI
npx momentic-mobile install-skills --codex
Global skill directory:
~/.config/opencode/skills/momentic-test/SKILL.mdOpenCode respected directories:
~/.config/opencode/skills/<name>/SKILL.md
~/.claude/skills/<name>/SKILL.md
~/.agents/skills/<name>/SKILL.md
Copy
Ask AI
npx momentic-mobile install-skills --opencode
Global skill directory:
~/.copilot/skills/momentic-test/SKILL.mdCopilot respected directories:
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.
Copy
Ask AI
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.
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.
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%.
Invoke Momentic’s skill: Explicitly invoke the skill in your assistant
(e.g. in Codex, type /momentic and choose the autocompleted skill).
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.
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.