Playwright Server
JSON →A server for browser automation using the Playwright library.
Install
npx @modelcontextprotocol/inspector Tools · 7
- playwright_new_session 创建新的浏览器会话并打开浏览器窗口,可选url参数指定初始访问网址
- playwright_navigate 导航到指定网址,如不包含http或https前缀将自动添加https://,如果没有活跃的浏览器会话会自动创建一个新会话
- playwright_screenshot 对当前页面或特定元素进行截图,需要name参数,可选selector参数指定CSS选择器
- playwright_evaluate 在浏览器控制台中执行JavaScript代码,需要script参数
- playwright_get_text_content 获取当前页面中所有可见元素的文本内容,智能过滤重复内容
- playwright_get_html_content 获取页面中指定元素的HTML内容,需要selector参数
- playwright_action 支持丰富的元素选择与交互方式,包括get_by_text、get_by_placeholder、get_by_label、get_by_role等选择方式,支持fill、click、dblclick、hover、check等操作
Environment variables
UV_PUBLISH_TOKEN