Moodle MCP Server
Overview
Moodle MCP Server is an MCP (Model Context Protocol) server that allows large language models (LLMs) to interact with the Moodle platform for managing courses, students, assignments, and quizzes.
To use the Moodle MCP Server, clone the repository, install dependencies, configure the .env file with your Moodle API details, and build the server. Then, integrate it with Claude Desktop for interaction with your Moodle courses.
- Student management tools to list students and their details. - Assignment management tools to retrieve assignments, examine submissions, and provide feedback. - Quiz management tools to get quizzes, check attempts, and give feedback.
- Managing student information and tracking their progress.
- Facilitating assignment submissions and feedback for students.
- Analyzing quiz attempts and providing insights to improve learning outcomes.
Add to your AI client
Use these steps to connect Moodle MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"moodle-mcp-server-peancor": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-moodle-mcp-server-peancor"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"moodle-mcp-server-peancor": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-moodle-mcp-server-peancor"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"moodle-mcp-server-peancor": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-moodle-mcp-server-peancor"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"moodle-mcp-server-peancor": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-moodle-mcp-server-peancor"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"moodle-mcp-server-peancor": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-moodle-mcp-server-peancor"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"moodle-mcp-server-peancor": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-moodle-mcp-server-peancor"
]
}
}
}FAQ
**What are the requirements to run Moodle MCP Server?**
You need Node.js (v14 or higher) and a Moodle API token with appropriate permissions.
**Is there a way to debug the server?**
Yes, you can use the MCP Inspector for debugging.
**How do I obtain a Moodle API token?**
Log in as an administrator, go to Site Administration > Plugins > Web Services > Manage tokens, and create a new token.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2128,"uuid":"b86542c0-c252-4fb0-9c4b-91b16bb91728","name":"moodle-mcp-server","title":"Moodle MCP Server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/3754930?v=4","created_at":"2025-03-09T03:40:41.370Z","updated_at":"2025-03-12T10:19:31.109Z","status":"created","author_name":"peancor","author_avatar_url":"https://avatars.githubusercontent.com/u/3754930?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/peancor/moodle-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"7\",\"license\":\"MIT license\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-04-24 08:58:47\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]