chinese README in here:
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)
-
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
-
First ensure dependencies are installed:
uv sync -
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 formatformat_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
-
-
Word files:
-
*_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
-
uv command not found
- Ensure uv is properly installed and added to PATH
- Restart terminal or editor
-
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
-
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 todata/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
Metadata
Release files for mcp-quiz-generator 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_quiz_generator-0.1.1.tar.gz | 124.3 kB | Without provenance | Details for mcp_quiz_generator-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_quiz_generator-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mcp_quiz_generator-0.1.1-py3-none-any.whl |
Total release size: 139.2 kB
Release files / mcp_quiz_generator-0.1.1.tar.gz
| Download URL | mcp_quiz_generator-0.1.1.tar.gz |
|---|---|
| Size | 124.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a77a5a716ecfd4345b31b395d67d1fc30d1ef64416f1996433cea0574c2260a7
|
|
BLAKE2b-256 checksum How to use checksums |
2011b50730a8b976ba5274aa2948ef59e4fd9c7fc1bb826fecea28593be877f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Release files / mcp_quiz_generator-0.1.1-py3-none-any.whl
| Download URL | mcp_quiz_generator-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cec223a6ec0dda9258e56b4257871efe4c64ff6c2ce7dee4880ba91cac96c8a2
|
|
BLAKE2b-256 checksum How to use checksums |
123ff72ff0c279b60ce33637e04d65a04e33b5ca6ba6bd81c1f8ec92d878c464
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Security for mcp-quiz-generator 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.