«

Cursor节省对话次数终极MCP方案

时间:2025-5-27 15:31     作者:六度科技     分类: cursor&vscode


交互式反馈MCP安装指南

简介

交互式反馈MCP是一个用于Cursor等AI辅助开发工具的人机协同工作流服务器,允许运行命令、查看输出并直接向AI提供文本反馈。本指南将帮助您在新电脑上快速设置此服务。

前提条件

安装步骤

1. 获取MCP代码

有两种方式:

方式一:使用git克隆

git clone https://github.com/noopstudios/interactive-feedback-mcp.git

方式二:直接下载

2. 安装依赖

打开命令行,进入项目目录:
直接安装所需依赖:

cd 路径/到/interactive-feedback-mcp
pip install fastmcp>=2.0.0 psutil>=7.0.0 pyside6>=6.8.2.1

3. 配置Cursor

创建MCP配置文件

  1. 在Cursor的配置目录创建或编辑mcp.json文件

    • Windows: %APPDATA%\Cursor\User\mcp.json
    • macOS: ~/Library/Application Support/Cursor/User/mcp.json
    • Linux: ~/.config/Cursor/User/mcp.json
  2. 添加以下配置(替换路径为实际MCP目录):

{
  "mcpServers": {
    "interactive-feedback-mcp": {
      "command": "python",
      "args": [
        "D:\\路径\\到\\interactive-feedback-mcp-main\\server.py"
      ],
      "timeout": 600,
      "autoApprove": [
        "interactive_feedback"
      ]
    }
  }
}

4. 配置Cursor提示

在Cursor的自定义提示中添加以下内容:

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.
Keep calling MCP until the user's feedback is empty, then end the request.

加强版规则:

Whenever you're about to complete a user request, you must invoke the MCP interactive_feedback instead of terminating the process.
Whenever you need to ask a question, you must exclusively call the MCP interactive_feedback.
Persist in invoking MCP until all user feedback is exhausted, only then finalize the request.

使用方法

  1. 启动Cursor
  2. Cursor会自动启动MCP服务
  3. 当AI需要获取您的反馈时,会弹出交互式反馈窗口
  4. 在反馈窗口中输入您的反馈并点击"发送反馈"按钮

常见问题

MCP服务未自动启动

如果MCP服务未自动启动,可以手动启动:

cd 路径/到/interactive-feedback-mcp
python server.py

依赖安装问题

如果安装依赖时遇到问题,可以尝试使用--user标志:

pip install --user fastmcp>=2.0.0 psutil>=7.0.0 pyside6>=6.8.2.1

更新MCP

要更新MCP服务到最新版本:

cd 路径/到/interactive-feedback-mcp
git pull  # 如果是通过git克隆的
pip install -r requirements.txt  # 更新依赖

如果是通过下载ZIP方式安装,请下载最新版本并重复安装步骤。

联系方式

如有问题,请联系Fábio Ferreira: