
Moodle
STDIOMoodle课程管理MCP服务器
Moodle课程管理MCP服务器
An MCP (Model Context Protocol) server that enables LLMs to interact with the Moodle platform to manage courses, students, assignments, and quizzes.
list_students
- Retrieves the list of students enrolled in the course
get_assignments
- Retrieves all available assignments in the course
get_student_submissions
- Examines a student's submissions for a specific assignment
provide_assignment_feedback
- Provides grades and comments for a student's submission
get_quizzes
- Retrieves all available quizzes in the course
get_quiz_attempts
- Examines a student's attempts on a specific quiz
provide_quiz_feedback
- Provides comments for a quiz attempt
git clone https://github.com/your-username/moodle-mcp-server.git cd moodle-mcp-server
npm install
.env
file with the following configuration:MOODLE_API_URL=https://your-moodle.com/webservice/rest/server.php
MOODLE_API_TOKEN=your_api_token
MOODLE_COURSE_ID=1 # Replace with your course ID
npm run build
To use with Claude Desktop, add the server configuration:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "moodle-mcp-server": { "command": "/path/to/node", "args": [ "/path/to/moodle-mcp-server/build/index.js" ], "env": { "MOODLE_API_URL": "https://your-moodle.com/webservice/rest/server.php", "MOODLE_API_TOKEN": "your_moodle_api_token", "MOODLE_COURSE_ID": "your_course_id" }, "disabled": false, "autoApprove": [] } } }
For Windows users, the paths would use backslashes:
{ "mcpServers": { "moodle-mcp-server": { "command": "C:\\path\\to\\node.exe", "args": [ "C:\\path\\to\\moodle-mcp-server\\build\\index.js" ], "env": { "MOODLE_API_URL": "https://your-moodle.com/webservice/rest/server.php", "MOODLE_API_TOKEN": "your_moodle_api_token", "MOODLE_COURSE_ID": "your_course_id" }, "disabled": false, "autoApprove": [] } } }
Once configured, Claude will be able to interact with your Moodle course to:
For development with auto-rebuild:
npm run watch
MCP servers communicate through stdio, which can make debugging challenging. We recommend using the MCP Inspector:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
.env
file.env
file or Moodle API token