MCP-Server-Playwright
目录
Related MCP server: Playwright MCP Server for Security
特征
🌐 完整的浏览器自动化功能
📸 整个页面或特定元素的屏幕截图
🖱️ 全面的网页交互(导航、点击、表单填写)
📊 控制台日志监控
🔧 在浏览器上下文中执行 JavaScript
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 MCP Server Playwright:
npx -y @smithery/cli install @automatalabs/mcp-server-playwright --client claude您可以使用 npx 或 mcp-get 安装该包:
使用 npx:
npx @automatalabs/mcp-server-playwright install此命令将:
检查您的操作系统兼容性(Windows/macOS)
创建或更新 Claude 配置文件
配置 Playwright 服务器集成
配置文件将在以下位置自动创建/更新:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
使用 mcp-get:
npx @michaellatman/mcp-get@latest install @automatalabs/mcp-server-playwright配置
安装过程将自动将以下配置添加到您的 Claude 配置文件中:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@automatalabs/mcp-server-playwright"]
}
}
}成分
工具
browser_navigate
导航到浏览器中的任意 URL
{
"url": "https://stealthbrowser.cloud"
}browser_screenshot
捕获整个页面或特定元素的屏幕截图
{
"name": "screenshot-name", // required
"selector": "#element-id", // optional
"fullPage": true // optional, default: false
}browser_click
使用 CSS 选择器单击页面上的元素
{
"selector": "#button-id"
}browser_click_text
根据文本内容点击页面上的元素
{
"text": "Click me"
}browser_hover
使用 CSS 选择器将鼠标悬停在页面上的元素上
{
"selector": "#menu-item"
}browser_hover_text
根据文本内容将鼠标悬停在页面上的元素上
{
"text": "Hover me"
}browser_fill
填写输入字段
{
"selector": "#input-field",
"value": "Hello World"
}browser_select
使用 CSS 选择器在 SELECT 元素中选择一个选项
{
"selector": "#dropdown",
"value": "option-value"
}browser_select_text
根据文本内容选择 SELECT 元素中的选项
{
"text": "Choose me",
"value": "option-value"
}browser_evaluate
在浏览器控制台中执行 JavaScript
{
"script": "document.title"
}资源
控制台日志(
console://logs)以文本格式访问浏览器控制台输出
包括来自浏览器的所有控制台消息
屏幕截图(
screenshot://<n>)访问捕获的屏幕截图的 PNG 图像
通过捕获期间指定的名称引用
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
Available Tools
10 toolsbrowser_clickB
Click an element on the page using CSS selector
Inputs: selector (required).
browser_click_textB
Click an element on the page by its text content
Inputs: text (required).
browser_evaluateC
Execute JavaScript in the browser console
Inputs: script (required).
browser_fillB
Fill out an input field
Inputs: selector (required), value (required).
browser_hoverA
Hover an element on the page using CSS selector
Inputs: selector (required).
browser_hover_textB
Hover an element on the page by its text content
Inputs: text (required).
browser_screenshotB
Take a screenshot of the current page or a specific element
Inputs: name (required), selector, fullPage.
browser_selectC
Select an element on the page with Select tag using CSS selector
Inputs: selector (required), value (required).
browser_select_textC
Select an element on the page with Select tag by its text content
Inputs: text (required), value (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose. Pairwise similar tools like click and click_text are differentiated by CSS selector vs text content, making ambiguity minimal.
All tools follow a consistent 'browser_verb' pattern, with optional '_text' suffix for text-based selectors. Snake_case is used uniformly.
10 tools is an appropriate number for browser automation, covering essential actions without being overwhelming. The scope is well-defined.
The set covers core browser interactions (navigation, click, fill, select, hover, evaluate, screenshot). Missing operations like waiting, scrolling, or keyboard input are minor gaps.
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
A real browser for your agent: screenshots, page checks, Markdown and PDFs.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables LLMs to perform web browsing tasks, take screenshots, and execute JavaScript using Puppeteer for browser automation.41MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to perform browser automation tasks including web scraping, taking screenshots, and executing JavaScript using Playwright. It facilitates real-time interaction with web pages and the generation of automated test code.29 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to drive a real browser for web scraping, page interaction, screenshots, JavaScript execution, automated test generation, and responsive device emulation through natural language tool calls.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to control a browser through tools for web automation, including navigation, typing, clicking, and taking screenshots.Apache 2.0