Testdriver:Mcp Workflow logo

Testdriver:Mcp Workflow

Organization
testdriverai
testdriver:mcp-workflow

Build TestDriver tests iteratively using MCP tools with visual feedback

Overview

Publishertestdriverai
Repositorytestdriverai
Skill nametestdriver:mcp-workflow
Stars
465
Forks
39
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by testdriverai on GitHub. Read the source before you install it.

Installation

Install the Testdriver:Mcp Workflow AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/testdriverai/testdriverai/tree/main/ai/skills/testdriver-mcp-workflow
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/testdriverai/testdriverai.git /tmp/testdriverai
mkdir -p .claude/skills
cp -r /tmp/testdriverai/ai/skills/testdriver-mcp-workflow .claude/skills/testdriverai-testdriver-mcp-workflow
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Testdriver:Mcp Workflow in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Testdriver:Mcp Workflow on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Testdriver:Mcp Workflow is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

TestDriver MCP Workflow

Build automated tests by directly controlling a sandbox through MCP tools. Every action returns a screenshot AND the generated code to add to your test file.

When to Use This Skill

Use this skill when:

  • You have access to TestDriver MCP tools (session_start, find, click, etc.)
  • User asks to "write a test", "automate this workflow", "check if X works"
  • You need to build tests iteratively with visual feedback

Overview

Use MCP tools to:

  1. Control the sandbox directly - Click, type, scroll in real-time
  2. See visual feedback - Every action shows a screenshot with overlays
  3. Get generated code - Each successful action returns the code to add to your test file
  4. Build tests incrementally - Append code to test files as you go

Quick Start

1. Start a Session

session_start({ type: "chrome", url: "https://your-app.com" })

This provisions a sandbox with Chrome and navigates to your URL. You'll see a screenshot and the provision code:

Add to test file:
await testdriver.provision.chrome({ url: "https://your-app.com" });

For local development (pointing to a custom API endpoint):

session_start({ 
  type: "chrome", 
  url: "https://your-app.com",
  apiRoot: "https://your-ngrok-url.ngrok.io"
})

For self-hosted AWS instances (your own Windows EC2):

session_start({ 
  type: "chrome", 
  url: "https://your-app.com",
  os: "windows",
  ip: "1.2.3.4"  // IP from your AWS instance
})

See AWS Setup Guide to deploy your own infrastructure.

2. Interact with the App

Find elements and interact with them. Each action returns a screenshot AND generated code:

find_and_click({ description: "Sign In button" })
→ Returns: screenshot with element highlighted
→ Add to test file: await testdriver.find("Sign In button").click();

type({ text: "user@example.com" })
→ Returns: screenshot showing typed text
→ Add to test file: await testdriver.type("user@example.com");

3. Check If Actions Succeeded

After performing actions, use check to verify they worked:

check({ task: "Was the text entered into the field?" })
→ Returns: AI analysis of whether the task completed, with screenshot

check({ task: "Did the button click navigate to a new page?" })
→ Returns: AI compares previous screenshot to current state

4. Make Assertions (for Test Files)

Use assert for boolean pass/fail conditions that get recorded in test files:

assert({ assertion: "the login form is visible" })
→ Returns: pass/fail with screenshot
→ Add to test file:
   const assertResult = await testdriver.assert("the login form is visible");
   expect(assertResult).toBeTruthy();

5. Write the Test File

As you perform actions, append the generated code to your test file:

javascript
/**
 * Login Flow test
 */
import { describe, expect, it } from "vitest";
import { TestDriver } from "testdriverai/lib/vitest/hooks.mjs";

describe("Login Flow", () => {
  it("should complete login", async (context) => {
    const testdriver = TestDriver(context);

    // Append generated code here as you go:
    await testdriver.provision.chrome({ url: "https://app.example.com" });
    await testdriver.find("email input field").click();
    await testdriver.type("user@example.com");
    // ... more code as you perform actions
  });
});

6. Verify the Test

Run the test from scratch to validate it works:

verify({ testFile: "tests/login.test.mjs" })

Tools Reference

Session Management

ToolDescription
session_startStart sandbox with browser/app, returns screenshot + provision code
session_statusCheck session health and time remaining
session_extendAdd more time before session expires

Element Interaction

Each tool returns a screenshot AND the generated code to add to your test file.

ToolDescription
findLocate element by description, returns ref for later use
clickClick on element ref
find_and_clickFind and click in one action
typeType text into focused field
press_keysPress keyboard shortcuts (e.g., ["ctrl", "a"])
scrollScroll page (up/down/left/right)

Verification & Display

ToolDescription
checkFor AI to understand screen state. Analyzes current screen and tells you (the AI) whether a task/condition is met. Use this after actions to verify they worked.
assertAI-powered boolean assertion for test files (pass/fail for CI). Returns generated code.
screenshotFor showing the user the screen. Captures and displays a screenshot. Does NOT return analysis to you (the AI).
execExecute JavaScript, shell, or PowerShell in sandbox. Returns generated code.

Test Validation

ToolDescription
verifyRun test file from scratch to validate it works

Visual Feedback

Every tool returns a screenshot showing:

  • Element highlights - Blue box around found elements
  • Click markers - Red dot with ripple effect at click location
  • Scroll indicators - Arrow showing scroll direction
  • Action status - Success/failure with duration
  • Session info - Time remaining before expiry

Workflow Best Practices

1. Work Incrementally

Don't try to build the entire test at once:

# Step 1: Get to login page
session_start({ url: "https://app.com" })
→ Add to test: await testdriver.provision.chrome({ url: "https://app.com" });

# Step 2: Verify you're on the right page
check({ task: "Is this the login page?" })

# Step 3: Fill in email
find_and_click({ description: "email input field" })
→ Add to test: await testdriver.find("email input field").click();

type({ text: "user@example.com" })
→ Add to test: await testdriver.type("user@example.com");

# Step 4: Check if email was entered
check({ task: "Was the email entered correctly?" })

# Step 5: Continue with password...

2. Use Check After Actions

After each action, use check to verify it worked:

find_and_click({ description: "Submit button" })
check({ task: "Was the form submitted?" })

The check tool compares the previous screenshot (from before your action) with the current state, giving you AI analysis of what changed and whether the action succeeded.

3. Understanding Screen State

For AI understanding: Use check to analyze the screen:

check({ task: "Did the form submit successfully?" })
→ Returns AI analysis you can read and understand

For user visibility: Use screenshot to show the user:

screenshot()
→ Displays to user, no analysis returned to you

Action tools (find, click, find_and_click) return screenshots automatically, which the user can see. But if you need to understand the state, use check.

4. Handle Timing Issues

If elements take time to appear, use find with timeout:

find({ description: "Loading complete indicator", timeout: 30000 })

5. Check Session Time

Sessions expire after 5 minutes by default. Use session_status to check time remaining and session_extend to add more time:

session_status()
→ "Time remaining: 45s"

session_extend({ additionalMs: 60000 })
→ "New expiry: 105s"

6. Write Code as You Go

After each successful action, append the generated code to your test file. This ensures you don't lose progress and makes the test easier to debug.

Error Recovery

Element Not Found

If find fails:

  1. Check the screenshot to see what's actually on screen
  2. Adjust the element description to be more specific
  3. Wait for page load with timeout: find({ description: "...", timeout: 10000 })
  4. Scroll to find off-screen elements: scroll({ direction: "down" })

Session Expired

If the session expires:

  1. session_start again with the same URL
  2. Run the test with verify to get back to last state
  3. Continue from where you left off

Test Verification Fails

If verify fails:

  1. Check the error message and screenshot
  2. Review the test file to see the generated code
  3. Start a new session and manually test the failing step
  4. Adjust element descriptions or add waits as needed

Dependencies

When creating a new test project, use these exact dependencies:

package.json:

json
{
  "type": "module",
  "devDependencies": {
    "testdriverai": "canary",
    "vitest": "^4.0.0"
  },
  "scripts": {
    "test": "vitest"
  }
}

Important: The package is testdriverai (NOT @testdriverai/sdk). Always install from the canary tag.

Test File Format

Create test files using this standard format. Append generated code inside the test function:

javascript
/**
 * Login Flow test
 */
import { describe, expect, it } from "vitest";
import { TestDriver } from "testdriverai/lib/vitest/hooks.mjs";

describe("Login Flow", () => {
  it("should complete Login Flow", async (context) => {
    const testdriver = TestDriver(context);

    // Append generated code from each action here:
    await testdriver.provision.chrome({ url: "https://app.example.com" });
    
    await testdriver.find("email input field").click();
    await testdriver.type("user@example.com");
    
    await testdriver.find("password field").click();
    await testdriver.type("secret123");
    
    await testdriver.find("Sign In button").click();
    
    const assertResult = await testdriver.assert("dashboard is visible");
    expect(assertResult).toBeTruthy();
  });
});

Self-Hosted AWS Instances

You can use your own AWS-hosted Windows instances instead of TestDriver cloud. This gives you:

  • Flat license fee - No device-second metering
  • Your own AI keys - Use your OpenAI/Anthropic keys
  • Custom configuration - Install custom software, configure networking
  • Full debugging access - RDP into instances

Quick Setup

  1. Deploy AWS infrastructure using CloudFormation

  2. Spawn an instance:

    bash
    AWS_REGION=us-east-2 \
    AMI_ID=ami-0504bf50fad62f312 \
    AWS_LAUNCH_TEMPLATE_ID=lt-xxx \
    bash setup/aws/spawn-runner.sh

    Output: PUBLIC_IP=1.2.3.4

  3. Connect via session_start:

    session_start({
      type: "chrome",
      url: "https://example.com",
      os: "windows",
      ip: "1.2.3.4"
    })
  4. Terminate when done:

    bash
    aws ec2 terminate-instances --instance-ids i-xxx --region us-east-2

Environment Variable

You can also set TD_IP environment variable in your MCP config instead of passing ip to each session:

json
{
  "mcpServers": {
    "testdriver": {
      "env": {
        "TD_API_KEY": "your-key",
        "TD_IP": "1.2.3.4"
      }
    }
  }
}

Tips

  1. Every action returns generated code - Look for "Add to test file:" in responses and append that code

  2. Use check to understand the screen - This is how you (the AI) see and analyze the current state

  3. Use screenshot to show the user - This displays the screen to the user, but does NOT return analysis to you

  4. Use check after every action - Verify your actions succeeded before moving on

  5. Be specific with element descriptions - "the blue Sign In button in the header" is better than "button"

  6. Use check for verification, assert for test files - check gives detailed AI analysis, assert gives boolean pass/fail for CI

  7. Write code incrementally - Append generated code to your test file after each successful action

  8. Extend session proactively - If you have complex workflows, extend before you run out of time

Frequently asked questions

What does the Testdriver:Mcp Workflow AI skill do?

Build TestDriver tests iteratively using MCP tools with visual feedback

Why use Testdriver:Mcp Workflow on TypingMind?

Because you install it once and use it with any model. Testdriver:Mcp Workflow is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Testdriver:Mcp Workflow in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/testdriverai/testdriverai/tree/main/ai/skills/testdriver-mcp-workflow. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Testdriver:Mcp Workflow?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Testdriver:Mcp Workflow?

As many as you like. As long as a model supports skills, you can use Testdriver:Mcp Workflow with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Testdriver:Mcp Workflow AI skill free?

It is published on GitHub by testdriverai. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇