playwright-mcp
如何使用 playwright-mcp?
介绍
playwright-mcp(模型上下文协议)是一款强大的工具,它弥合了 AI 助手和浏览器自动化之间的差距。它使 AI 模型能够与 Web 浏览器交互、检查 DOM 元素、记录用户交互,并生成更高精度的 Playwright 测试脚本。本指南将指导您如何有效地设置和使用 playwright-mcp。
Related MCP server: browser-devtools-mcp
工具
浏览器界面中可用的工具:
浏览器工具箱
选择 DOM (🎯):点击即可从页面中选择并捕获 HTML 元素。使用它来记录测试用例的选择器。
选择图像 (📸):截取特定元素的屏幕截图。适用于视觉测试或文档撰写。
记录交互 (📋):记录浏览器交互,例如点击、输入和导航。这些交互会自动生成选择器,并可以作为上下文传递给 Claude 或 Cursor 等 MCP 客户端,以帮助编写测试用例。
MCP 命令
init-browser:初始化剧作家浏览器。get-context:获取网站上下文,用于编写测试用例execute-code:针对当前页面执行自定义 Playwright JS 代码get-screenshot:获取当前页面的屏幕截图get-full-dom:获取当前页面的完整 DOM。(建议使用get-context代替)
了解更多
想深入了解?查看完整文档:
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server that enables AI-powered browser automation, web scraping, and testing using Playwright across Chromium, Firefox, and WebKit. It allows users to perform actions like navigation, clicking, typing, and taking screenshots through natural language interfaces.10MIT
- Alicense-qualityDmaintenanceAn MCP server that provides AI coding assistants with comprehensive browser automation and debugging capabilities using Playwright, including visual inspection, DOM debugging, and execution monitoring.3,857MIT
- Alicense-qualityAmaintenancePlaywright-powered browser automation and debugging for VS Code and Cursor via the Model Context Protocol (MCP).52MIT
- AlicenseCqualityAmaintenanceAn MCP server that enables AI agents to autonomously test, debug, and analyze web interfaces visually using Playwright, with 30 tools for screenshots, workflows, performance, and visual comparison.301780ISC
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Screenshot, diff, audit and sitemap-capture any web page — 5 MCP tools for AI agents.
AI QA tester — real browsers scan sites for bugs, SEO, perf, and accessibility issues via chat.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/qabyai/playwright-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server