Skip to main content
Install the TestDriver connector, and Claude Code can write, run, and debug end-to-end tests in a live sandbox. The connector is the fastest way to get started: one click, a browser sign-in, and no API key to copy. Connectors you install on claude.ai are available automatically in Claude Code, Claude Desktop, and claude.ai chat.

Before you begin

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 the testdriver agent and skills bundled in? Install the TestDriver plugin instead. It bundles three things:
  • The TestDriver MCP server, run locally over stdio
  • The testdriver agent, which builds tests step by step
  • Skills that teach Claude the TestDriver SDK
The plugin requires Node.js 20.19 or later and a TestDriver API key. Create one at console.testdriver.ai/team/api-keys.
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.
Using another MCP client, or want to add the hosted server by URL instead? 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.