修改playwright安装目录

set PLAYWRIGHT_BROWSERS_PATH=D:\custom-path\ms-playwright

npx playwright install

cursor mcp配置

{
"mcpServers": {
"playwright": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@executeautomation/playwright-mcp-server",
"--browser-type=chrome"
],
"env": {
"PLAYWRIGHT_BROWSERS_PATH": "D:\\custom-path\\ms-playwright"
}
}
}
}

Cursor开启agent

  • 打开聊天窗口可以看到多了个agent

测试一条指令

调用打开百度官网,输入测试点击搜索并截图。

保存的图片

Logo

欢迎加入 MCP 技术社区!与志同道合者携手前行,一同解锁 MCP 技术的无限可能!

更多推荐