Verdex helps AI coding assistants write robust Playwright tests. It combines:
- MCP tools for token-efficient DOM exploration (100-1K tokens vs 10K+ dumps)
- that teach LLMs modern Playwright patterns and the Container → Content → Role methodology
接入你的智能体
从发布者处安装。不是 PlugMCP 端点。
远程 URL 还是本机命令? 两种安装方式的区别
AI assistants don't know how to write good Playwright tests or efficiently explore page structure. Verdex gives them both the tools and the knowledge.
Without Verdex — AI generates brittle selectors:
await page.getByRole('button', { name: 'Add to Cart' }).nth(8).click(); // 💀 Breaks on reorder
await page.locator('.btn-primary').first().click(); // 💀 Breaks on CSS change
With Verdex — AI generates stable selectors:
await page
.getByTestId('product-card')
.filter({ hasText: 'iPhone 15 Pro' })
.getByRole('button', { name: 'Add to Cart' })
.click(); // ✅ Survives any DOM restructuring
Playwright MCP gives AI a browser. Verdex teaches AI to write tests like a senior QA engineer.
{
"mcpServers": {
"verdex": {
"command": "npx",
"args": ["@verdex/mcp@latest"]
}
}
}
For Cursor:
mkdir -p .cursor/rules
cp node_modules/@verdex/mcp/.cursor/rules/*.mdc .cursor/rules/
For Claude: Use skills from node_modules/@verdex/mcp/.claude/skills/verdex-playwright-complete/
User: "Write a test that adds an iPhone to the cart"
AI (with Verdex):
→ Navigates to page, takes snapshot
→ Uses resolve_container to find stable test IDs
→ Uses inspect_pattern to find unique content
→ Generates container-scoped, role-based selector
→ Writes test following Playwright best practices
👉 Try the 60-second demo — See the full workflow in action
Use browser tools to understand the app:
browser_initialize()
browser_navigate("https://shop.example.com")
browser_click("e5") // Click using ref from snapshot
browser_snapshot() // See what changed
Build stable selectors with progressive DOM exploration:
resolve_container("e25") // Find containers with test IDs
inspect_pattern("e25", 2) // Analyze sibling structure
extract_anchors("e25", 1) // Mine deep content if needed
Write idiomatic Playwright tests:
test('should add product to cart', async ({ page }) => {
await page.goto('/products');
await page
.getByTestId('product-card')
.filter({ hasText: 'iPhone 15 Pro' })
.getByRole('button', { name: 'Add to Cart' })
.click();
await expect(page.getByText('Item added')).toBeVisible();
});
Test different user roles in isolated browser contexts:
{
"mcpServers": {
"verdex": {
"command": "npx",
"args": [
"@verdex/mcp@latest",
"--role", "admin", "/path/to/admin-auth.json", "https://admin.example.com",
"--role", "user", "/path/to/user-auth.json", "https://app.example.com"
]
}
}
}
Uses Playwright's storageState format for auth files.
The rules and skills are essential — they teach AI the patterns that make selectors stable.
Cursor Rules (.cursor/rules/):
cp node_modules/@verdex/mcp/.cursor/rules/*.mdc .cursor/rules/
Claude Skills (.claude/skills/):
We welcome contributions! See CONTRIBUTING.md for guidelines.
Areas we'd love help with:
Apache 2.0 — see LICENSE
Tools + Knowledge = Tests That Don't Break
MCP Server for Playwright Test Writing
工具
暂无工具列表。远程服务器在首次健康检查后会获得工具列表。
常见问题
在本页复制适用于 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 配置。它使用发布者的安装方式,而不是 PlugMCP 代理。
此记录未列出必需的环境变量。
Verdex 通过 stdio 在本地运行。
上次检查时间:2026-10-28。 MCP Server for Playwright Test Writing