testdriver-agent
How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
claude-mcp-plugin
Claude Code
$ npx -y skills add testdriverai/testdriverai --skill testdriver-claude-mcp-plugin --agent claude-code
Codex
$ npx skills add testdriverai/testdriverai --skill testdriver-claude-mcp-plugin -a codex -y
Cursor
$ npx skills add testdriverai/testdriverai --skill testdriver-claude-mcp-plugin -a cursor -y
Gemini CLI
$ npx skills add testdriverai/testdriverai --skill testdriver-claude-mcp-plugin -a gemini-cli -y
GitHub Copilot
$ npx skills add testdriverai/testdriverai --skill testdriver-claude-mcp-plugin -a github-copilot -y
OpenCode
$ npx skills add testdriverai/testdriverai --skill testdriver-claude-mcp-plugin -a opencode -y
Windsurf
$ npx skills add testdriverai/testdriverai --skill testdriver-claude-mcp-plugin -a windsurf -y
name: testdriver:claude-mcp-plugin description: claude-mcp-plugin
<!-- Generated from claude-mcp-plugin.mdx. DO NOT EDIT. -->
TestDriver ships as a native [Claude Code plugin](https://docs.claude.com/en/docs/claude-code/plugins) that bundles the **TestDriver MCP server**, the **`testdriver` expert sub-agent**, and all **TestDriver skills**. You get everything you need to drive TestDriver from Claude Code with a single install.
> The plugin lives inside the `testdriverai` npm package at `ai/.claude-plugin/plugin.json`, and the marketplace entry lives at `.claude-plugin/marketplace.json` in this repo.
export TD_API_KEY="your_api_key_here"
From inside Claude Code, add this repo as a plugin marketplace and install the `testdriver` plugin:
/plugin marketplace add testdriverai/testdriverai /plugin install testdriver@testdriver
That registers three things:
In a Claude Code session, delegate to the agent:
@testdriver Write a test that signs into https://example.com and adds an item to the cart.
The agent will use the TestDriver MCP tools (`session_start`, `find`, `click`, `type`, `assert`, …) to interactively build a Vitest test, append generated code to your test file after every action, and run it with `vitest run` until it passes.
For the full agent guide, see the [`testdriver` agent definition](https://github.com/testdriverai/testdriverai/blob/main/ai/agents/testdriver.md) and the [MCP workflow skill](https://github.com/testdriverai/testdriverai/blob/main/ai/skills/testdriver-mcp-workflow/SKILL.md).
If you prefer not to use the plugin, you can register the MCP server manually in any MCP-compatible client (Claude Desktop, Cursor, VS Code, …):
{
"mcpServers": {
"testdriver": {
"command": "npx",
"args": ["-p", "testdriverai", "testdriverai-mcp"],
"env": {
"TD_API_KEY": "${TD_API_KEY}"
}
}
}
}This is the same config the plugin wires up for you — the plugin just bundles it alongside the agent and skills.
---
TestDriver also runs a **hosted MCP server** you can connect to with just a URL. There is no `npx` command and no API key to paste: the server speaks OAuth 2.1, so your client opens a browser, you sign in with TestDriver, and the tools appear. It exposes the **full live tool set** (`session_start`, `find`, `click`, `type`, `assert`, …) plus the read-only data tools, all scoped to your team.
Hosted endpoint:
https://mcp.testdriver.ai/mcp
The server advertises its authorization server (Auth0) via [RFC 9728](https://www.rfc-editor.org/rfc/rfc9728) protected-resource metadata at:
https://mcp.testdriver.ai/.well-known/oauth-protected-resource
Spec-compliant clients discover and complete the OAuth flow automatically:
{
"mcpServers": {
"testdriver": {
"url": "https://mcp.testdriver.ai/mcp"
}
}
}Each connection gets its own isolated sandbox, so multiple people (or multiple chats) can run tests at the same time without interfering. The API-key paths above still work for automation and CI.
---
TestDriver also exposes **test results and analytics** over an HTTP MCP endpoint, so Claude Code (or any MCP-compatible client) can inspect your test runs, failures, and filters without provisioning a sandbox.
The HTTP endpoint lives at:
POST /api/v1/mcp
It expects the TestDriver API key in the `X-Api-Key` header (or `Authorization: Bearer <key>`).
Common request shapes:
{
"kind": "list_tools"
}{
"kind": "call_tool",
"tool": "list_test_runs",
"arguments": {
"status": "failed",
"page": 1,
"limit": 20
}
}Responses from tool calls follow the MCP content convention:
{
"content": [
{
"type": "json",
"json": {
"testRuns": [],
"totalCount": 0,
"hasMore": false
}
}
]
}The MCP server advertises at least these tools in `list_tools`:
List recent TestDriver test runs for the current team, with filters and pagination.
Get a single test run and its test cases (including replay IDs / share keys when available).
List individual test cases for the team with status, duration, error messages, and replay info.
Get branch, suite, repo, filename, commit, status, platform, and test name options for building queries.
You can point Claude Code at the HTTP MCP endpoint using a JSON configuration similar to:
{
"$schema": "https://schema.anthropic.com/mcp/servers.json",
"mcpServers": {
"testdriver-cloud": {
"type": "sse",How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
Deploy TestDriver on your AWS infrastructure using CloudFormation
How TestDriver learns your app and caches what it discovers for instant, deterministic replays
Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…
Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…
DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…