Skip to main content
Glama
interactive-feedback-mcp

interactive-feedback-mcp

by LAVARONG

Interactive Feedback MCP(自用优化版)

本项目基于 Fábio Ferreira 开源的 noopstudios/interactive-feedback-mcp(MIT License)进行自用二次开发与稳定性增强,当前仓库地址:LAVARONG/interactive-feedback-mcp。

它是一个轻量级 MCP Server,用于在 AI 辅助开发过程中弹出桌面反馈窗口(支持执行项目命令、实时查看日志、回传文本反馈),从而在一个任务周期内实现人机协同确认(Human-in-the-loop)。

IMPORTANT

自用定位与计费适用说明(请务必阅读)

  • 为什么自用维护这个版本:本人目前仍在使用 Cursor 老版本每月 500 次请求额度(500 Fast Requests / Month) 的按次计费模式,才需要通过该工具在单次请求流程内反复核对结果、补充要求,尽量减少消耗每月限定的请求次数。

  • 不能减少 Tokens 消耗:每次工具调用、协议心跳以及多轮对话累积的上下文都会正常消耗 Tokens,甚至因为单轮任务拉长而使单次上下文 Tokens 更高。

  • 只能减少“问题 / 请求次数”:它唯一的作用是将原本需要分多次发消息向 AI 提问/返工的操作,折叠到同一次任务调用链中完成。

  • 对新版计费套餐无实际作用:如果你使用的是新版按 Token / 用量计费的 Cursor 套餐或其他按量计费 AI 工具,使用本项目无法节省费用,请根据实际工作流按需选用。

Interactive Feedback UI - Main View Interactive Feedback UI - Command Section Open


本仓库增强特性

在保留原版命令执行、日志收集与 QSettings 按项目保存配置的基础上,本分支针对长时等待与日常交互体验做了以下重点增强:

  1. MCP 超时保活与零丢稿状态机(server.py)

    • 修复协议层进度心跳:修正 fastmcp 2.3.0 下 Context.report_progress(progress, total) 的参数签名,按 5 秒间隔持续发送标准 MCP notifications/progress 与 ctx.info 心跳维持连接活跃。

    • 1 分钟自适应安全接力:默认单轮保活等待 60 秒(在未提供 progressToken 的 Cursor 环境下自动收缩至 52 秒以避开 60 秒硬超时边界),防止客户端断连报错。

    • 保活真空期提交防丢失:内置后台子进程退出监听与结果消费标记;即便你在“保活握手返回 → AI 再次发起调用”的几秒真空期内点击提交,下一轮到达时也会直接取回刚才提交的反馈,绝不丢弃内容或重弹空白窗口。

    • 并发调用防重入:同一时刻仅允许一个主调用等待界面,自动忽略模型同批次误发的并发重复调用,避免竞争删除临时文件或重复弹窗。

  2. UI 草稿自动暂存保险箱(feedback_ui.py)

    • 输入框内容变更时按 500ms 防抖自动暂存到本地临时目录(按项目目录哈希隔离,有效期 24 小时)。

    • 正常点击 Send Feedback 提交会立即清理草稿;若遭遇异常退出或未提交直接关闭,下次打开同项目窗口时会自动恢复草稿,并在输入框上方提供一键清空提示条。

    • 反馈结果采用显式 utf-8 编码与 .tmp 原子替换写入,消除读写竞争。

  3. 提示区舒适展示与一键复制

    • 修复无换行符长文本高度误判问题,Prompt 展示区默认至少舒适展示 6 行内容,支持鼠标划选、右键复制与右上角 “📋 复制提示内容” 一键复制按钮。

  4. HTML 粘贴控制

    • 默认过滤为纯文本粘贴;底部提供全局持久化的 Support HTML Paste 复选框,并支持 Ctrl+Shift+V 临时以相反格式粘贴。

  5. Windows 弹窗提醒与屏幕边界保护

    • 弹窗激活时自动播放 Windows 原生轻提示音(可通过环境变量静音);若从 QSettings 恢复的窗口位置落在已断开的副屏外,自动重定位回主屏居中,避免隐形挂起。


Related MCP server: Flag MCP

快速安装与配置

1. 环境要求

  • Python 3.11 及以上

  • uv 包管理器

2. 克隆与安装依赖

git clone https://github.com/LAVARONG/interactive-feedback-mcp.git
cd interactive-feedback-mcp
uv sync

3. 在 Cursor / 兼容 MCP 的客户端中配置

在客户端的 mcp.json 中添加如下配置(请将 <path-to>/interactive-feedback-mcp 替换为你本机的实际存放路径):

{
  "mcpServers": {
    "interactive-feedback-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "<path-to>/interactive-feedback-mcp",
        "run",
        "server.py"
      ],
      "timeout": 600,
      "autoApprove": [
        "interactive_feedback"
      ]
    }
  }
}
TIP

在实际使用本仓库前,请根据自身客户端环境确认目录路径正确,必要时先通过uv run server.py 确认环境依赖完整。


环境变量说明

所有功能均提供开箱即用的默认配置,如需微调可在 mcp.json 的 "env" 字段中配置以下环境变量:

环境变量

默认值

说明

INTERACTIVE_FEEDBACK_RELAY

true

是否开启超时安全接力机制(true/false)

INTERACTIVE_FEEDBACK_RELAY_TIMEOUT

60

单轮保活等待阈值(秒)。默认 1 分钟;显式设置正整数按指定值生效,<= 0 等同禁用接力

INTERACTIVE_FEEDBACK_HEARTBEAT_INTERVAL

5

向客户端发送 MCP 进度与日志心跳的间隔(秒,最小 1 秒)

INTERACTIVE_FEEDBACK_TIMEOUT

1800

单次窗口会话的全局最长等待上限(秒,默认 30 分钟)

INTERACTIVE_FEEDBACK_SOUND

true

窗口弹出激活时是否播放提示音(true/false)


Prompt 规则建议(Cursor Rules)

配合以下自定义规则可让 AI 助手在关键节点主动通过弹窗向你确认:

  • 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.


更新与设计文档

更多实现细节与迭代记录请查阅:


致谢与协议

Available Tools

1 tool
interactive_feedbackB

Request interactive feedback for a given project directory and summary

Inputs: summary (required), project_directory (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 1 tool

    Disambiguation4/5

    With only one tool exposed there is no possibility of tool-to-tool confusion, so an agent cannot misselect. The only weakness is that the tool's own boundary is loosely stated ('request interactive feedback' for a directory and summary), leaving its exact behavior implicit.

    Naming Consistency4/5

    The single name 'interactive_feedback' is clean snake_case, so there is no inconsistency to violate. It is a noun phrase rather than the conventional verb_noun form, but with one tool no pattern conflict arises.

    Tool Count4/5

    The server has an inherently narrow purpose — asking the user for feedback — and a single tool covers it, so nothing is redundant. The surface is minimal to the point of being thin, with no companion operations for configuring or managing the request.

    Completeness3/5

    The one core operation exists, but obvious adjacent needs are absent: no way to cancel or poll a pending feedback request, no timeout configuration, and no way to retrieve prior feedback. An agent depending solely on this blocking call has limited lifecycle coverage.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI coding assistants like Cursor and Claude to engage in real-time two-way dialogue, allowing them to pause for clarification and request user confirmation before executing tasks. It features a modern UI for managing interaction prompts, predefined options, and project analysis to reduce errors and API costs.
      16
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables human-in-the-loop interaction for AI coding workflows through native desktop dialogs that present route choices, text input, and image annotation capabilities when AI assistants encounter decision points.
      1
      2
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Establishes feedback-oriented development workflows with dual Web UI and Desktop interfaces, enabling AI to confirm with users before actions and consolidate multiple tool calls into a single feedback request.
      2
      2
      -
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI-assisted development tools like Cursor, Cline, and Windsurf to request user confirmation before acting, running shell commands and displaying their output inside a Qt feedback window that returns user notes and logs to the model. This human-in-the-loop loop lets the assistant consolidate many speculative tool calls into a single feedback-aware request, saving API usage and improving accuracy.
      MIT