New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

qmaker-mcp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

qmaker-mcp

Question Maker MCP - AI-powered question generation and management system

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

小猜出题MCP

智能题目生成和审核系统 - Model Context Protocol (MCP) 服务

功能特性

  • 🎯 支持5种题型:单选题、多选题、判断题、填空题、排序题
  • 📝 智能提示词生成:大纲整理、细节补充、题目生成
  • 🔄 题目审核流程:重新完善、答案核实、批量保存
  • 💾 数据库集成:直接保存题目到小猜系统
  • 🌍 多环境支持:开发环境和生产环境

安装

npm install xiaoguai-question-mcp

或全局安装:

npm install -g xiaoguai-question-mcp

快速开始

1. 初始化配置

npx xiaoguai-question-mcp init

根据提示选择环境和配置API Token。

2. 启动MCP服务

# 开发环境
npx xiaoguai-question-mcp start

# 生产环境
npx xiaoguai-question-mcp start --env prod

3. 测试连接

npx xiaoguai-question-mcp test

4. 交互式生成题目

npx xiaoguai-question-mcp generate

配置说明

创建 .env 文件:

# 环境:development(开发)或 production(生产)
NODE_ENV=development

# API Token - 请填写您自己的token
API_TOKEN=your_api_token_here

# 日志级别
LOG_LEVEL=info
VERBOSE=false

环境配置

  • 开发环境: http://127.0.0.1:8000
  • 生产环境: https://ask.he29.com

MCP工具列表

1. get_question_types

获取支持的题目类型列表

输入:无

输出

{
  "success": true,
  "data": [
    {
      "type": 1,
      "name": "单选题",
      "min_options": 2,
      "max_options": 6
    }
  ]
}

2. generate_outline_prompt

生成题目大纲整理提示词

输入

{
  "question_type": 1,
  "topic": "JavaScript闭包",
  "difficulty": 3,
  "custom_requirements": "需要实际代码示例"
}

输出

{
  "success": true,
  "prompt": "# 题目大纲整理\n...",
  "metadata": {
    "question_type": 1,
    "topic": "JavaScript闭包",
    "difficulty": 3
  }
}

3. generate_detail_prompt

生成细节补充提示词

输入

{
  "question_type": 1,
  "topic": "JavaScript闭包",
  "difficulty": 3,
  "outline": "整理后的大纲内容...",
  "user_feedback": "需要更多实例"
}

4. generate_question_prompt

生成完整题目生成提示词

输入

{
  "question_type": 1,
  "topic": "JavaScript闭包",
  "difficulty": 3,
  "enhanced_outline": "增强后的大纲内容...",
  "custom_requirements": "包含代码示例"
}

5. save_question

保存题目到数据库

输入

{
  "question_data": {
    "question_type": 1,
    "title": "以下关于JavaScript闭包的描述,哪个是正确的?",
    "description": "考察对闭包概念的理解",
    "difficulty": 3,
    "category": "JavaScript",
    "options": [
      {"text": "闭包是函数和其词法环境的组合", "is_correct": 1},
      {"text": "闭包只能在全局作用域中创建", "is_correct": 0},
      {"text": "闭包不能访问外部变量", "is_correct": 0},
      {"text": "闭包会导致内存泄漏", "is_correct": 0}
    ],
    "correct_answer": "A",
    "explanation": "闭包是函数和其声明时所在的词法环境的组合...",
    "hint": "考虑函数作用域和变量访问"
  },
  "category_id": 1
}

输出

{
  "success": true,
  "data": {
    "id": 123,
    "question_id": "q_20250118_abc123",
    "message": "题目保存成功"
  }
}

6. batch_save_questions

批量保存题目

7. update_question

更新题目

8. delete_question

删除题目

9. get_question

获取题目详情

10. get_categories

获取题目分类列表

11. generate_refine_prompt

生成题目重新完善提示词

12. generate_verify_prompt

生成答案核实提示词

使用流程

完整出题流程

1. 用户选择题型和主题
   ↓
2. MCP生成大纲整理提示词 (generate_outline_prompt)
   ↓
3. 大模型整理大纲
   ↓
4. 用户确认大纲
   ↓
5. MCP生成细节补充提示词 (generate_detail_prompt)
   ↓
6. 大模型补充细节
   ↓
7. 用户确认细节
   ↓
8. MCP生成题目生成提示词 (generate_question_prompt)
   ↓
9. 大模型生成题目
   ↓
10. 用户核验题目
    ↓
11. MCP保存题目到数据库 (save_question)

题目审核流程

如果题目不正确,可以:

  • 重新完善:使用 generate_refine_prompt 生成重新完善提示词
  • 核实答案:使用 generate_verify_prompt 生成答案核实提示词
  • 删除题目:使用 delete_question 删除当前题目

题目数据格式

单选题

{
  "question_type": 1,
  "title": "题目内容",
  "difficulty": 3,
  "category": "分类名称",
  "options": [
    {"text": "选项A", "is_correct": 1},
    {"text": "选项B", "is_correct": 0},
    {"text": "选项C", "is_correct": 0},
    {"text": "选项D", "is_correct": 0}
  ],
  "correct_answer": "A",
  "explanation": "答案解析"
}

多选题

{
  "question_type": 2,
  "title": "题目内容(多选)",
  "options": [
    {"text": "选项A", "is_correct": 1},
    {"text": "选项B", "is_correct": 1},
    {"text": "选项C", "is_correct": 0},
    {"text": "选项D", "is_correct": 0}
  ],
  "correct_answer": "AB"
}

判断题

{
  "question_type": 3,
  "title": "判断陈述",
  "options": [
    {"text": "正确", "is_correct": 1},
    {"text": "错误", "is_correct": 0}
  ],
  "correct_answer": "A"
}

填空题

{
  "question_type": 4,
  "title": "题目内容,用____表示填空",
  "options": [],
  "correct_answer": "标准答案"
}

排序题

{
  "question_type": 5,
  "title": "将以下选项按正确顺序排列",
  "options": [
    {"text": "第一项", "is_correct": 0, "correct_order": 1},
    {"text": "第二项", "is_correct": 0, "correct_order": 2},
    {"text": "第三项", "is_correct": 0, "correct_order": 3}
  ],
  "correct_answer": "1-2-3"
}

开发调试

# 克隆项目
git clone <repository-url>

# 安装依赖
cd mcp
npm install

# 开发模式
npm run dev

# 测试
npm run test

注意事项

  • API Token: 确保配置正确的API Token
  • 网络连接: 确保能访问API服务器
  • 题目质量: 大模型生成的题目需要人工审核
  • 数据格式: 严格按照JSON格式提交题目数据

许可证

MIT License

联系方式

  • 项目地址: GitHub
  • 问题反馈: Issues

Keywords

mcp

FAQs

Package last updated on 18 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts