Momentic’s MCP server exposes tools that let agents browse, edit, create, and
run tests with a live browser directly from your editor.
Common workflows
- Implement from executable specs. Use
momentic-specbefore changing user-visible behavior so the affected Momentic tests capture the intended product behavior and validate the finished implementation. - Author and extend coverage. Use
momentic-testto create tests, steps, and modules against a live browser. Usemomentic-mobile-testfor Android and iOS. - Understand a branch failure. Use
momentic-maintainto find runs for the branch, inspect the saved classifications and run evidence, and identify the earliest point where behavior diverged. - Investigate failures on main. DevX and on-call engineers can group recent failures by status or classification, inspect representative runs, and distinguish application regressions from test, environment, and Momentic issues.
- Deflake tests and reduce latency. Find quarantined, recovered, and retry-heavy runs, then repair unstable tests and reduce time spent in failure recovery. Branch, classification, and minimum-attempt filters help prioritize repeated failure patterns.
Prerequisites
- Momentic CLI installed locally (MCP runs on your machine)
- A project with a valid
momentic.config.yaml - A
MOMENTIC_API_KEYavailable to the MCP process (most editors do not inherit your shell environment)
Setup instructions
General
Momentic’s MCP is a local stdio server. Every editor ultimately runs:momentic-mobile mcp. See
momentic mcp and
momentic-mobile mcp for every
supported flag (headful browser, pixel ratio, daemon mode, etc.).
Along with the server, install the Momentic skills for your editor. Skills
give agents explicit operating guidance so they don’t make malformed tool calls:
momentic-test: how to build reliable tests, steps, and modulesmomentic-spec: how to write affected tests before product changesmomentic-maintain: how to investigate branch and main failures, audit classifications, deflake quarantined or recovered tests, reduce retries, and repair durable test issues
momentic_* tools such as momentic_get_artifacts. If they do not appear,
fully restart the client.
Claude Code
Register the server:claude mcp list. On native Windows, wrap with cmd /c:
MOMENTIC_API_KEY via the CLI’s --env flag or by running the command
from a shell that already has it exported. See
Claude Code MCP docs
for scoping and auth options.
Restart Claude Code and run /mcp to confirm the server is active.
Codex
Register the server:~/.codex/config.toml. For project-scoped
configs, edit .codex/config.toml in a trusted project. See
Codex MCP docs for env vars and
timeouts.
Restart Codex, then run /mcp in the TUI to verify.
Cursor
Open the command palette, select View: Open MCP Settings, click Add a new Custom MCP server, then paste and restart Cursor:Devin
Follow the dedicated Devin integration page. Devin requires additional machine-configuration steps so it can install browsers, setANDROID_HOME / JAVA_HOME, and pre-install skills before MCP starts.
OpenCode
Editopencode.json in your project root or ~/.config/opencode/:
VS Code (Copilot)
Open the command palette, select MCP: Add Server, pick Command (stdio), then paste:momentic when prompted. Then add MOMENTIC_API_KEY to the
generated entry in mcp.json:
Other clients
Any MCP-compatible client can launch the server with:- Command:
npx - Arguments:
momentic mcp --config /absolute/path/to/momentic.config.yaml - Env:
MOMENTIC_API_KEY=your-api-key
Install skills
After registering the MCP server with your editor, install the Momentic skill files from your project root:Invoke the skill
Some agents load installed skills on their own, but many skip them unless you name the skill in the prompt. Invoke skills with a slash prefix, as the examples below show. For agents without slash commands, ask for the skill by name.Authorship
Usemomentic-test to create or extend Momentic tests:
momentic-mobile-test for Android and iOS. Naming the skill keeps the agent
on Momentic’s test format and MCP workflow instead of hand-rolling browser
automation.
Maintenance
Usemomentic-maintain to understand failures on a branch or main, review and
challenge saved classifications, deflake quarantined or recovered tests, reduce
retries, and repair stale test steps while preserving the intended behavior:
Request visual evidence
Web and mobile MCP tools return screenshots from live sessions and saved step results. Ask the agent to display them in the conversation when you want to see the evidence it used:Spec-driven development
Once your repo is on the simplified format, Momentic tests are readable enough to double as product specs. Invokemomentic-spec when implementing a feature
so the agent creates or updates the smallest set of affected Momentic tests
before changing product code:
AGENTS.md (or .cursor/rules, etc.):
act and AI
action V3.
Usage tips
- Model: use the newest model your editor offers.
Highreasoning gives the best results;Mediumis about 20% faster with some quality loss. - Invoke the relevant skill explicitly when authoring, maintaining, or changing product behavior.
- Be specific in prompts. For exploratory runs, include a step limit.
- Let sessions terminate: the agent calls
momentic_session_terminateto close the browser. Hard-stopping your editor leaks browser processes. - Gitignore
.momentic-mcp/. MCP stores screenshots, videos, and traces there. - Long-running steps:
momentic_run_stepreturns within 30 seconds. If the step range hasn’t finished, it returns astepRunnerIdthat you can poll withmomentic_poll_runner. Pass an optionaltimeoutSeconds(0-30, default 0) to hold the poll open briefly instead of busy-polling.