今天,我将为大家介绍一个神器级的解决方案—— 一个Rules+3个MCP。经过我的实测,这3个配合能让你的 Cursor 使用自动测试并优化cursor自己写的代码,不用再手动每次复制粘贴Bug让cursor看,全程无幻觉,还能把高速回复次数提升到2500次,免费版本IDE也可以使用,把1次Token消耗当10个Tokens用,效率大大提高,极大节省消耗次数。

不仅限于Cursor,Augment,Windsurf ,Trae,只要有MCP和Rules的地方都适合。

也不仅限于付费版,免费版照样适用。

                                                 3个MCP

1. Playwright MCP (可以自动修改你写的BUG)

  • Playwright-MCP 是一个基于 Playwright 的自动化测试框架,支持多种浏览器的端到端测试。

  • 能够模拟用户操作并验证应用程序的功能。它提供了强大的功能和现代化的 API,使得编写和维护测试用例变得更加高效和可靠。

  • 安装环境:Node.js: 确保你的系统上安装了 Node.js(建议使用 LTS 版本);npm: Node.js 安装后会自带 npm(Node 包管理器)

  • 安装与配置

在终端中运行以下命令以安装 Playwright 和 Playwright-MCP:

npm install -g @executeautomation/playwright-mcp-server

{
  "mcpServers":{
    "playwright-mcp-server":{
      "command":"npx",
      "args":[
        "-y",
        "@executeautomation/playwright-mcp-server"
      ]
    }
}
}

2.Context 7(可以防止Cursor幻觉)

  • Context 7 是一个用于管理和维护应用程序状态的工具,旨在简化复杂应用中的状态管理可以实时拉取最新信息、注入 Prompt 上下文、获得准确可靠的回答。

  • 它提供了灵活的 API 和高效的性能,使开发者能够轻松地处理状态变化和数据流。

  • 安装环境:如上个MCP,即Node.js: 确保你的系统上安装了 Node.js(建议使用 LTS 版本);npm: Node.js 安装后会自带 npm(Node 包管理器)

{
  "mcpServers":{
    "context7":{
      "command":"npx",
      "args":["-y","@upstash/context7-mcp@latest"]
    }
  }
}

3.Interactive Feedback MCP(将消耗可提升到2500次+)

  • Interactive Feedback MCP 是一个用于自动化测试的框架,旨在提供实时反馈和交互式调试功能。

  • Playwright 支持 Chromium、Firefox 和 WebKit(Safari),这意味着你可以在多个浏览器上运行测试,而不需要为每个浏览器编写不同的代码。它通过直观的界面和强大的功能,帮助开发者快速识别和解决测试中的问题。

  • 安装环境:

    • Git

    • Python 3.8+

    • uv(Python 包管理器)

如果没有安装 uv,可以通过以下命令安装:

pip install uv

使用(CMD/PowerShell)命令新建文件夹cursor_MCP并Git代码到新建文件夹

Win系统用户示例:

# 创建目录
mkdir D:\temp\cursor_MCP
cd D:\temp\cursor_MCP

# 克隆项目
git clone https://github.com/noopstudios/interactive-feedback-mcp.git

Mac/Linux Win系统用户示例:


# 创建目录
mkdir ~/Documents/dev/cursor-mcp
cd ~/Documents/dev/cursor-mcp

# 克隆项目
git clone https://github.com/noopstudios/interactive-feedback-mcp.git

然后配置MCP

{
  "mcpServers":{
    "playwright-mcp-server":{
      "command":"npx",
      "args":[
        "-y",
        "@executeautomation/playwright-mcp-server"
      ]
    }
}
}

                                          一个Rules

🎯 USER-RULES

    Whenever you want to ask a question, always call the MCP interactive_feedback.Whenever you're about to complete a user request, call the MCP interactive_feedback instead of simply ending the process. If the feedback is empty you can end the request and don't call the mcp in loop.Every chat use the context 7.Use the Playwright to text Bug after you finished the HTML、PHP、ASP.NET and so on which can display or run on playwright.

    💰 这3个MCP搭配Rules提供更强的功能

    • 不用手动每次在聊天框后面加use  context7 

    • 不用手动每次复制粘贴Bug到chat框找原因,Cursor全自动在线找Bug并能自己修复bug

    •  一次Token消耗相当于10次Tokens,极大节省了Tokens,能让你大胆用放心用,不再为了担心Token消耗而经常去官网看看消耗量浪费时间。


       

    Logo

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

    更多推荐