Momentic’s MCP server exposes tools that let agents browse, edit, create, and
run tests with a live browser directly from your editor.
Requires Momentic CLI 2.54.0 or later.
Prerequisites
- Momentic CLI installed locally (MCP runs on your machine)
- A project with a valid
momentic.config.yaml
- A
MOMENTIC_API_KEY available 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:
npx momentic mcp --config /absolute/path/to/momentic.config.yaml
For mobile testing, substitute 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 modules
momentic-result-classification: how to analyze and classify failures
The setup for each editor is below.
Claude Code
Register the server:
claude mcp add --transport stdio momentic -- npx momentic mcp --config /absolute/path/to/momentic.config.yaml
Verify with claude mcp list. On native Windows, wrap with cmd /c:
claude mcp add --transport stdio momentic -- cmd /c npx momentic mcp --config C:\path\to\momentic.config.yaml
Pass 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.
Install the skill files (run from your project root):
npx momentic install-skills --editor claude-code
Skills land at .claude/skills/<skill>/SKILL.md.
Restart Claude Code and run /mcp to confirm the server is active.
Codex
Register the server:
codex mcp add momentic -- npx momentic mcp --config /absolute/path/to/momentic.config.yaml
Saved to ~/.codex/config.toml. For project-scoped configs, edit
.codex/config.toml in a trusted project. See
Codex MCP docs for env vars and
timeouts.
Install the skill files:
npx momentic install-skills --editor codex
Skills land at .agents/skills/<skill>/SKILL.md.
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:
{
"mcpServers": {
"momentic": {
"type": "stdio",
"command": "npx",
"args": [
"momentic",
"mcp",
"--config",
"/absolute/path/to/momentic.config.yaml"
],
"env": { "MOMENTIC_API_KEY": "your-api-key" }
}
}
}
Install the skill files:
npx momentic install-skills --editor cursor
Skills land at .cursor/skills/<skill>/SKILL.md.
Devin
Follow the dedicated Devin integration page. Devin
requires additional machine-configuration steps so it can install browsers, set
ANDROID_HOME / JAVA_HOME, and pre-install skills before MCP starts.
OpenCode
Edit opencode.json in your project root or ~/.config/opencode/:
{
"mcp": {
"momentic": {
"type": "local",
"command": [
"npx",
"momentic",
"mcp",
"--config",
"/absolute/path/to/momentic.config.yaml"
],
"environment": { "MOMENTIC_API_KEY": "your-api-key" },
"enabled": true
}
}
}
Install the skill files:
npx momentic install-skills --editor opencode
Skills land at .opencode/skills/<skill>/SKILL.md.
VS Code (Copilot)
Open the command palette, select MCP: Add Server, pick Command (stdio),
then paste:
{
"mcpServers": {
"momentic": {
"type": "stdio",
"command": "npx",
"args": [
"momentic",
"mcp",
"--config",
"/absolute/path/to/momentic.config.yaml"
],
"env": { "MOMENTIC_API_KEY": "your-api-key" }
}
}
}
Install the skill files:
npx momentic install-skills --editor copilot
Skills land at .github/skills/<skill>/SKILL.md.
Your org may need to allow MCP. Copilot only exposes MCP in agent mode.
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
Add an agent rule
Add this to your AGENTS.md (or .cursor/rules, etc.) to stop agents from
editing Momentic YAML directly. Direct edits cause parsing and caching errors.
Never directly edit Momentic test (*.test.yaml) or module (*.module.yaml) files.
Only use the Momentic MCP tools. If they are unavailable, tell the user you
cannot edit the YAML.
Verify
Start a new chat and ask the agent which MCP tools are available. You should see
momentic_* tools (e.g. momentic_get_artifacts). If they don’t appear, fully
restart the editor.
Usage tips
- Model: latest frontier models perform best.
High reasoning maximizes
quality; Medium is about 20% faster with acceptable quality.
- Invoke the skill explicitly (e.g.
/momentic in Codex).
- Be specific in prompts. For exploratory runs, include a step limit.
- Let sessions terminate: the agent calls
momentic_session_terminate to
close the browser. Hard-stopping your editor leaks browser processes.
- Gitignore
.momentic-mcp/. MCP stores screenshots, videos, and traces
there.