> ## Documentation Index
> Fetch the complete documentation index at: https://www.minitap.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor and Claude

> Plug miniTest into your AI coding agent — via the CLI or the MCP server. Author user stories, trigger runs, and read results without leaving your editor.

Your coding agent already knows the feature you just shipped. Plug miniTest in and it writes the tests too.

There are two ways in, and they can do the same things. Pick whichever fits your setup, or use both.

<Tabs>
  <Tab title="CLI">
    The CLI ships with a bundled agent skill. Once installed, your editor's agent uses the same `minitest` commands you'd use in a shell, with the same understanding of [story shape](/docs/minitest/suite/anatomy), criteria rules, and dependencies.

    <Steps>
      <Step title="Install the CLI">
        <CodeGroup>
          ```bash macOS / Linux theme={null}
          curl -fsSL https://raw.githubusercontent.com/minitap-ai/minitest-cli/main/install.sh | bash
          ```

          ```powershell Windows theme={null}
          powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/minitap-ai/minitest-cli/main/install.ps1 | iex"
          ```
        </CodeGroup>
      </Step>

      <Step title="Authenticate">
        ```bash theme={null}
        minitest auth login
        ```

        Opens a browser, pairs the CLI with your workspace, and stores a token locally. One time per machine.
      </Step>

      <Step title="Ask your agent">
        Navigate to your app's codebase and prompt:

        <CodeBlock wrap>
          Using the Minitest CLI, analyze my mobile app codebase and generate user stories for all key user journeys covering core flows, meaningful interactions, and important edge cases, but without going into exhaustive detail. The goal is a solid, representative test suite that reflects how users actually use the app, not just the happy paths.
        </CodeBlock>
      </Step>
    </Steps>

    ### Beyond authoring

    The CLI is also the right surface for scripts, local dev, and uploading manual builds:

    ```bash theme={null}
    # List the apps you can see
    minitest apps list

    # Upload a build
    minitest --app myapp build upload ./path/to/build.ipa

    # Start a run for one user story (waits until done)
    minitest --app myapp run start "Sign up" --android-build 8f9c... --watch

    # Start a run covering every user story
    minitest --app myapp run all --ios-build 4e2b... --android-build 8f9c...
    ```

    All commands accept `--json` for scripting. Target an app with `--app <id-or-name>` or `export MINITEST_APP_ID=...` once per shell.

    For every command and flag, see [CLI commands](/docs/minitest/reference/cli-commands).

    Open source at [github.com/minitap-ai/minitest-cli](https://github.com/minitap-ai/minitest-cli).
  </Tab>

  <Tab title="MCP">
    The MCP server gives your agent direct access to the miniTest backend. It works with **any MCP-compatible client**: Cursor, Claude Code, Windsurf, Cline, Continue, or anything else that speaks the Model Context Protocol.

    <Steps>
      <Step title="Install the MCP server">
        ```bash theme={null}
        npx add-mcp https://testing-service.app.minitap.ai/mcp/ -g -n minitest
        ```
      </Step>

      <Step title="Authenticate">
        Your agent will prompt you to sign in on first use. The session reuses across agent sessions on the same machine. No static API key, no env var.
      </Step>

      <Step title="Ask your agent">
        Navigate to your app's codebase and prompt:

        <CodeBlock wrap>
          Using the Minitest MCP, analyze my mobile app codebase and generate user stories for all key user journeys covering core flows, meaningful interactions, and important edge cases, but without going into exhaustive detail. The goal is a solid, representative test suite that reflects how users actually use the app, not just the happy paths.
        </CodeBlock>

        The MCP server injects a user-stories skill into your agent's context automatically. It knows the story shape, the acceptance criteria rules, and the dependency conventions without you repeating them.
      </Step>
    </Steps>

    ### What your agent can do

    <CardGroup cols={2}>
      <Card title="User stories" icon="library" href="/docs/minitest/reference/mcp-tools#user-stories">
        List, create, update, and delete user stories. Wire dependencies. Attach profiles and files.
      </Card>

      <Card title="Runs" icon="play" href="/docs/minitest/reference/mcp-tools#runs">
        Create runs for a single story or the full suite. Poll for status, read per-criterion results.
      </Card>

      <Card title="Config" icon="settings" href="/docs/minitest/reference/mcp-tools#app-configuration">
        Set profiles per app, update Mini's memory, read the current app configuration.
      </Card>

      <Card title="Docs" icon="book-open" href="/docs/minitest/reference/mcp-tools#documentation">
        Search and read the miniTest docs without leaving the editor.
      </Card>
    </CardGroup>

    For every tool and its payload, see [MCP tools](/docs/minitest/reference/mcp-tools).
  </Tab>
</Tabs>
