EduChain MCP Server
Uses OpenAI's API to power EduChain's educational content generation capabilities for creating multiple-choice questions, lesson plans, and flashcards.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@EduChain MCP Servergenerate 5 multiple choice questions about photosynthesis"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: EduChain MCP Server
π 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
Clone the repository:
git clone https://github.com/yourusername/educhain-mcp.git cd educhain-mcpInstall dependencies:
pip install -e .Or install manually:
pip install educhain>=0.3.10 httpx>=0.28.1 "mcp[cli]>=1.10.1" python-dotenvSet up environment variables: Create a
.envfile in the project root:OPENAI_API_KEY=your_openai_api_key_here
π Usage
Running the Server
python mcp_server.pyThe 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
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
π Acknowledgments
EduChain for the educational content generation capabilities
Model Context Protocol for the integration framework
Claude Desktop for the AI assistant platform
π§ Support
For issues, questions, or contributions, please:
Check the Issues page
Create a new issue if your problem isn't already listed
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
Available Tools
3 toolsgenerate_flashcardsA
Generate educational flashcards for effective study and memorization.
This function creates a set of flashcards using EduChain's content engine,
focusing on key concepts, definitions, and important facts related to the topic.
Each flashcard contains a question/prompt on one side and a comprehensive
answer on the other side, optimized for spaced repetition learning.
Args:
topic (str): The subject area, concept, or learning domain for which to
create flashcards. Should be specific enough to generate focused content.
Examples: "Spanish Vocabulary - Food", "Chemistry - Periodic Table",
"History - World War I Events"
num_cards (int, optional): The number of flashcards to generate.
Defaults to 10. Must be between 1 and 50.
difficulty (Optional[str]): The difficulty level for the flashcards.
Options: "beginner", "intermediate", "advanced". If not provided,
a mixed difficulty approach will be used.
Returns:
Dict[str, Any]: A dictionary containing the generated flashcards and metadata.
On success:
- flashcards: List of flashcard objects with front and back content
- topic: The input topic
- count: Number of flashcards generated
- difficulty: Difficulty level (if specified)
On error:
- error: Detailed error message
Raises:
ValueError: If num_cards is not in the valid range (1-50)
Example:
>>> generate_flashcards("Spanish Vocabulary - Animals", 5, "beginner")
{
"flashcards": [
{
"front": "What is the Spanish word for 'dog'?",
"back": "perro (masculine noun)"
},
{
"front": "Translate: 'The cat is sleeping'",
"back": "El gato estΓ‘ durmiendo"
},
...
],
"topic": "Spanish Vocabulary - Animals",
"count": 5,
"difficulty": "beginner"
}
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| num_cards | No | ||
| difficulty | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it generates flashcards with question/answer pairs, uses a content engine, optimizes for spaced repetition, includes error handling with error messages, and raises ValueError for invalid num_cards. It doesn't mention rate limits, authentication needs, or destructive effects, but covers core operational behavior adequately.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with purpose, followed by detailed parameter and return explanations. Every sentence adds value, though the example is lengthy but informative. It could be slightly more concise by integrating some details more tightly, but overall structure is logical and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no annotations, but with output schema), the description is highly complete. It covers purpose, usage context, detailed parameter info, return values (including success/error cases), and provides an example. The output schema exists, so return value explanation in the description is beneficial but not strictly necessary, making this thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate fully. It excels by providing detailed parameter semantics: topic as 'subject area, concept, or learning domain' with examples, num_cards with default, range, and optional status, and difficulty with options, default behavior, and optional status. This adds substantial meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate educational flashcards for effective study and memorization' and specifies it uses 'EduChain's content engine' with 'key concepts, definitions, and important facts.' It distinguishes from sibling tools (generate_mcqs, lesson_plan) by focusing on flashcard generation rather than multiple-choice questions or lesson plans. However, it doesn't explicitly contrast with siblings in the description text.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for study and memorization with spaced repetition learning, but doesn't explicitly state when to use this tool versus generate_mcqs or lesson_plan. It provides context about educational content generation but lacks specific guidance on alternative selection or exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_mcqsA
Generate multiple-choice questions (MCQs) for a given educational topic.
This function leverages EduChain's QnA engine to create well-structured
multiple-choice questions with correct answers and plausible distractors.
Each question includes four options with one correct answer.
Args:
topic (str): The educational topic or subject area for which to generate
questions. Should be specific enough to generate focused questions.
Examples: "Photosynthesis", "World War II", "Python Programming"
num_questions (int, optional): The number of questions to generate.
Defaults to 5. Must be between 1 and 20.
Returns:
Dict[str, Any]: A dictionary containing the generated questions and metadata.
On success, includes:
- questions: List of question objects with options and correct answers
- topic: The input topic
- count: Number of questions generated
On error, includes:
- error: Error message describing what went wrong
Raises:
ValueError: If num_questions is not in the valid range (1-20)
Example:
>>> generate_mcqs("Photosynthesis", 3)
{
"questions": [
{
"question": "What is the primary purpose of photosynthesis?",
"options": ["A) ...", "B) ...", "C) ...", "D) ..."],
"correct_answer": "B"
},
...
],
"topic": "Photosynthesis",
"count": 3
}
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| num_questions | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it uses 'EduChain's QnA engine', generates 'well-structured' questions with 'four options and one correct answer', includes error handling with error messages, and specifies the ValueError exception for parameter validation. However, it doesn't mention rate limits, authentication requirements, or potential side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, parameters, returns, raises, example) and front-loaded with the core functionality. While comprehensive, some sentences could be more concise (e.g., the returns section is somewhat verbose). Overall, most content earns its place by adding value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity, no annotations, and the presence of an output schema, the description is complete enough. It thoroughly explains parameters, return structure (including success/error cases), exceptions, and provides a concrete example. The output schema means the description doesn't need to detail return values beyond what's provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds substantial meaning beyond the input schema, which has 0% description coverage. It provides detailed explanations for both parameters: 'topic' includes purpose, specificity guidance, and concrete examples; 'num_questions' explains default value, valid range, and constraints. This fully compensates for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verb ('generate') and resource ('multiple-choice questions'), and distinguishes it from sibling tools by specifying the type of educational content (MCQs vs flashcards or lesson plans). The opening sentence directly answers what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through the 'educational topic' specification and parameter examples, but doesn't explicitly state when to use this tool versus the sibling tools (generate_flashcards, lesson_plan). No guidance is provided about alternative scenarios or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lesson_planA
Generate a comprehensive, structured lesson plan for a given educational topic.
This function creates a detailed lesson plan using EduChain's content engine,
including learning objectives, materials needed, activities, and assessment methods.
The lesson plan follows educational best practices and can be customized for
different grade levels and durations.
Args:
topic (str): The subject, concept, or learning objective for the lesson.
Should be specific and focused. Examples: "Introduction to Fractions",
"The American Revolution", "Basic HTML Tags"
duration (Optional[str]): The intended duration of the lesson.
Examples: "45 minutes", "1 hour", "2 class periods". If not provided,
a standard duration will be assumed.
grade_level (Optional[str]): The target grade level or educational level.
Examples: "Grade 5", "High School", "College Level", "Adult Education".
If not provided, a general approach will be used.
Returns:
Dict[str, Any]: A comprehensive lesson plan dictionary containing:
On success:
- title: Lesson title
- objectives: Learning objectives and goals
- materials: Required materials and resources
- activities: Structured learning activities
- assessment: Methods for evaluating student learning
- duration: Lesson duration
- grade_level: Target grade level
On error:
- error: Detailed error message
Example:
>>> lesson_plan("Photosynthesis", "50 minutes", "Grade 7")
{
"title": "Understanding Photosynthesis",
"objectives": ["Students will understand...", "Students will be able to..."],
"materials": ["Textbook", "Microscope", "Plant samples"],
"activities": [
{
"name": "Introduction",
"duration": "10 minutes",
"description": "..."
},
...
],
"assessment": "Quiz on key concepts",
"duration": "50 minutes",
"grade_level": "Grade 7"
}
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| duration | No | ||
| grade_level | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it uses 'EduChain's content engine,' follows 'educational best practices,' and can be 'customized for different grade levels and durations.' It also details the return structure and error handling. However, it does not mention potential limitations like rate limits, authentication needs, or content generation constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and appropriately sized, starting with a clear purpose statement, followed by functional details, parameter explanations, return values, and an example. Most sentences earn their place by adding value, though some parts could be slightly more concise (e.g., the example is detailed but necessary). It is front-loaded with key information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (generating educational content), no annotations, and an output schema provided, the description is complete. It explains the tool's purpose, behavior, parameters, return structure (including success and error cases), and includes a practical example. The output schema existence means the description doesn't need to detail return values further, and it adequately covers all necessary contextual aspects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description must fully compensate. It provides detailed semantics for all three parameters: 'topic' with examples and specificity guidance, 'duration' with examples and default behavior, and 'grade_level' with examples and default behavior. This adds significant meaning beyond the basic schema, ensuring clarity on usage and expectations.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate a comprehensive, structured lesson plan for a given educational topic.' It specifies the verb ('generate'), resource ('lesson plan'), and scope ('comprehensive, structured'), distinguishing it from sibling tools like 'generate_flashcards' and 'generate_mcqs' which focus on different educational resources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for creating lesson plans with educational best practices and customization for grade levels/durations, but does not explicitly state when to use this tool versus alternatives like the sibling tools. It mentions customization features but lacks explicit guidance on scenarios where this tool is preferred over others or any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: generate_flashcards creates study cards for memorization, generate_mcqs produces multiple-choice questions for assessment, and lesson_plan designs structured teaching guides. There is no overlap in functionality, and the descriptions clearly differentiate their educational applications.
All three tools follow a consistent verb_noun naming pattern (generate_flashcards, generate_mcqs, lesson_plan). The use of 'generate' for two tools and 'lesson' for the third is appropriate given their distinct outputs, maintaining readability and predictability throughout.
With only 3 tools, the server feels under-scoped for an educational content generation domain. While the tools cover flashcards, MCQs, and lesson plans, there are likely missing operations like quiz generation, study guides, or content summarization that would better serve the apparent purpose.
The tool set has significant gaps for an educational server. It lacks tools for updating or managing generated content, creating different assessment types (e.g., essays, true/false), or integrating with learning management systems. This incomplete coverage may lead to agent failures when broader educational workflows are needed.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
AI-powered corporate learning platform β manage courses, users, and insights via Claude.
Create, edit, translate, and export SCORM eLearning modules from a connected AI assistant.
Voice-led, FSRS-scheduled flashcards from YouTube, PDFs, web, or text. Auto-graded quizzes.
Connect Claude to your Platform7n workspaces β chat, links, and tasks. One-click OAuth.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to interact with the Gauntlet Incept system for generating, tagging, and grading educational content for K-8 students directly through natural language.1
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered generation of educational content including multiple-choice questions, lesson plans, and flashcards on any topic through integration with the EduChain library and DeepSeek model via OpenRouter.
- FlicenseNot gradedqualityCmaintenanceIntegrates the EduChain library with Claude Desktop to generate educational content such as multiple-choice questions, lesson plans, and flashcards. It utilizes Gemini LLMs through LangChain to provide local and secure content generation tools.
- FlicenseNot gradedqualityDmaintenanceEnables the generation of educational content such as multiple choice questions, lesson plans, and flashcards by connecting local Ollama models to Claude. It leverages the Educhain library to provide structured AI-powered learning tools through the Model Context Protocol.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TAKSH-PAL/Educhain_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server