Playwright Server
About
A server for browser automation using the Playwright library.
Details
- Author
- ziux
- Categories
- Web Scraping, Automation, Developer Tools, Other
Jump to
Setup
Install Playwright Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/ziux/playwright-plus-python-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A server for browser automation using the Playwright library.
- 自定义note://URI方案用于访问单个笔记
- 每个笔记资源具有名称、描述和text/plain MIME类型
- summarize-notes: 创建所有存储笔记的摘要
- 可选"style"参数控制详细程度(brief/detailed)
- 生成结合所有当前笔记与样式偏好的提示
-
playwright_new_session: 创建新的浏览器会话并打开浏览器窗口
- 需要url参数(字符串),如不包含http或https前缀将自动添加https://
- 如果没有活跃的浏览器会话,会自动创建一个新会话
- 需要name参数(字符串),截图文件名称,不需要包含扩展名
- 可选selector参数(字符串),CSS选择器用于指定要截图的页面元素,不填则截取整个页面
playwright_evaluate: 在浏览器控制台中执行JavaScript代码
- 需要script参数(字符串),需要在浏览器中执行的JavaScript代码
playwright_get_text_content: 获取当前页面中所有可见元素的文本内容
playwright_get_html_content: 获取页面中指定元素的HTML内容
- 需要selector参数(字符串),CSS选择器用于定位需要获取HTML内容的页面元素
- playwright_action: 支持丰富的元素选择与交互方式
- 必需参数:
- by: 选择元素方式,支持get_by_text、get_by_placeholder、get_by_label、get_by_role等
- by_value: 选择元素的值
- action: 操作类型,如fill、click、dblclick、hover、check等
- value: 操作的值
- force: 是否强制执行动作
- delay: 按键之间的延迟(毫秒)
- 以及更多专用参数,参见代码文档
MacOS:~/Library/Application\ Support/Claude/claude_desktop_config.jsonWindows:%APPDATA%/Claude/claude_desktop_config.json
"mcpServers": { "playwright-server": { "command": "uv", "args": [ "--directory", "C:\\Users\\xxxxx\\Documents\\project\\python\\mcp\\playwright-server", "run", "playwright-server" ] } }
"mcpServers": { "playwright-server": { "command": "uvx", "args": [ "playwright-server" ] } }
- 令牌:--token或UV_PUBLISH_TOKEN
- 或用户名/密码:--username/UV_PUBLISH_USERNAME和--password/UV_PUBLISH_PASSWORD
由于MCP服务器通过stdio运行,调试可能具有挑战性。为获得最佳调试体验,我们强烈推荐使用MCP Inspector。
npx @modelcontextprotocol/inspector uv --directory C:\Users\xxxxx\Documents\project\python\mcp\playwright-server run playwright-server
启动后,Inspector将显示一个URL,您可以在浏览器中访问该URL开始调试。
# 创建会话并导航到指定网址 await playwright_navigate(url="example.com") # 截取整个页面 await playwright_screenshot(name="fullpage") # 截取特定元素 await playwright_screenshot(name="logo", selector=".logo")
# 点击文本匹配的按钮 await playwright_action(by="get_by_text", by_value="登录", action="click") # 填充表单字段 await playwright_action(by="get_by_placeholder", by_value="用户名", action="fill", value="test@example.com") # 检查元素是否可见 await playwright_action(by="get_by_test_id", by_value="submit-button", action="is_visible")
Take screenshots and read console logs from web pages using Playwright.
Control a browser for automation and web scraping tasks using Playwright.
Browser automation using Playwright with video recording. Enables LLMs to interact with web pages through structured accessibility snapshots.
An AI agent for the Playwright MCP server, enabling automated web testing and interaction.
Generate Playwright BDD tests, GitHub Actions and Azure Pipelines with business-rule traceability, focused CodeGraph context and persistent Engram memory.
Autonomous QA MCP that tests web and macOS apps like a real engineer and verifies every bug.
A Playwright-based MCP server that exposes a live browser as a traceable, inspectable, debuggable and controllable execution environment for AI agents.
Browser automation via Chrome DevTools Protocol
Drive, inspect, and assert on real Electron desktop apps from an AI agent — agent-native, Playwright-style automation with accessibility refs, stable error codes, and retrying assertions
Playwright MCP for Godot, screenshots, SceneTree manipulation, and arbitrary GDScript execution at runtime through a local UDP bridge.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


