eClass MCP 服务器是一款本地运行的工具,它能让 AI 代理(如 Claude 或其他大语言模型)直接与希腊大学所用的 Open eClass 学习管理系统进行交互。该服务器通过模拟浏览器行为,利用大学提供的用户名和密码登录 eClass,为 AI 提供所需信息。
eClass MCP 服务器可让 AI 代理与 Open eClass 学习管理系统交互。以下是使用该服务器的基本步骤:
git clone https://github.com/your-organization/eClass-MCP-Server.git
cd eClass-MCP-Server
pip install -r requirements.txt
创建 .env
文件:
ECLASS_USERNAME=your_username
ECLASS_PASSWORD=your_password
python -m eclass_mcp_server.run_server
import asyncio
from eclass_mcp_client import MCPClient
async def main():
async with MCPClient() as client:
# 登录
login_response = await client.login({"random_string": "dummy"})
print(login_response)
# 获取课程
courses_response = await client.get_courses({"random_string": "dummy"})
print(courses_response)
# 退出
logout_response = await client.logout({"random_string": "dummy"})
print(logout_response)
asyncio.run(main())
⚠️ 重要提示
建议在虚拟环境中运行,并定期更换密码以处理密码泄露风险。
💡 使用建议
- 在虚拟机或容器中运行 MCP Server,实现环境隔离。
- 及时安装最新版本以获取安全性改进。
- 关注异常活动和错误信息,监控日志。
本项目采用 GPL - 3.0 协议,更多信息请查看 LICENSE
文件。
欢迎社区贡献!请参考 CONTRIBUTING.md
文档了解如何参与开发。我们期待你的加入!
Q:如何处理密码泄露风险?
A:建议在虚拟环境中运行,并定期更换密码。
Q:支持多线程吗?
A:当前版本支持单线程,未来计划加入多线程优化。
docs/api.md
docs/design.md
欢迎使用 eClass MCP Server!如有问题,请联系 support@your-organization.com。