Mcp Quiz Generator について
Markdown の問題をインタラクティブな HTML と Word 文書に変換する MCP サーバーです。複数の問題形式に対応し、学生用と解答付きの Word ファイルを作成できるため、教員や問題作成者に適しています。
主な機能
- 01単一選択・複数選択問題
- 02正誤問題と短答問題
- 03インタラクティブなHTML出力
- 04学生用・解答付きWordファイル
- 05出力形式とファイル名の指定
活用シーン
- 01Markdownの問題からクイズを作成
- 02HTML形式でインタラクティブなクイズを共有
- 03学生用と教員用のWord文書を準備
MCP 対応
MCP クライアントにクイズ生成ツールを提供します。クライアントは Markdown の内容を渡し、HTML、Word、または両方の出力形式を選択します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
1掲載時のツール一覧 · 2 週間前に更新
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
| custom_filename | string | いいえ | |
| format_type | string | いいえ | |
| markdown_content | string | はい |
詳細
中国語版 README:
MCP Quiz Generator
要件に応じて Markdown 形式の問題を生成し、HTML および Word 形式のクイズファイルに変換する、Model Context Protocol(MCP)ベースのクイズ生成サーバーです。
特長
- 🎯 複数の問題形式に対応:単一選択式、複数選択式、正誤式、短答式
- 📄 インタラクティブな HTML クイズファイルを生成
- 📝 Word 形式のクイズファイルを生成(解答付き版と学生版を含む)
- 🔧 MCP プロトコルベースで、Cursor、VSCode などのエディターと連携
- ⚡ uv による高速な依存関係管理
対応する問題形式
単一選択式問題
1. Which testing automation frameworks has MaxSoft developed?
- [x] IntelliAPI (Correct answer marked with [x])
- [ ] WebBot (Incorrect answer marked with [ ])
- [ ] Gauge
- [ ] Selenium
複数選択式問題
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
正誤式問題
3. MaxSoft is a software company.
- (x) True (Correct answer marked with (x))
- ( ) False (Incorrect answer marked with ( ))
短答式問題
4. Who is the co-founder of MaxSoft?
- R:= Osanda (Answer marked with R:= followed by correct answer)
インストールとセットアップ
前提条件
- Python 3.10 以上
- uv パッケージマネージャー
Cursor/VSCode での MCP の設定
方法 1:uvx を使用(推奨)
-
MCP 設定ファイルを作成します:
Cursor/VSCode で MCP 設定を開き、次の設定を追加します。
{ "mcpServers": { "mcp-quiz-generator": { "command": "uvx", "args": ["mcp-quiz-generator" , "--output-folder" , "{output-folder-path}"] } } }
注:{output-folder-path} を、生成ファイルの保存先パスに置き換えてください。
方法 2:Python を直接使用
-
まず、依存関係がインストールされていることを確認します:
uv sync -
MCP 設定に追加します:
{ "mcpServers": { "mcp-quiz-generator": { "command": "/path/to/mcp-quiz-generator/.venv/bin/python", "args": ["run", "mcp-quiz-generator" , "--output-folder" , "{output-folder-path}"] } } }
注:{output-folder-path} を、生成ファイルの保存先パスに置き換えてください。
ツールのパラメーター
markdown_content:Markdown 形式のクイズ内容format_type:出力形式"html":HTML ファイルのみを生成"word":Word ファイルのみを生成"both":HTML ファイルと Word ファイルの両方を生成(デフォルト)
custom_filename:カスタムファイル名(省略可、拡張子なし)
出力ファイル
--output-folder パラメーターを使用しない場合、生成ファイルはデフォルトで data/ ディレクトリに保存されます。
-
HTML ファイル:オンライン回答に対応したインタラクティブなクイズ
-

-
Word ファイル:

-
*_quiz.docx:学生版(解答なし) -
*_answer_key.docx:教師版(解答と採点マーク付き)
プロジェクト構成
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
トラブルシューティング
よくある問題
-
uv コマンドが見つからない
- uv が正しくインストールされ、PATH に追加されていることを確認してください
- ターミナルまたはエディターを再起動してください
-
MCP サーバーへの接続に失敗する
- 設定ファイル内のパスが正しいことを確認してください
- 仮想環境が作成されていることを確認してください:
uv sync - 詳細なエラー情報については、エディターの MCP ログを確認してください
-
生成されたファイルの形式が正しくない
- Markdown の内容が指定された形式に従っていることを確認してください
- 選択肢のインデントが正しいことを確認してください(スペース 4 個)
--output-folder パラメーターの説明
--output-folder パラメーターは、生成するクイズファイルの出力先ディレクトリを指定します。
構文:
uv run mcp-quiz-generator --output-folder <directory-path>
パラメーターの説明:
<directory-path>:出力ファイルのディレクトリパスを指定します- デフォルト値:
data(このパラメーターを指定しない場合、ファイルはdata/ディレクトリに保存されます) - 指定したディレクトリが存在しない場合、プログラムが自動的に作成します
使用例:
# 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
使用例
会話の完全な例:プロンプトエンジニアリングのクイズを生成する
AI アシスタントを通じてプロンプトエンジニアリングに関するクイズを生成する、完全な使用例を紹介します。
ユーザーの質問:
Q: give me some quiz about Prompt Engineering then generate word and html file
AI アシスタントの応答:
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
ライセンス
MIT License
コントリビューション
Issue や Pull Request を歓迎します。
参考資料
https://github.com/osandadeshan/markdown-quiz-generator
変更履歴
v0.1.0
- 初回リリース
- 基本的なクイズ生成機能に対応
- HTML および Word 形式での出力に対応
- MCP プロトコルとの連携
v0.1.1
- パッケージに app フォルダー内のファイルが含まれていない問題を修正
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。