Connect Claude, ChatGPT, and Gemini to any Moodle LMS instance.
Moodle MCP Server
A Model Context Protocol (MCP) server + REST API that connects Claude, ChatGPT, Google Gemini, and any AI model to any Moodle LMS instance. Built in Go.
Students can interact with their Moodle account through their favorite AI — view courses, check grades, track deadlines, submit assignments, and read notifications.
Works with:
- ✅ Claude (Desktop, Code) - via MCP (easiest!)
- ✅ ChatGPT (Plus) - via REST API + Actions
- ✅ Google Gemini - via REST API + Apps Script
- ✅ Any AI - via REST API (HTTP endpoints)
Features
| Tool | Description |
|---|---|
login |
Authenticate with your Moodle site interactively |
get_site_info |
View Moodle site and user info |
get_user_profile |
View your profile details |
list_courses |
List all enrolled courses |
get_course_contents |
View sections, resources, and activities |
get_course_details |
View course metadata |
get_grades |
View grades for a specific course |
get_grades_overview |
View grade summary across all courses |
get_assignments |
View assignments for a course |
get_upcoming_assignments |
View upcoming assignments across all courses |
submit_assignment |
Submit text content for an assignment |
get_calendar_events |
View upcoming calendar events |
get_upcoming_deadlines |
View consolidated deadlines sorted by urgency |
get_notifications |
View messages and notifications |
Requirements
- Claude Desktop (macOS, Windows, or Linux)
- A Moodle account at any institution
Quick Start
Choose your AI platform:
| Your AI | Guide | Time |
|---|---|---|
| 🤖 Claude (Recommended) | Windows / macOS | 2 min |
| 💬 ChatGPT | ChatGPT Setup | 15 min |
| 🔍 Google Gemini | Gemini Setup | 20 min |
| 🌐 Multiple AIs | All Models Guide | 1 hour |
Start here: If you use Claude, follow the Windows/macOS guide above (2 minutes!)
Not a coder? All guides have step-by-step instructions with no technical knowledge needed.
Installation (Easiest)
For Windows (PowerShell)
Open PowerShell and run:
irm https://raw.githubusercontent.com/jawadh/moodle-mcp-server/main/install.ps1 | iex
This will automatically download and install the binary to C:\Users\YourName\moodle-mcp\moodle-mcp.exe
For macOS / Linux (Bash)
Open Terminal and run:
curl -fsSL https://raw.githubusercontent.com/jawadh/moodle-mcp-server/main/install.sh | bash
This will automatically download and install the binary to ~/.moodle-mcp/moodle-mcp
Manual Installation (For Developers)
If you want to build from source:
# Clone the repository
git clone https://github.com/jawadh/moodle-mcp-server.git
cd moodle-mcp-server
# Build the binary
go mod tidy
go build -o moodle-mcp ./cmd/moodle-mcp/
Usage
Option 1: Interactive Login (Recommended)
Just start the server with no configuration. When you chat with Claude, use the login tool to authenticate:
"Log in to my Moodle at https://online.uom.lk with username student@uom.lk"
Claude will ask for your password and authenticate you.
Option 2: Environment Variables
Set credentials as environment variables for automatic login:
export MOODLE_URL=https://online.uom.lk
export MOODLE_USERNAME=your-username
export MOODLE_PASSWORD=your-password
Or if you have a Moodle API token:
export MOODLE_URL=https://online.uom.lk
export MOODLE_TOKEN=your-api-token
Claude Desktop Configuration
If you used the auto-installer:
The installer will show you the exact path. Just copy it!
Manual Configuration
Find your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Option A: Interactive login (Recommended - no credentials in config)
{
"mcpServers": {
"moodle": {
"command": "/path/to/moodle-mcp"
}
}
}
Then in Claude, use the login tool to authenticate interactively.
Option B: With credentials stored
{
"mcpServers": {
"moodle": {
"command": "/path/to/moodle-mcp",
"env": {
"MOODLE_URL": "https://online.uom.lk",
"MOODLE_USERNAME": "your-username",
"MOODLE_PASSWORD": "your-password"
}
}
}
}
Windows example paths:
- Auto-installer:
C:\Users\YourName\moodle-mcp\moodle-mcp.exe - Manual build:
C:\Users\YourName\Go\bin\moodle-mcp.exe
macOS example paths:
- Auto-installer:
/Users/yourname/.moodle-mcp/moodle-mcp - Manual build:
/Users/yourname/moodle-mcp-server/moodle-mcp
Supports Multiple AI Platforms
Via MCP (Claude Only)
- ✅ Claude Desktop (macOS, Windows, Linux)
- ✅ Claude Code (VSCode,
Tools (14)
loginAuthenticate with your Moodle site interactivelyget_site_infoView Moodle site and user infoget_user_profileView your profile detailslist_coursesList all enrolled coursesget_course_contentsView sections, resources, and activitiesget_course_detailsView course metadataget_gradesView grades for a specific courseget_grades_overviewView grade summary across all coursesget_assignmentsView assignments for a courseget_upcoming_assignmentsView upcoming assignments across all coursessubmit_assignmentSubmit text content for an assignmentget_calendar_eventsView upcoming calendar eventsget_upcoming_deadlinesView consolidated deadlines sorted by urgencyget_notificationsView messages and notificationsEnvironment Variables
MOODLE_URLrequiredThe URL of your Moodle instanceMOODLE_USERNAMEYour Moodle usernameMOODLE_PASSWORDYour Moodle passwordMOODLE_TOKENYour Moodle API tokenConfiguration
{"mcpServers": {"moodle": {"command": "/path/to/moodle-mcp"}}}