使用说明
EduChain MCP服务器分配🚀
此项目是BuildFastWithAI任务的一部分。它建立了一个 使用EduChain库的MCP服务器,将其与 克劳德桌面,并公开教育内容生成工具,例如:
- ✅ 多项选择题(MCQ)生成器
- ✅ 课程计划生成器
- ⭐ 额外奖励:闪卡生成器
📁 文件夹结构
mcp-educhain-assignment/
├── server.py # Flask-based MCP server
├── educhain_tools.py # Tools for MCQs and lesson plans
├── claude_desktop_config.json # Claude Desktop config file
├── Sample_Responses.txt # Sample prompt-response logs
├── requirements.txt # Project dependencies
└── README.md # Project documentation (this file)
🧠 暴露给Claude的工具和资源
1.MCQ生成器工具
- 端点:
/tool/generate_mcqs - 方法:POST
- 输入:
{ "topic": "Python loops", "num_questions": 5 } - 输出:带问题和选项列表的JSON
2.教案资源
- 端点:
/resource/lesson_plan - 方法:POST
- 输入:
{ "subject": "Algebra" } - 输出:结构化教案内容
3.奖励:闪卡生成器
- 端点:
/tool/generate_flashcards - 方法:POST
- 输入:
{ "topic": "Photosynthesis" } - 输出:带有问答对的抽认卡
🧪 示例提示(适用于Claude Desktop)
您可以在正确配置后在Claude中尝试这些:
Use MCQ Generator with topic: Python loops and num_questions: 5
Use Lesson Plan Generator with subject: Algebra
Use Flashcard Generator with topic: Photosynthesis
🔌 如何运行服务器
1.克隆仓库并创建虚拟环境
git clone https://github.com/<your-username>/mcp-educhain-assignment.git
cd mcp-educhain-assignment
python -m venv venv
venv\Scripts\activate # On Windows
2.安装依赖项
pip install -r requirements.txt
3.运行服务器
python server.py
服务器将在以下时间启动:
http://127.0.0.1:9000/
🧩 Claude桌面设置
-
确保
claude_desktop_config.json文件被放置在:C:\Users\<your-username>\.claude\claude_desktop_config.json -
打开克劳德桌面→
Edit Config→ 确认工具已列出。 -
键入支持的提示,如:
- 在Python循环中生成5个MCQ
- 提供代数课程计划
- 制作光合作用抽认卡
📦 可交付成果摘要
- [x] 带2个核心工具的MCP服务器
- [x] Claude桌面配置
- [x] 示例响应
Sample_Responses.txt - [x] 奖励工具:闪卡生成器
- [x] 文档化的代码和README