yz174/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 provides educational content generation tools using the educhain library with mock data generation.
generate_mcqs
Generate multiple-choice questions for topics like Python Programming and Algebra.
create_lesson_plan
Create comprehensive lesson plans with learning objectives, activities, and assessments.
EduChain MCP Server
A Model Context Protocol (MCP) server that provides educational content generation tools using the educhain library. This implementation uses mock data generation to demonstrate MCP functionality without requiring API keys.
Project Overview
This assignment demonstrates:
- Task 1: Setting up the EduChain environment with mock data generation
- Task 2: Building an MCP server with educational content tools and resources
- Task 3: Testing the server with Claude Desktop integration
Tools
- generate_mcqs: Generate multiple-choice questions for topics like Python Programming and Algebra
- create_lesson_plan: Create comprehensive lesson plans with learning objectives, activities, and assessments
Resources
- sample-topics: A collection of sample educational topics across programming, mathematics, and science
Installation and Setup
Prerequisites
- Python 3.8+
- Required packages (install via pip):
pip install educhain mcp
Files Structure
educhain-mcp-server/
āāā educhain_mcp_server.py # Main MCP server implementation
āāā test_mcp_server.py # Test script for server functionality
āāā claude_desktop_config.json # Claude Desktop configuration
āāā README.md # This documentation
āāā exploration_scripts/ # Scripts used for investigating educhain
āāā explore_educhain.py
āāā examine_model_fields.py
āāā examine_content_models.py
āāā investigate_api_requirement.py
Usage
1. Test the Server Components
Run the test script to verify functionality:
python test_mcp_server.py
Expected output:
- MCQ generation for Python Programming and Algebra topics
- Lesson plan generation with structured content
- JSON serialization verification
2. Configure Claude Desktop
Copy the claude_desktop_config.json
to Claude Desktop's configuration directory:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Configuration content:
{
"mcpServers": {
"educhain-mcp-server": {
"command": "python",
"args": ["C:\\Users\\Ujjwal\\educhain-mcp-server\\educhain_mcp_server.py"],
"env": {}
}
}
}
Note: Update the path in args
to match your actual installation directory.
3. Test with Claude Desktop
After configuring Claude Desktop, you can test the following commands:
Generate Multiple Choice Questions
Generate 5 multiple-choice questions on Python loops.
Create Lesson Plans
Provide a lesson plan for teaching algebra.
Access Resources
The server provides sample topics that Claude can reference for educational content generation.
Sample Outputs
MCQ Generation Example
{
"topic": "Python Programming",
"num_questions": 3,
"questions": [
{
"question_number": 1,
"question": "What is Python?",
"options": ["A high-level programming language", "A type of snake", "A web browser", "A database"],
"correct_answer": "A high-level programming language",
"explanation": "Python is a high-level, interpreted programming language known for its simplicity and readability."
}
]
}
Lesson Plan Example
# Lesson Plan: Comprehensive Guide to Python Programming
## Subject: Python Programming
## Grade Level: Beginner
### Learning Objectives
1. Understand the fundamental concepts of Python Programming
2. Apply Python Programming principles to solve problems
3. Demonstrate proficiency in Python Programming techniques
4. Connect Python Programming to real-world applications
### Main Topics
1. Introduction to Python - What is Python and why use it?
2. Basic Syntax - Variables, data types, and operators
3. Control Structures - If statements, loops, and functions
4. Data Structures - Lists, dictionaries, and tuples
5. Error Handling - Try/except blocks and debugging
### Learning Activities
1. Install Python and set up development environment
2. Write your first 'Hello World' program
3. Create a simple calculator using functions
4. Build a to-do list application
5. Debug common Python errors
Technical Implementation
Models Used
- MultipleChoiceQuestion: From educhain.models for structuring MCQs
- MCQList: From educhain.models for question collections
- SimpleLessonPlan: Custom Pydantic model for lesson plan structure
Mock Data Generation
The MockEducationalContentGenerator
class provides:
- Template-based MCQ generation for different topics
- Structured lesson plan creation with topic-specific content
- Realistic educational content that demonstrates the MCP capabilities
MCP Server Structure
- Tools: Interactive functions that Claude can call
- Resources: Static content that Claude can access
- Proper Error Handling: Graceful handling of unknown tools/resources
- JSON Schema Validation: Ensures proper input formatting
Testing and Validation
Automated Tests
Run python test_mcp_server.py
to verify:
- MCQ generation functionality
- Lesson plan creation
- JSON serialization
- Model validation
Manual Testing with Claude Desktop
- Verify server connection in Claude Desktop
- Test MCQ generation with various topics
- Test lesson plan creation for different subjects
- Verify resource access functionality
Troubleshooting
Common Issues
Server Connection Failed
- Verify the path in
claude_desktop_config.json
is correct - Ensure Python and required packages are installed
- Check that the server script runs without errors
Import Errors
- Run
pip install educhain mcp
to install dependencies - Verify Python version is 3.8 or higher
Model Validation Errors
- The implementation uses simplified models to avoid educhain's complex requirements
- All models are tested and validated in the test script
Educational Value
This implementation demonstrates:
- MCP Protocol Usage: Proper implementation of tools and resources
- Educational Content Structure: Using educhain models for realistic educational data
- Mock Data Generation: Creating meaningful educational content without external APIs
- Integration Testing: End-to-end testing from server to Claude Desktop
Future Enhancements
Potential improvements:
- Expand Topic Coverage: Add more subject areas and question types
- Dynamic Content: Implement more sophisticated content generation algorithms
- Assessment Tools: Add quiz generation and grading capabilities
- Export Functionality: Allow exporting lesson plans and questions to various formats