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