Moodle-MCP
by loyaniu
Moodle-MCP is a Model Context Protocol (MCP) server implementation designed to interact with Moodle LMS. It provides capabilities to retrieve information and potentially control aspects of a Moodle instance.
View on GitHub
Last updated: N/A
Moodle-MCP
A Model Context Protocol (MCP) server implementation that provides capabilities to interact with Moodle LMS.
Warning: This project is still in development, only some functions are available.
Features
- [x] Get upcoming events from Moodle
API Reference
For available Moodle API functions, please refer to the official documentation.
Setup Instructions
Method 1: Using mcp
CLI (recommended)
- Create your own
.env
file from.env.example
- Assume you have
uv
installed, runuv add "mcp[cli]"
to install the MCP CLI tools - Run
mcp install main.py -f .env
to add the moodle-mcp server to Claude app
Method 2: Using uvx
Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following
{
"mcpServers": {
"moodle-mcp": {
"command": "uvx",
"args": ["moodle-mcp"],
"env": {
"MOODLE_URL": "https://{your-moodle-url}/webservice/rest/server.php",
"MOODLE_TOKEN": "{your-moodle-token}"
}
}
}
}
Authentication
Getting your Moodle token
- Navigate to your Moodle token management page
https://{your-moodle-url}/user/managetoken.php
- Use the token with
Moodle mobile web service
in theService
column - Add this token to your
.env
file