Premvkmishra/Mcp_Server
If you are the rightful owner of Mcp_Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
EduChain MCP Server is a project that implements an MCP server for educational content generation using the EduChain library.
EduChain MCP Server
Overview
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.
Features
- Generate Multiple Choice Questions (MCQs)
- Create structured Lesson Plans
- Generate Flashcards (bonus tool)
- Full MCP protocol compliance
- Async, robust error handling, and logging
Project Structure
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
Setup Instructions
- 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
Usage Examples
See Sample_Responses.txt
for example commands and outputs.
Sample Output
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'}, ...]
Note on EduChain Integration
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.
Citations
- EduChain library: https://github.com/satvik314/educhain
- MCP protocol: https://github.com/anthropics/anthropic-mcp
(Optional) Video Walkthrough
[Link to video walkthrough (if you made one)]
Testing
- See
tests/test_server.py
for automated tests. - See
tests/sample_responses.txt
for sample commands and responses.
Error Handling
- All tools validate parameters and return user-friendly error messages.
- Network/API failures are logged and reported.
Troubleshooting
- Ensure all dependencies are installed.
- Check logs for error details (run with
--debug
for verbose output). - If EduChain API is unavailable, tools will return a clear error message.
License
MIT