EduChain MCP Server

EduChain MCP Server

Integrates EduChain's educational content generation capabilities with Claude Desktop, enabling creation of multiple-choice questions, comprehensive lesson plans, and flashcards for any educational topic.

Category
Visit Server

README

EduChain MCP Server

A Model Context Protocol (MCP) server that integrates EduChain's educational content generation capabilities with Claude Desktop and other MCP-compatible clients.

šŸŽÆ Overview

The EduChain MCP Server provides three powerful educational tools accessible through Claude Desktop:

  • šŸ“ Multiple Choice Questions (MCQs): Generate well-structured questions with plausible distractors
  • šŸ“š Lesson Plans: Create comprehensive, structured lesson plans with objectives, activities, and assessments
  • šŸ—‚ļø Flashcards: Generate educational flashcards optimized for spaced repetition learning

šŸš€ Features

  • Claude Desktop Integration: Seamless integration with Claude Desktop via MCP protocol
  • Type-Safe Implementation: Full type hints and comprehensive docstrings
  • Error Handling: Robust error handling and graceful degradation
  • Logging: Comprehensive logging for debugging and monitoring
  • Input Validation: Thorough validation of all input parameters
  • Environment Configuration: Support for environment variables
  • MCP Inspector Compatible: Works with MCP Inspector for debugging

šŸ“‹ Requirements

  • Python 3.10 or higher
  • OpenAI API key (for EduChain functionality)
  • Claude Desktop (for MCP integration)

šŸ”§ Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/educhain-mcp.git
    cd educhain-mcp
    
  2. Install dependencies:

    pip install -e .
    

    Or install manually:

    pip install educhain>=0.3.10 httpx>=0.28.1 "mcp[cli]>=1.10.1" python-dotenv
    
  3. Set up environment variables: Create a .env file in the project root:

    OPENAI_API_KEY=your_openai_api_key_here
    

šŸƒ Usage

Running the Server

python mcp_server.py

The server will start and listen for MCP connections via stdio transport, making it compatible with Claude Desktop.

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Linux: ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "Educhain_mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/Educhain_mcp",
        "run",
        "mcp_server.py"
      ]
    }
  }
}

MCP Inspector

For debugging and development, you can use the MCP Inspector:

npx @modelcontextprotocol/inspector python mcp_server.py

šŸ› ļø Available Tools

1. Generate MCQs

Function: generate_mcqs(topic: str, num_questions: int = 5)

Description: Generate multiple-choice questions for a given educational topic.

Parameters:

  • topic (str): The educational topic (e.g., "Photosynthesis", "World War II")
  • num_questions (int, optional): Number of questions to generate (1-20, default: 5)

Example:

result = generate_mcqs("Photosynthesis", 3)

2. Lesson Plan

Function: lesson_plan(topic: str, duration: Optional[str] = None, grade_level: Optional[str] = None)

Description: Generate a comprehensive, structured lesson plan.

Parameters:

  • topic (str): The lesson topic (e.g., "Introduction to Fractions")
  • duration (str, optional): Lesson duration (e.g., "45 minutes", "1 hour")
  • grade_level (str, optional): Target grade level (e.g., "Grade 5", "High School")

Example:

result = lesson_plan("Photosynthesis", "50 minutes", "Grade 7")

3. Generate Flashcards

Function: generate_flashcards(topic: str, num_cards: int = 10, difficulty: Optional[str] = None)

Description: Generate educational flashcards for study and memorization.

Parameters:

  • topic (str): The subject area (e.g., "Spanish Vocabulary - Animals")
  • num_cards (int, optional): Number of flashcards to generate (1-50, default: 10)
  • difficulty (str, optional): Difficulty level ("beginner", "intermediate", "advanced")

Example:

result = generate_flashcards("Spanish Vocabulary - Animals", 5, "beginner")

šŸ“ Project Structure

educhain-mcp/
ā”œā”€ā”€ mcp_server.py          # Main MCP server implementation
ā”œā”€ā”€ main.py                # Simple entry point (not used for MCP)
ā”œā”€ā”€ pyproject.toml         # Project configuration and dependencies
ā”œā”€ā”€ README.md              # This documentation
└── .env                   # Environment variables (create this)

šŸ” Logging

The server includes comprehensive logging to help with debugging and monitoring:

  • INFO Level: Server startup, tool execution, and success messages
  • WARNING Level: Missing environment variables and non-critical issues
  • ERROR Level: Tool execution failures and server errors

Logs are formatted with timestamps and include the module name for easy identification.

šŸ›”ļø Error Handling

The server implements robust error handling:

  • Input Validation: All parameters are validated before processing
  • Graceful Degradation: Errors are returned as structured responses
  • Logging: All errors are logged with detailed messages
  • Type Safety: Full type hints prevent common runtime errors

šŸ¤ Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

šŸ™ Acknowledgments

šŸ“§ Support

For issues, questions, or contributions, please:

  1. Check the Issues page
  2. Create a new issue if your problem isn't already listed
  3. Provide detailed information about your environment and the issue

šŸ”„ Changelog

v0.1.0

  • Initial release
  • Basic MCP server implementation
  • Three educational tools: MCQs, lesson plans, flashcards
  • Claude Desktop integration
  • Comprehensive documentation and error handling

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured