Before you begin
- Claude Code, signed in with the same account you use on claude.ai.
- A TestDriver account. Sign up at console.testdriver.ai. The free plan includes 30 testing minutes and needs no credit card.
1
Install the connector
Open the TestDriver listing in the Claude directory:claude.ai/directory/testdriverClick Connect, and sign in to TestDriver when the browser opens.
2
Check the connection
Start a Claude Code session and run
/mcp. The testdriver server should be listed as connected.If it isn’t, make sure Claude Code is signed in to the same account where you installed the connector, then restart the session.3
Write your first test
Ask Claude Code to drive a browser:Claude starts a sandbox, performs each step, and gets a screenshot after every action. Each tool call also returns the SDK code for that step, which Claude assembles into a runnable Vitest test.To save and run those tests locally and in CI, set up a project.
Alternative: install the plugin
Prefer everything to run locally, or want thetestdriver agent and skills bundled in? Install the TestDriver plugin instead. It bundles three things:
- The TestDriver MCP server, run locally over stdio
- The
testdriveragent, which builds tests step by step - Skills that teach Claude the TestDriver SDK
1
Set your API key
The plugin’s MCP server reads your key from the Open a new terminal, or run
TD_API_KEY environment variable. Add it to your shell profile (such as ~/.zshrc) so every Claude Code session can use it:source ~/.zshrc, before you start Claude Code.2
Install the plugin
TestDriver is a community plugin. In Claude Code, run
/plugin, open the Discover tab, search for TestDriver, and install it.You can also install it from TestDriver’s own marketplace:3
Check the connection
Run
/mcp in Claude Code. The testdriver server should be listed as connected.If it isn’t, check that TD_API_KEY is set in the terminal you started Claude Code from.4
Write your first test
Ask for the TestDriver agent by name:The agent starts a sandbox and performs each step. It writes the code into a test file under
tests/, then runs it with Vitest until it passes.Next steps
Generate tests with AI
Prompt the agent and steer it while it works.
Make assertions
Check what’s on screen in plain language.
Run tests
Run your tests locally and choose a device.
Run in CI/CD
Run your tests on every pull request.

