基于Playwright的模型上下文协议(MCP)服务器,为AI助手提供强大的浏览器自动化能力
Most browser automation work still happens through a UI a human drives. MCP MCP server moves it into the conversation instead. 基于Playwright的模型上下文协议(MCP)服务器,为AI助手提供强大的浏览器自动化能力.
python # 使用 create_browser_session 工具 await create_browser_session( browser_type="chromium", headless=True, viewport_width=1280, viewport_height=720 ) The server publishes 14 tools. What each one is for:
create_browser_session — 创建新的浏览器会话close_browser_session — 关闭当前浏览器会话navigate_to_url — 导航到指定URLclick_element — 点击页面元素fill_input — 填写输入框wait_for_selector — 等待元素出现get_text_content — 获取元素文本内容get_element_attribute — 获取元素属性值get_page_title — 获取页面标题get_page_url — 获取当前页面URLtake_screenshot — 截取页面截图execute_javascript — 执行JavaScript代码mcp-playwright on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.
Plenty of browser automation servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. MCP's toolset — create_browser_session, close_browser_session, navigate_to_url and 11 more — is a fair guide to whether it matches your workflow.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| create_browser_session | 创建新的浏览器会话 |
| close_browser_session | 关闭当前浏览器会话 |
| navigate_to_url | 导航到指定URL |
| click_element | 点击页面元素 |
| fill_input | 填写输入框 |
| wait_for_selector | 等待元素出现 |
| get_text_content | 获取元素文本内容 |
| get_element_attribute | 获取元素属性值 |
| get_page_title | 获取页面标题 |
| get_page_url | 获取当前页面URL |
| take_screenshot | 截取页面截图 |
| execute_javascript | 执行JavaScript代码 |
| session | //status - 当前会话状态 |
| browser | //health - 浏览器健康检查 |
{
"mcpServers": {
"playwright": {
"command": "mcp-playwright"
}
}
}Configuration as documented by the project. Restart the client after saving.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
Industrial-strength web extraction — render, scrape, crawl and search entire sites into clean markdown.
The original Chromium automation reference server — simple, screenshot-driven browser control.
Give your coding agent the full DevTools toolbox: traces, network, console, heap snapshots and Lighthouse.
Puppeteer-powered browser control that drives pages from the accessibility tree instead of pixels.
Cloud browsers for AI agents — automation sessions that run in Browserbase's fleet, not on your machine.