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.
- Get upcoming events from Moodle
For available Moodle API functions, please refer to the official documentation.
- Create your own
.envfile from.env.example - Assume you have
uvinstalled, runuv add "mcp[cli]"to install the MCP CLI tools - Run
mcp install main.py -f .envto add the moodle-mcp server to Claude app
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}"
}
}
}
}- Navigate to your Moodle token management page
https://{your-moodle-url}/user/managetoken.php - Use the token with
Moodle mobile web servicein theServicecolumn - Add this token to your
.envfile
