Mcp_Server

Premvkmishra/Mcp_Server

3.1

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

  1. Clone the repository.
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. (Optional) Set up OpenAI API key if you have one.
  4. Run the server:
    python run_server.py
    
  5. (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

(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