Skip to main content
Requires Momentic CLI version 2.53.0 or greater. Older servers were alpha releases and are not maintained.
Momentic’s MCP server exposes tools so agents can:
  • Browse tests, modules, and environments
  • Edit tests and modules via tool calls (not direct YAML edits)
  • Create tests from natural language
  • Run sessions with a live browser

Prerequisites

  • Momentic CLI installed: MCP is local only and requires the Momentic CLI on your machine.
  • Project setup complete: Finish CLI setup and ensure your project includes a valid momentic.config.yaml.

Step 1: Set up your MCP client

AuthenticationThe MCP shell command must have access to MOMENTIC_API_KEY. You can provide it through the MCP server env block or pass the --api-key flag directly to momentic 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.
Setup Steps:
  1. Open Cursor’s command palette (usually Cmd+Shift+P on Mac OS).
  2. Search for and select the “View: Open MCP Settings” command.
  3. Click “Add a new Custom MCP server”.
  4. Add a block in the JSON file for “momentic” based on the code sample below. Replace the path with your true momentic.config.yaml location.
  5. Restart Cursor.
{
  "mcpServers": {
    "momentic": {
      "type": "stdio",
      "command": "npx",
      "args": ["momentic", "mcp", "--config", "/absolute/path/to/momentic.config.yaml"]
    }
  }
}
These settings are optional.
{
  "mcpServers": {
    "momentic": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "momentic",
        "mcp",
        "--config",
        "/absolute/path/to/momentic.config.yaml",
        "--headful-browser",
        "false",
        "--pixel-ratio",
        "2"
      ],
      "env": {
        "MOMENTIC_API_KEY": "your-api-key"
      }
    }
  }
}

Step 2: Install the Momentic skill

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. The install-skills command automatically creates a skill markdown file and place it into the correct directory for common agents. Skills can be customized directly by editing the markdown file after they are generated.

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
npx momentic install-skills --cursor

Step 3: Add an agent rule

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.
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.

Step 4: Verify installation

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 momentic_ tools such as momentic_test_environment_list. 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.

Usage

  1. Model selection: Choose the latest frontier models for the best performance. As of version 2.53.0, Momentic has benchmarked MCP performance on GPT5.3 Codex (High) and Opus 4.6 (High). If current agent performance is acceptable, Medium reasoning can improve speed by about 20%.
  2. Invoke Momentic’s skill: Explicitly invoke the skill in your assistant (e.g. in Codex, type /momentic and choose the autocompleted skill).
  3. 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.
  4. Session management: Allow sessions to clean up properly. You should notice the model calling the momentic_session_terminate tool, which will close the browser instance. Repeatedly stopping your coding agent may leak browser resources and slow down your machine.
User Request:
create a new test called demo test for the yc website

Then once you create that test load its full data, use this to then edit the test

click on the companies tab
choose a major name brand company and click on their profile
check that the team size is visible
click on the jobs tab
assert that the blurb about what the company does is no longer visible
AI Response:I’ll help you create a new test for the YC website and then edit it according to your specifications. Let me start by creating the test and then loading its data to edit it.Creates TODO list:
  • Create a new test called demo test for the YC website [in_progress]
  • Load the full data of the created test [pending]
  • Edit the test to implement the specified flow [pending]
Parameters:
name: "demo-test"
baseUrl: "https://www.ycombinator.com"
description: "Test for YC website - companies tab navigation and job page verification"
Result: Successfully created test with ID 391f065b-48f3-4548-ab15-079543fa69e0
Parameters:
id: "391f065b-48f3-4548-ab15-079543fa69e0"
Result: Retrieved test configuration with empty steps array
Parameters:
id: "391f065b-48f3-4548-ab15-079543fa69e0"
message: |
  Add test steps to:
  1. Navigate to the YC website
  2. Click on the 'Companies' tab
  3. Find and click on a major brand company like DoorDash or Coinbase
  4. Verify that the team size is visible on the company profile
  5. Click on the 'Jobs' tab
  6. Assert that the company description blurb is no longer visible on the jobs page
Result: Test successfully updated with 7 automated steps:
  1. Navigate to https://www.ycombinator.com
  2. Click on “Companies” tab in navigation
  3. Verify companies list is displayed
  4. Click on DoorDash company profile
  5. Assert team size (8600) is visible
  6. Click on “Jobs” tab
  7. Assert detailed company description is not visible on jobs page
Final Result: ✅ Created “demo-test” for YC website ✅ Implemented complete user flow with proper assertions ✅ Test validates team size visibility and content changes between tabs ✅ Ready to execute with 7 comprehensive test stepsThe AI successfully:
  • Created a new test with appropriate configuration
  • Loaded and analyzed the test structure
  • Converted natural language requirements into specific test steps
  • Chose DoorDash as the major brand company example
  • Added proper assertions for team size visibility and content validation
  • Generated executable test steps ready for automation

Configurable settings

For all available flags and environment variables, see the mcp command reference.

Alternative protocol: Streamable HTTP

Streamable HTTP is deprecated and may be removed in a future release. We highly recommend migrating to the Stdio transport.
If you prefer to connect via the Momentic desktop app instead of the Stdio CLI, you can use Streamable HTTP. This requires the Momentic app to be running before connecting.
Start the app first: Run the Momentic application and ensure it is running before trying to connect to the MCP server.
Streamable HTTP Transport (available in Momentic >= 2.17.2):
POST/GET/DELETE /api/mcp/
Header: mcp-session-id: <session-id>
url: http://localhost:58888/api/mcp

IDE configuration

{
  "mcpServers": {
    "momentic": {
      "url": "http://localhost:58888/api/mcp"
    }
  }
}
Make sure you have started the local app before connecting. If tools don’t appear, restart both the IDE and the Momentic desktop server.