EduChain MCP Server

$pip install educhain langchain_ollama
README.md

Generates educational content like MCQs, lesson plans, and flashcards

🧠 EduChain MCP Server (Claude + Ollama)

This project exposes educational AI tools like multiple choice question (MCQ) generation, lesson planning, and flashcard creation via the Model Context Protocol (MCP).

It connects:

  • βœ… Local Python MCP server
  • βœ… Local Ollama LLM (e.g., Gemma)
  • βœ… Claude for Desktop using claude_desktop_config.json

πŸš€ Features

Tool Name Description
generate_mcqs Generates MCQs for a given topic
generate_lesson_plan Creates structured lesson plans
generate_flashcards Builds flashcards from topics

Powered by `Educhain` and a local LLM from Ollama.


πŸ“ Project Structure

mcp-educhain-server/ β”œβ”€β”€ mcp_server.py # Main MCP server β”œβ”€β”€ educhain_content.py # AI tool logic using Educhain + Ollama β”œβ”€β”€ claude_desktop_config.json # Claude config (external) β”œβ”€β”€ README.md

yaml Copy Edit


βš™οΈ Requirements

  • Python 3.10+
  • Ollama (e.g., gemma, mistral)
  • Claude for Desktop
  • Dependencies:
    pip install educhain langchain_ollama
    πŸ”Œ Claude Config (claude_desktop_config.json)
    Located at:
    

bash Copy Edit %APPDATA%\Claude\claude_desktop_config.json Use this format:

json Copy Edit { "mcpServers": { "educhain-server": { "command": "C:\Users\YourUsername\AppData\Local\Programs\Python\Python310\python.exe", "args": ["mcp_server.py"], "workingDirectory": "C:\Users\YourUsername\Desktop\mcp-educhain-server", "env": { "PYTHONIOENCODING": "utf-8" } } } } πŸ§ͺ Test Your Server In terminal:

bash Copy Edit cd mcp-educhain-server python mcp_server.py Check with:

bash Copy Edit echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | python mcp_server.py 🧠 Example Prompts in Claude "Generate 5 MCQs on Photosynthesis"

"Create a lesson plan for Algebra"

"Make flashcards for World War 2"

πŸ› Troubleshooting βœ… Use absolute paths in the config

βœ… Add PYTHONIOENCODING=utf-8

βœ… Print debug logs to stderr

Check Claude logs via β€œOpen Logs Folder”

πŸ“œ License MIT License

✨ Credits Educhain

Ollama

Claude Desktop

Tools (3)

generate_mcqsGenerates MCQs for a given topic
generate_lesson_planCreates structured lesson plans
generate_flashcardsBuilds flashcards from topics

Environment Variables

PYTHONIOENCODINGrequiredSet to utf-8 to ensure proper character encoding

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "educhain-server": {
      "command": "python",
      "args": ["mcp_server.py"],
      "workingDirectory": "/path/to/mcp-educhain-server",
      "env": {
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}

Try it

β†’Generate 5 MCQs on Photosynthesis
β†’Create a lesson plan for Algebra
β†’Make flashcards for World War 2

Frequently Asked Questions

What are the key features of EduChain MCP Server?

Multiple Choice Question (MCQ) generation for any topic. Structured lesson plan creation. Flashcard generation for study materials. Integration with local Ollama LLMs like Gemma or Mistral. Powered by the Educhain library for structured educational output.

What can I use EduChain MCP Server for?

Teachers creating automated assessments and quiz questions. Students generating flashcards for exam preparation. Educators drafting structured lesson plans for classroom topics. Developers building educational tools using local AI models.

How do I install EduChain MCP Server?

Install EduChain MCP Server by running: pip install educhain langchain_ollama

What MCP clients work with EduChain MCP Server?

EduChain MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use EduChain MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free