Cursor+playwright+mcp,好玩

360影视 国产动漫 2025-04-17 09:40 2

摘要:第六步,唤起Cursor对话框,输入指令,开启表演,比如演示一个“打开百度,搜索贝克汉姆,按照时间先后顺序获取最新10条信息,整理成日报,生成一个网站展示出来”。注意下图红色箭头选“Agent”

Cursor+playwright+mcp能干嘛,我就不多说,本文只讲怎么用上

第一步,安装下载Cursor、node.js,至于什么python环境,playwright网上一堆教程,自己查

第二步,打开Cursor,进入Cursor页

第三步,配置mcp,点击左侧,右侧点击add new goldal。。。

第四步,把配置信息直接复制进去(后面会讲这些配置文件怎么来的)

第五步,检查mcp服务状态,绿色就代表服务正常了,红色代表服务异常,右侧刷新或者检查配置信息

第六步,唤起Cursor对话框,输入指令,开启表演,比如演示一个“打开百度,搜索贝克汉姆,按照时间先后顺序获取最新10条信息,整理成日报,生成一个网站展示出来”。注意下图红色箭头选“Agent”

第七步,检查效果,生成网站,碟。

后面还搞了制定链接打开-输入账号密码登录-系统内创建数据,都是ok没毛病,刺激(点点点测试药丸)

其他其他:

1、Cursor默认开启每执行一步需要确认,防止误操作,这里关闭,还有禁止删除等限制,也在这里设置

2、提供mcp服务的站点,就是上面一长串配置文件从这些地方获取到的,推荐Smithery.ai

3、一长串json配置文件

{ "mcpServers": { "@smithery-ai-server-sequential-thinking": { "command": "cmd" , "args":[ "/c", "npx", "-y" , "@smithery/cli@latest", "run", "@smithery-ai/server-sequential-thinking", "--config", "{}" ] }, "esmithery-ai-fetch": { "command": "cmd", "args": [ "/c", "npx", "-y", "@smithery/cli@latest", "run", "@smithery-ai/fetch", "--config", "{}" ] }, "files": { "command": "cmd", "args":[ "/c" , "npx" , "-y" , "@modelcontextprotocol/server-filesystem", "C:/Users/Simon/Desktop" ] }, "@wopal-mcp-server-hotnews": { "command": "cmd" , "args":[ "/c", "npx", "@wopal/mcp-server-hotnews" ] }, "playwright":{ "command": "cmd" , "args": [ "/c" , "npx" , "-y", "@executeautomation/playwright-mcp-server" ] }, "hn-server": { "command": "cmd" , "args":[ "/c", "npx" , "-y" , "@smithery/cli@latest", "run", "@pskill9/hn-server" ] }, "duckduckgo-mcp-server":{ "command": "cmd" , "args":[ "/c" , "npx", "-y", "@smithery/cli@latest", "run", "anickclyde/duckduckgo-mcp-server" ] } }}

来源:墨码行者

相关推荐