Skip to main content
Install the TestDriver plugin, and Claude Code can write, run, and debug end-to-end tests in a live sandbox. The plugin bundles three things:
  • The TestDriver MCP server
  • The testdriver agent, which builds tests step by step
  • Skills that teach Claude the TestDriver SDK

Before you begin

1

Set your API key

The plugin’s MCP server reads your key from the TD_API_KEY environment variable. Add it to your shell profile (such as ~/.zshrc) so every Claude Code session can use it:
Open a new terminal, or run 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.
Only need TestDriver’s tools in chat, without the agent or skills? Add the hosted server instead. It signs in through your browser and needs no API key. See MCP Setup.

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.