Moodle MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/Jawadh-Salih/moodle-mcp-server
cd moodle-mcp-server

Then follow the repository README for any remaining dependency or build steps before continuing.

2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "MOODLE_URL=${MOODLE_URL}" moodle-mcp -- node "<FULL_PATH_TO_MOODLE_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_MOODLE_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

Required:MOODLE_URL+ 3 optional
README.md

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 interactively
get_site_infoView Moodle site and user info
get_user_profileView your profile details
list_coursesList all enrolled courses
get_course_contentsView sections, resources, and activities
get_course_detailsView course metadata
get_gradesView grades for a specific course
get_grades_overviewView grade summary across all courses
get_assignmentsView assignments for a course
get_upcoming_assignmentsView upcoming assignments across all courses
submit_assignmentSubmit text content for an assignment
get_calendar_eventsView upcoming calendar events
get_upcoming_deadlinesView consolidated deadlines sorted by urgency
get_notificationsView messages and notifications

Environment Variables

MOODLE_URLrequiredThe URL of your Moodle instance
MOODLE_USERNAMEYour Moodle username
MOODLE_PASSWORDYour Moodle password
MOODLE_TOKENYour Moodle API token

Configuration

claude_desktop_config.json
{"mcpServers": {"moodle": {"command": "/path/to/moodle-mcp"}}}

Try it

What are my upcoming assignment deadlines for this week?
List all my enrolled courses and their current grades.
Show me the contents of the Introduction to Computer Science course.
Submit my assignment text for the Data Structures lab.
Do I have any new notifications or messages in Moodle?

Frequently Asked Questions

What are the key features of Moodle MCP?

Interactive authentication with Moodle sites. Retrieve course contents, metadata, and grades. Track and consolidate upcoming assignment deadlines. Submit assignment text directly through the AI interface. View calendar events and system notifications.

What can I use Moodle MCP for?

Students tracking multiple course deadlines in one view. Quickly checking grades across all enrolled subjects. Submitting simple text-based assignments via chat. Reviewing course materials and resources without navigating the Moodle UI.

How do I install Moodle MCP?

Install Moodle MCP by running: irm https://raw.githubusercontent.com/jawadh/moodle-mcp-server/main/install.ps1 | iex

What MCP clients work with Moodle MCP?

Moodle MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Moodle MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare