moodle
MCP server from peancor/moodle-mcp-server
claude mcp add --transport stdio peancor-moodle-mcp-server node build/index.js \ --env MOODLE_API_URL="https://your-moodle-site/webservice/rest/server.php" \ --env MOODLE_API_TOKEN="your_moodle_api_token" \ --env MOODLE_COURSE_ID="your_course_id"
How to use
This Moodle MCP server exposes a set of MCP tools that let AI copilots interact with a Moodle course. It provides course management (get_courses), student management (list_students), assignment operations (get_assignments, get_student_submissions, provide_assignment_feedback), and quiz operations (get_quizzes, get_quiz_attempts, provide_quiz_feedback). Each tool is designed to fetch structured data from Moodle or submit feedback and grades back to the platform. To use these capabilities, configure the MCP server in your environment (including the Moodle API URL, a valid API token, and the target course ID) and run the Node.js server. Once running, you can query the tool endpoints to retrieve course rosters, assignment lists with metadata, and quiz attempts, or to provide feedback for specific submissions and attempts. The server is designed to work with LLMs and other MCP clients that expect a uniform command interface for rich Moodle data interactions.
How to install
Prerequisites:
- Node.js v14 or higher
- npm (comes with Node.js)
- Access to a Moodle site with REST web services enabled and a token with appropriate permissions
Installation steps:
- Clone the repository:
git clone https://github.com/your-username/moodle-mcp-server.git
cd moodle-mcp-server
- Install dependencies:
npm install
- Create a .env file (or configure environment variables) with Moodle connection details:
MOODLE_API_URL=https://your-moodle-site/webservice/rest/server.php
MOODLE_API_TOKEN=your_api_token
MOODLE_COURSE_ID=your_course_id
- Build the server:
npm run build
- Run the MCP server (as defined in mcp_config):
node build/index.js
- Optionally, set up Claude or another MCP client by copying the example configuration from the README and replacing paths and environment values with your own.
Additional notes
Tips and notes:
- Keep the Moodle API token secure; do not commit it to source control.
- The MOODLE_COURSE_ID must correspond to a Moodle course you want the MCP to manage.
- If you encounter authentication errors, verify the token permissions in Moodle and that the API URL is correct.
- The tools support pagination for large course rosters (get_courses accepts page and limit parameters).
- For debugging, use the MCP Inspector as described in the repository's development section to inspect stdio communication.
- If you need to integrate with Claude, ensure the CLI client configuration uses the correct paths for your environment, as shown in the usage examples.
- Environment variables can be overridden by your deployment platform; ensure they are loaded at runtime.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.