This project implements an MCP server for educational content generation using the EduChain library. It exposes tools for generating MCQs, lesson plans, and flashcards, and is compatible with Claude Desktop.
- Generate Multiple Choice Questions (MCQs)
- Create structured Lesson Plans
- Generate Flashcards (bonus tool)
- Full MCP protocol compliance
- Async, robust error handling, and logging
educhain-mcp-server/
├── src/
│ ├── __init__.py
│ ├── mcp_server.py
│ ├── educhain_wrapper.py
│ ├── educhain_mock.py
│ └── utils.py
├── config/
│ └── config.json
├── tests/
│ ├── test_server.py
│ └── sample_responses.txt
├── requirements.txt
├── README.md
├── run_server.py
└── Sample_Responses.txt
- Clone the repository.
- Install dependencies:
pip install -r requirements.txt
- (Optional) Set up OpenAI API key if you have one.
- Run the server:
python run_server.py
- (Optional) Test directly:
python test_direct.py
See Sample_Responses.txt for example commands and outputs.
Here's an example of running the direct test script:
$ python test_direct.py
--- Testing generate_mcqs ---
MCQs: [{'question': 'Sample question about Python loops (medium)', 'options': ['A', 'B', 'C', 'D'], 'correct_answer': 'A', 'explanation': 'Sample explanation.'}, ...]
--- Testing create_lesson_plan ---
Lesson Plan: {'objectives': ['Learn algebra'], 'activities': ['Lecture', 'Practice'], 'assessment': 'Quiz'}
--- Testing generate_flashcards ---
Flashcards: [{'front': 'Front 1 about basic mathematics', 'back': 'Back 1'}, ...]Due to lack of OpenAI API access, this project uses a mock implementation of the EduChain API for demonstration and testing purposes. The integration and tool structure are fully compatible with the real EduChain API.
- EduChain library: https://github.com/satvik314/educhain
- MCP protocol: https://github.com/anthropics/anthropic-mcp
[Link to video walkthrough (if you made one)]
- See
tests/test_server.pyfor automated tests. - See
tests/sample_responses.txtfor sample commands and responses.
- All tools validate parameters and return user-friendly error messages.
- Network/API failures are logged and reported.
- Ensure all dependencies are installed.
- Check logs for error details (run with
--debugfor verbose output). - If EduChain API is unavailable, tools will return a clear error message.
MIT