npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

user-feedback-mcp-server

v1.0.0

Published

MCP Server - CRM管理系统用户意见与反馈,支持提交意见、查询历史反馈及状态、修改处理状态

Readme

CRM 用户意见与反馈 MCP Server

一个基于 Node.js 的 MCP(Model Context Protocol)Server,为 CRM 管理系统提供用户意见与反馈功能。用户可在 CodeBuddy/WorkBuddy 中安装后,通过 AI 对话提交反馈、查询历史意见及回复、修改处理状态并填写回复。

功能

| 工具 | 说明 | 适用人员 | |------|------|----------| | submit_feedback | 提交一条用户意见反馈 | CRM 系统使用人员 | | list_feedbacks | 查询历史意见反馈及处理状态 | 全部人员 | | update_feedback_status | 修改反馈的处理状态及回复内容 | CRM 开发人员/需求方 |

工作流程

功能一:提交用户意见反馈

CRM 使用人员在 CodeBuddy 中描述意见或问题
        ↓
AI 整理反馈内容,确认反馈人
        ↓
调用 MCP 工具 submit_feedback → 后端 /mcp/feedback/save 接口
        ↓
反馈内容、反馈人、反馈时间保存到 tra_user_feedback 表

功能二:查询历史意见反馈

用户在 CodeBuddy 中提问:
  "查询我的历史反馈" / "有哪些未处理的反馈"
        ↓
AI 调用 MCP 工具 list_feedbacks → 后端 /mcp/feedback/history 接口
        ↓
返回反馈列表(内容 + 处理状态)展示给用户

功能三:修改反馈处理状态及回复

开发人员/需求方在 CodeBuddy 中:
  "把反馈ID xxx 标记为已处理,回复:该功能已排在 v2.1 迭代计划中"
        ↓
AI 调用 MCP 工具 update_feedback_status → 后端 /mcp/feedback/updateStatus 接口
        ↓
反馈状态更新成功,回复内容、回复人、回复时间记录到 tra_user_feedback 表

认证说明

后端管理系统已接入认证服务,MCP Server 调用 API 时需要通过 CRM_MCP_ACCESS_KEY 标识用户身份。

获取 Access Key

  1. 打开浏览器,访问后端管理系统
  2. 使用账号密码登录
  3. 登录成功后,系统会生成一个 access-key
  4. 复制该 key,配置到 MCP Server 的环境变量 CRM_MCP_ACCESS_KEY

无感传递

MCP Server 在每次请求后端 API 时,自动在 HTTP 请求头中添加:

CrmMcpAccessKey: <你的access-key>

开发者无需手动传参即可完成认证。


安装

方式一:全局安装(推荐)

npm install -g user-feedback-mcp-server

方式二:npx 直接运行(无需安装)

无需安装,npx 自动下载并运行。


配置 MCP

CodeBuddy 配置

在 CodeBuddy 的 MCP 配置中添加:

已全局安装的情况:

{
  "mcpServers": {
    "user-feedback": {
      "command": "user-feedback-mcp-server",
      "env": {
        "FEEDBACK_API_BASE_URL": "http://你的后端服务地址:端口",
        "CRM_MCP_ACCESS_KEY": "从管理系统获取的access-key"
      }
    }
  }
}

使用 npx(无需安装):

{
  "mcpServers": {
    "user-feedback": {
      "command": "npx",
      "args": ["-y", "user-feedback-mcp-server"],
      "env": {
        "FEEDBACK_API_BASE_URL": "http://你的后端服务地址:端口",
        "CRM_MCP_ACCESS_KEY": "从管理系统获取的access-key"
      }
    }
  }
}

WorkBuddy 配置

在 WorkBuddy 设置中找到 MCP 配置,添加同上配置。


环境变量

| 变量名 | 说明 | 默认值 | 必填 | |--------|------|--------|------| | FEEDBACK_API_BASE_URL | 后端 CRM 服务地址(不含路径后缀) | http://localhost:3000 | 否 | | CRM_MCP_ACCESS_KEY | 登录管理系统后获取的 access-key | 无 | |


后端 API 要求

MCP Server 依赖的后端服务需要提供以下接口(认证方式:请求头 CrmMcpAccessKey):

POST /mcp/feedback/save — 提交反馈

// 请求体
{
  "content": "希望能支持批量导入功能",
  "feedbackBy": "张三"
}

// 返回
{
  "code": 200,
  "msg": "操作成功"
}

GET /mcp/feedback/history — 查询历史反馈

GET /mcp/feedback/history?feedbackBy=张三&isProcessed=UNPROCESSED

参数:

  • feedbackBy(可选):按反馈人员筛选
  • isProcessed(可选):按状态筛选,UNPROCESSED-未处理 / PROCESSED-已处理
// 返回
{
  "code": 200,
  "data": [
    {
      "id": 1234567890123456789,
      "content": "希望能支持批量导入功能",
      "feedbackBy": "张三",
      "feedbackTime": "2026-06-05 10:30:00",
      "isProcessed": "UNPROCESSED",
      "replyContent": null,
      "replyBy": null,
      "replyTime": null
    }
  ]
}

POST /mcp/feedback/updateStatus — 修改处理状态及回复

// 请求体(仅修改状态)
{
  "id": "1234567890123456789",
  "isProcessed": "PROCESSED"
}

// 请求体(修改状态并附带回复)
{
  "id": "1234567890123456789",
  "isProcessed": "PROCESSED",
  "replyContent": "该功能已排在 v2.1 迭代计划中",
  "replyBy": "开发-王五"
}

// 返回
{
  "code": 200,
  "msg": "操作成功"
}

处理状态说明

| 状态 | 英文值 | 含义 | |------|--------|------| | 未处理 | UNPROCESSED | 反馈已提交,待管理员/需求方处理(默认状态) | | 已处理 | PROCESSED | 反馈已被处理或采纳 |


项目结构

user-feedback-mcp-server/
├── package.json
├── README.md
└── src/
    ├── index.js      # MCP Server 入口,注册 3 个工具
    └── client.js     # HTTP 客户端,对接后端 API(含认证)

使用示例

安装并配置好 MCP Server 后,在 CodeBuddy 中可以这样使用:

用户: "我想提个意见:建议增加夜间模式"

AI: [自动调用 submit_feedback 工具,提交反馈]
    反馈已提交成功!

用户: "查询下我提交的反馈"

AI: [调用 list_feedbacks 工具]
    您共有 3 条反馈:
    1. [未处理] 建议增加夜间模式 - 2026-06-05
    2. [已处理] 希望支持批量导入 - 2026-06-03
    ...

用户(开发人员): "把反馈 1234567890123456789 标记为已处理,回复说该功能已排在 v2.1 迭代计划中"

AI: [调用 update_feedback_status 工具,附带回复内容]
    反馈状态已更新为「已处理」,已附带回复内容

本地开发

git clone <仓库地址>
cd user-feedback-mcp-server
npm install

启动前确保已配置环境变量:

export FEEDBACK_API_BASE_URL="http://your-backend-service:port"
export CRM_MCP_ACCESS_KEY="your-access-key"
npm start