Skip to main content
The Model Context Protocol (MCP) enables AI models to interact with your local Momentic tests via the desktop server. This allows AI assistants in various IDEs to understand, create, and modify your test suites directly.
MCP is currently publicly available for the Momentic local app as of version 2.17.1

Overview

The MCP server provides AI models with access to your Momentic project through a set of specialized tools. These tools allow AI assistants to:
  • Browse and understand your test structure
  • Create new tests with AI assistance
  • Edit existing tests using natural language
  • Manage test environments and configurations
  • Access test and module information

Before you start

Local only: The desktop MCP server runs on your machine so remember to run the momentic application before trying to connect to the MCP server.IDE support: Use an editor that supports MCP (e.g., Cursor, Windsurf, Claude Desktop, Codex, VS Code/Copilot).Project configured: Ensure your project has a valid momentic.config.yaml

Step 1: Enable the MCP server

We support two different transport protocols currently on localhost:
  1. SSE Transport: Available in any version Momentic >= 2.17.1
    GET /api/mcp/sse
    POST /api/mcp/sse?sessionId=<session-id>
    url: http://localhost:58888/api/mcp/sse
    
  2. Streamable HTTP Transport (newer standard): available in any version Momentic >= 2.17.2
    POST/GET/DELETE /api/mcp/
    Header: mcp-session-id: <session-id>
    url: http://localhost:58888/api/mcp
    
New features will be aimed at the Streamable HTTP standard but we will continue to support SSE for legacy versions of IDEs.

Step 2: Set up your MCP client

Make sure you have started the local app then follow the steps for your IDE below.
  • Cursor
  • VS Code (GitHub Copilot)
Example configuration (used in Cursor as of 2025‑09‑19). This is an example and may not work universally across VS Code–branched IDEs.
{
  "mcpServers": {
    "momentic-desktop": {
      "url": "http://localhost:58888/api/mcp"
    }
  }
}
Setup Steps:
  1. Open Cursor’s command palette (Cmd Shift P)
  2. Navigate to “View: Open MCP Settings” command
  3. Add the momentic-mcp
  4. Restart the MCP server

Step 3: Agent Rules

Open your IDE’s or CLI’s agent‑rules settings and add one of the following suggested rules to prevent models from directly editing your test or module YAML files.
// Use this one if you want to have the agent ask you before edits
Never directly edit a Momentic test or module YAML file, only use the edit test MCP tool, and prompt the user before making changes.
// Use this if you want the agent to just implement your prompt without added approval
Never directly edit Momentic test or module YAMLs. 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.
NOTE: Many IDEs and CLIs let you hide or protect files from agents (e.g., .cursorignore). Enable these safeguards where available.

Step 4: Use tools in your IDE

  • Verify you have started the Momentic application
  • Verify the MCP server appears in your IDE (e.g., Copilot Agent mode → Tools)
  • Try a simple action (e.g., list tests) to confirm connectivity
  • If tools don’t appear, restart both the IDE and the Momentic desktop server
NOTE: Several IDEs only provide support for MCP in agent mode

Security considerations

  • Local Only: The MCP server is designed for local development only
  • No Authentication: Currently no authentication is required for local access
  • Session Management: Sessions are automatically cleaned up on disconnection
  • Resource Access: MCP tools have access to your local file system and project data

Example Usage:

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

Best practices

  1. Start Desktop Server: Always start your Momentic app before connecting MCP
  2. Project Context: Ensure you’re in the correct project directory
  3. Prompting: While you will see success with unclear directions of how to edit a test, using step by step descriptions will yield faster test edit times and steps closer to exactly what you are envisioning. We suggest keeping the amount of steps per edit_test tool call under 10.
  4. Session Management: Allow sessions to clean up properly by disconnecting cleanly
  5. Tool Safety: All of our tools other than edit test currently cannot do any harm or changes to your project (file creation or read only). Enabling these to auto run is safe. If you use the momentic_edit_test tool be sure you have tracked your changes to the test file it is editing as it will not ask you for permission for each change.

Available Tools

Environment Tools

  • momentic_environment_list
List environments defined in the project’s momentic.config.yaml file.Usage: Returns a JSON array of all configured environments with their settings and configurations.Parameters: NoneExample: momentic_environment_list - Returns all available test environments

Module Tools

  • momentic_module_list
  • momentic_module_get
List all modules in your project.Usage: Returns detailed information about each module including ID, name, description, file paths, and metadata.Parameters: NoneExample: momentic_module_list - Returns all project modules

Test Tools

  • momentic_test_list
  • momentic_test_get
  • momentic_test_create
  • momentic_test_edit
List all tests in your project.Usage: Returns comprehensive test information including metadata, labels, and file paths.Parameters: NoneExample: momentic_test_list - Returns all project tests
I