MCP Server — ma-pony/mcp-playwright

基于Playwright的模型上下文协议(MCP)服务器,为AI助手提供强大的浏览器自动化能力

Local serverstdioPython

What is the MCP Server?

基于Playwright的模型上下文协议(MCP)服务器,为AI助手提供强大的浏览器自动化能力

The short version

  1. 创建浏览器会话 python # 使用 create_browser_session 工具 await create_browser_session( browser_type="chromium", headless=True, viewport_width=1280, viewport_height=720 )

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat 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 - 浏览器健康检查

How to install the MCP Server

{
  "mcpServers": {
    "playwright": {
      "command": "mcp-playwright"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • “Use MCP to create browser session.”
  • “Use MCP to close browser session.”
  • “Use MCP to navigate to url.”

Frequently asked questions

基于Playwright的模型上下文协议(MCP)服务器,为AI助手提供强大的浏览器自动化能力 Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.