mcp-quiz-generator

mcp-quiz-generator

Generates quizzes from Markdown content and outputs interactive HTML and Word documents.

Category
访问服务器

README

chinese README in here:

README_ZH.md

MCP Quiz Generator

A quiz generator server based on Model Context Protocol (MCP) that generates Markdown questions according to requirements and converts them into HTML and Word format quiz files.

Features

  • 🎯 Support for multiple question types: single choice, multiple choice, true/false, short answer
  • 📄 Generate interactive HTML quiz files
  • 📝 Generate Word format quiz files (including answer key and student versions)
  • 🔧 Based on MCP protocol, integrates with editors like Cursor, VSCode
  • ⚡ Fast dependency management using uv

Supported Question Formats

Single Choice Questions

1. Which testing automation frameworks has MaxSoft developed?
    - [x] IntelliAPI  (Correct answer marked with [x])
    - [ ] WebBot      (Incorrect answer marked with [ ])
    - [ ] Gauge
    - [ ] Selenium

Multiple Choice Questions

2. Which testing automation frameworks has MaxSoft developed?
    - [x] IntelliAPI  (Multiple correct answers all marked with [x])
    - [x] WebBot      
    - [ ] Gauge       (Incorrect answer marked with [ ])
    - [ ] Selenium

True/False Questions

3. MaxSoft is a software company.
    - (x) True        (Correct answer marked with (x))
    - ( ) False       (Incorrect answer marked with ( ))

Short Answer Questions

4. Who is the co-founder of MaxSoft?
    - R:= Osanda      (Answer marked with R:= followed by correct answer)

Installation and Setup

Prerequisites

  • Python 3.10 or higher
  • uv package manager

Configuring MCP in Cursor/VSCode

Method 1: Using uvx (Recommended)

  1. Create MCP configuration file:

    In Cursor/VSCode, open MCP settings and add the following configuration:

    {
      "mcpServers": {
        "mcp-quiz-generator": {
          "command": "uvx",
          "args": ["mcp-quiz-generator" , "--output-folder" , "{output-folder-path}"]
        }
      }
    }
    

Note: Replace {output-folder-path} with the storage path for generated files.

Method 2: Using Python directly

  1. First ensure dependencies are installed:

    uv sync
    
  2. Add to MCP configuration:

    {
      "mcpServers": {
        "mcp-quiz-generator": {
          "command": "/path/to/mcp-quiz-generator/.venv/bin/python",
          "args": ["run", "mcp-quiz-generator" , "--output-folder" , "{output-folder-path}"]
        }
      }
    }
    

Note: Replace {output-folder-path} with the storage path for generated files.

Tool Parameters

  • markdown_content: Quiz content in Markdown format
  • format_type: Output format
    • "html": Generate HTML file only
    • "word": Generate Word file only
    • "both": Generate both HTML and Word files (default)
  • custom_filename: Custom filename (optional, without extension)

Output Files

If the --output-folder parameter is not used, generated files will be saved in the data/ directory by default:

  • HTML file: Interactive quiz with online answering support

  • image-20250826102712411

  • Word files:

    image-20250826102752443

  • *_quiz.docx: Student version (without answers)

  • *_answer_key.docx: Teacher version (with answers and markings)

Project Structure

mcp-quiz-generator/
├── src/
│   └── quiz_mcp/
│       ├── __init__.py
│       ├── server.py          # MCP server main file
│       └── app/               # Application module directory
│           ├── extensions/    # Markdown extensions
│           └── static/        # Static resource files
├── data/                      # Output file directory (default)
├── pyproject.toml            # Project configuration
├── uv.lock                   # Dependency lock file
└── README.md                 # Project documentation

Troubleshooting

Common Issues

  1. uv command not found

    • Ensure uv is properly installed and added to PATH
    • Restart terminal or editor
  2. MCP server connection failed

    • Check if paths in configuration file are correct
    • Ensure virtual environment is created: uv sync
    • Check editor's MCP logs for detailed error information
  3. Generated file format is incorrect

    • Check if Markdown content follows specified format
    • Ensure options have correct indentation (4 spaces)

--output-folder Parameter Description

The --output-folder parameter is used to specify the output directory for generated quiz files.

Syntax:

uv run mcp-quiz-generator --output-folder <directory-path>

Parameter Description:

  • <directory-path>: Specifies the directory path for output files
  • Default value: data (if this parameter is not specified, files will be saved to data/ directory)
  • If the specified directory doesn't exist, the program will create it automatically

Usage Examples:

# Use default output directory (data/)
uv run mcp-quiz-generator

# Specify custom output directory
uv run mcp-quiz-generator --output-folder ./my_quizzes

# Specify absolute path
uv run mcp-quiz-generator --output-folder /home/user/quiz_files

# Specify relative path
uv run mcp-quiz-generator --output-folder ../output

Usage Example

Complete Conversation Example: Generating Prompt Engineering Quiz

Here's a complete usage example showing how to generate a quiz about Prompt Engineering through an AI assistant:

User Question:

Q: give me some quiz about Prompt Engineering then generate word and html file

AI Assistant Response:

Of course, I can generate a quiz about Prompt Engineering for you. Here are a few questions. I will then use a tool to generate the Word and HTML files.

Here is the quiz content:

#### Single Choice Questions

1. What is a core principle of prompt engineering?
   -  Using the shortest prompt possible.
   -  Providing clear and specific instructions.
   -  Using complex vocabulary.
   -  Always asking for a single-word answer.

#### Multiple Choice Questions

1. Which of the following are common prompt engineering techniques?
   -  Zero-shot prompting
   -  Few-shot prompting
   -  Chain-of-thought prompting
   -  Random word generation

#### True/False Questions

1. "Few-shot prompting" involves giving the model several examples before asking the final question.
   - (x) True
   - ( ) False

#### Short Answer Questions

1. What technique encourages a model to explain its reasoning step-by-step before giving a final answer?
   - R:= Chain-of-thought prompting

Now, let me generate the files for you.

(mcp-quiz-generator : generate_quiz completed)

I have generated the quiz files for you in both Word and HTML formats. Here are the files that have been created:

- **HTML (Interactive Quiz):** `{output-folder-path}\Prompt_Engineering_Quiz.html`
- **Word (Quiz for students):** `{output-folder-path}\Prompt_Engineering_Quiz_quiz.docx`
- **Word (Answer Key):** `{output-folder-path}\Prompt_Engineering_Quiz_answer_key.docx`

Let me know if you need anything else

License

MIT License

Contributing

Issues and Pull Requests are welcome!

Reference

https://github.com/osandadeshan/markdown-quiz-generator

Changelog

v0.1.0

  • Initial release
  • Support for basic quiz generation functionality
  • Support for HTML and Word format output
  • MCP protocol integration

v0.1.1

  • Fix missing files from the app folder in the package

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选