MCP Hub
Back to servers

EduChain MCP Server

Integrated with the EduChain library, this server provides tools for generating educational content like MCQs, lesson plans, and flashcards using Gemini LLMs via LangChain.

Tools
2
Updated
Jul 5, 2025

EduChain MCP Server for Claude Desktop

A local MCP (Model Context Protocol) server that integrates the EduChain educational content generation library with Claude Desktop, allowing users to generate MCQs, lesson plans, and flashcards using LLMs like Gemini (via LangChain).


🚀 Features

  • Multiple Choice Questions Generator
  • Lesson Plan Generator
  • Flashcard Generator
  • Claude-compatible MCP server with FastMCP
  • Fully local, secure, and extensible integration

🧠 Powered By


📁 Project Structure

├── server.py # Main MCP server script
├── get_educhain.py # LLM & EduChain config using Gemini
├── tools/
│ ├── generate_mcqs.py
│ ├── generate_lesson_plan.py
│ └── generate_flashcards.py
├── educhain/ # Cloned EduChain repo (not pushed)
├── .env # Contains GEMINI_API_KEY
├── requirements.txt
├── Educhain_McpReport.pdf
├── sample_output.txt # Sample response from all tools/resources
└── README.md

---

## ⚙️ Installation

### 1. Clone and Install EduChain Locally

```bash
git clone https://github.com/satvik314/educhain.git
cd educhain
pip install .

2. Install Required Packages

pip install -r requirements.txt

3. Add your Gemini API key

Create a .env file:

GEMINI_API_KEY=your-gemini-api-key-here

🧪 Running the MCP Server

Option 1: Manual Run (for testing)

python server.py

Option 2: Claude-Managed (recommended)

Use the following claude_config.json:

{
  "mcpServers": {
    "educhain": {
      "command": "python",
      "args": ["server.py"],
      "cwd": "C:/absolute/path/to/project",
      "transport": "stdio",
      "env": {
        "DANGEROUSLY_OMIT_AUTH": "true"
      }
    }
  }
}

Save it to:

C:/Users/YOURNAME/.claude/config.json

Then restart Claude Desktop and go to Developer → Restart Server.

🔐 Alternative: Use Auth Tokens for Collaboration

If you're working in a collaborative setup or want stricter control, you can remove the DANGEROUSLY_OMIT_AUTH setting and instead use the auth_token from the MCP Inspector like this:

{
  "mcp_servers": [
    {
      "label": "EduChain Gemini Server",
      "url": "http://127.0.0.1:6277",
      "auth_token": "your-session-token"
    }
  ]
}

This is useful when running the server via:

mcp dev server.py

It connects through the local proxy with full inspection/debug support.


🧰 Available Tools & Resources

NameTypeDescription
generate_mcq_toolToolCreates multiple-choice questions for a topic
generate_flashcard_toolToolGenerates flashcards for a topic
lesson_plan_resourceResourceProvides a structured lesson plan

🛠 Troubleshooting

  • If ports like 6277 or 6274 are in use, kill conflicting processes
  • MCP Inspector (via mcp dev server.py) may block Claude — only run one at a time
  • Ensure educhain/ is installed but not committed (add it to .gitignore)

💡 Contributions

This integration was created as part of an internship assignment to showcase:

  • LLM tool integration
  • MCP protocol understanding
  • Custom tool chaining with LangChain
  • Gemini API usage via LangChain adapters

📄 License

This repository is for educational and internship use. EduChain is used under its respective open license.


🙌 Acknowledgements

  • @satvik314 for EduChain
  • Anthropic for Claude Desktop
  • Google for Gemini

📞 Contact

Feel free to reach out via LinkedIn or email for collaboration or queries.

Reviews

No reviews yet

Sign in to write a review