Skip to main content
Glama

SLIIT Courseweb MCP Server ๐Ÿš€

Bridge SLIIT Courseweb (Moodle) into Claude Code, Antigravity, OpenAI Codex, ChatGPT & Cursor.

MCP Protocol Live Website Node.js TypeScript License: MIT


๐ŸŽฌ Quick Video Showcase

Watch Claude Code autonomously parse a 103-page PDF exam marksheet, locate a student's grade breakdown, and delta-sync lecture slides without opening a single browser tab:

Compressed 720p 60fps faststart preview (600 KB). Captured live running in Claude Code CLI.


Related MCP server: School MCP

๐Ÿ’ก Why This Exists

SLIIT Courseweb is the central hub for lecture materials, lab sheets, and assignment submissions. But every semester, students face the same bottlenecks:

  • โณ Slow loading during peak hours: Courseweb crawls right before assignment submission deadlines.

  • ๐Ÿ“‘ 100+ Page Exam Marksheet PDFs: Midterm and final marks are released as massive multi-page PDFs where finding your IT number is a chore.

  • ๐Ÿ“ฆ Manual Download Fatigue: Downloading 14 weeks of lecture slides, lab exercises, and tutorial answers requires clicking dozens of links.

  • โฐ Missed Deadlines: Assignment cutoffs are scattered across individual course tabs.

The Solution: An open-source Model Context Protocol (MCP) server that allows your AI agent (Claude Code, Cursor, Antigravity, Windsurf) to query Courseweb directly. Your agent acts as your personal academic assistant.


โšก 1-Prompt Agent Self-Installation

You don't need to manually edit JSON configuration files. Just copy the prompt for your favorite AI assistant, paste it into the agent chat, and let the agent configure itself!

๐ŸŸง Claude Code CLI

Please configure the SLIIT Courseweb MCP server for Claude Code CLI:
1. Run: git clone https://github.com/kesaruhasun/mcp-sliit-courseweb.git
2. Inside the folder run: npm install && npm run build
3. Add to Claude Code MCP registry:
   claude mcp add sliit_courseweb node "$(pwd)/build/index.js" -e HEADLESS=true
4. Run `claude mcp list` to verify the server is connected.
5. Remind me to perform `interactive_login` if my session token is expired.

๐ŸŸฆ Google Antigravity

Antigravity, please self-configure the SLIIT Courseweb MCP server:
1. Clone `https://github.com/kesaruhasun/mcp-sliit-courseweb.git` or inspect the local repo.
2. Run `npm install` and compile TypeScript using `npm run build`.
3. Add the `sliit_courseweb` definition into your MCP configuration (`mcp_config.json`) pointing `command` to `node` and `args` to the absolute path of `build/index.js`.
4. Confirm tool schema registration for `list_modules`, `sync_module`, and `get_deadlines`.
5. Guide me on running `interactive_login` or injecting `MoodleSession` via `set_session_cookie`.

๐ŸŸข OpenAI Codex

You are OpenAI Codex. Please install and self-configure the SLIIT Courseweb MCP server in this workspace:
1. Clone the repository if not already present:
   git clone https://github.com/kesaruhasun/mcp-sliit-courseweb.git
2. Navigate into `mcp-sliit-courseweb` and compile:
   npm install && npm run build
3. Register the MCP server via Codex CLI:
   codex mcp add sliit_courseweb --env HEADLESS=true -- node "$(pwd)/mcp-sliit-courseweb/build/index.js"
   (or configure [mcp_servers.sliit_courseweb] in ~/.codex/config.toml or .codex/config.toml)
4. Confirm tool schema registration for `list_modules`, `get_deadlines`, and `sync_module`.
5. Guide me on running `interactive_login` for Microsoft MFA or injecting `MoodleSession` via `set_session_cookie`.

๐Ÿ’ฌ ChatGPT Desktop App (macOS & Windows)

Connect SLIIT Courseweb MCP directly to ChatGPT Desktop App:

  1. Clone & compile:

    git clone https://github.com/kesaruhasun/mcp-sliit-courseweb.git
    cd mcp-sliit-courseweb && npm install && npm run build
  2. Start the local SSE bridge (supports ChatGPT remote MCP protocol):

    npx -y supergateway --port 8000 -- node build/index.js
  3. In ChatGPT Desktop App:

    • Go to Settings โ†’ Connectors (or Developer Mode).

    • Toggle Developer Mode ON and click "Add MCP Server".

    • Server Name: SLIIT Courseweb

    • Server URL: http://localhost:8000/sse

  4. In any chat, prompt ChatGPT: "List my enrolled Courseweb modules and check any upcoming deadlines."

โฌ› Cursor Composer / IDE

You are my Cursor Composer agent. Please install and self-configure the SLIIT Courseweb MCP server in this workspace:
1. Clone the repository if not present:
   git clone https://github.com/kesaruhasun/mcp-sliit-courseweb.git
2. Navigate into `mcp-sliit-courseweb` and compile:
   npm install && npm run build
3. Create or update `.cursor/mcp.json` in the workspace root with:
   {
     "mcpServers": {
       "sliit_courseweb": {
         "command": "node",
         "args": ["${workspaceFolder}/mcp-sliit-courseweb/build/index.js"],
         "env": {
           "HEADLESS": "true"
         }
       }
     }
   }
4. Confirm tool schema registration for `list_modules`, `get_deadlines`, and `sync_module`.
5. Guide me on running `interactive_login` for Microsoft MFA or injecting `MoodleSession` via `set_session_cookie`.

๐ŸŸฉ Windsurf Cascade

Cascade, please install the SLIIT Courseweb MCP server for this session:
1. Clone `https://github.com/kesaruhasun/mcp-sliit-courseweb.git` and compile: `npm install && npm run build`.
2. Add the configuration to `~/.codeium/windsurf/mcp_config.json`:
   {
     "mcpServers": {
       "sliit_courseweb": {
         "command": "node",
         "args": ["<ABSOLUTE_PATH_TO_BUILD_INDEX_JS>"],
         "env": { "HEADLESS": "true" }
       }
     }
   }
3. Restart your MCP connection and test by running `get_deadlines`.

๐ŸŸช Claude Desktop

Add this snippet to your claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "sliit_courseweb": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/mcp-sliit-courseweb/build/index.js"],
      "env": {
        "SLIIT_USERNAME": "ITxxxxxxxx",
        "SLIIT_PASSWORD": "your_password",
        "HEADLESS": "true"
      }
    }
  }
}

๐Ÿ” Login Methods

Courseweb is protected by SLIIT's Microsoft Office 365 Single Sign-On (SSO) and Multi-Factor Authentication (MFA). This MCP server supports two seamless login strategies:

Ideal for macOS, Windows, or Linux with a desktop GUI:

  1. In your agent chat, run the interactive_login tool:

    "Run interactive_login to sign into Courseweb."
  2. A Playwright Chromium browser window pops up, navigates to courseweb.sliit.lk, and automatically fills your email and password.

  3. Complete the Microsoft Authenticator 2-digit number match on your phone.

  4. Once authenticated, the browser captures your session and securely persists cookies to storage_state.json. All future requests run 100% headlessly in the background!

Ideal for headless Linux servers, GitHub Codespaces, or remote VMs where opening a browser window is not possible:

  1. Open your laptop browser, navigate to courseweb.sliit.lk, and log in.

  2. Press F12 (or Cmd + Option + I) to open Developer Tools โ†’ Console.

  3. Paste this one-liner and press Enter to copy your active session cookie:

    copy(document.cookie.split('; ').find(row => row.startsWith('MoodleSession=')).split('=')[1])
  4. Tell your AI assistant:

    "Use set_session_cookie with this value: <PASTE_COOKIE_HERE>"
  5. You're immediately logged in without any browser UI!


๐Ÿ› ๏ธ Complete MCP Tool Reference

This server provides 9 specialized tools exposed via the Model Context Protocol:

Tool

Purpose

Key Parameters

Example Prompt

list_modules

Lists all enrolled modules, codes, and Moodle course IDs

None

"What modules am I registered for this semester?"

get_deadlines

Scrapes upcoming assignment submission deadlines and calendar events

None

"What assignments are due in the next 7 days?"

get_announcements

Fetches course notices, exam schedules, and lecturer broadcasts

courseId (optional)

"Did the Distributed Systems lecturer post any exam notices?"

check_module_updates

Detects newly posted files or modified sections in a course

courseId

"Check if any new tutorial answers were uploaded to Software Architecture."

sync_module

Delta-downloads all slides, lab sheets, and materials (MD5 hashed)

courseId, outputDir

"Download all slides from Computer Networks to ./slides/networks."

download_file

Downloads a specific file or syllabus document directly

url, outputPath

"Download the lecture 4 PDF from this URL."

check_assignment_status

Inspects submission status, grading grade, and marker comments

assignmentId

"Did my SE4020 assignment 1 get graded yet?"

scrape_page

Scrapes any Courseweb URL into clean, LLM-ready markdown

url

"Scrape the main page for module 14202 and summarize the syllabus."

interactive_login

Launches Playwright browser for Microsoft SSO & MFA approval

None

"Run interactive login."

set_session_cookie

Manually injects MoodleSession cookie for headless environments

cookie

"Set Moodle session cookie to 9a8b7c6d5e4f..."


๐ŸŒŸ Student Superpowers

Instead of waiting 5 minutes for a 20MB PDF to render in your browser and searching line by line, let your agent download and parse it:

Prompt: "Check Courseweb for the Software Engineering Midterm marks PDF. Download it and find the score for IT21000000. Give me my class percentile and average."

Superpower 2: Intelligent Delta File Syncing

Never download duplicate files again. sync_module computes MD5 checksums for every file, creating local mirrors and downloading only fresh slides:

Prompt: "Sync all lecture materials for Machine Learning to ./ML_Lectures. Only download newly uploaded slides."

Superpower 3: Autonomous Weekly Academic Standup

Prompt: "List all assignments due across all my modules this Sunday. Generate a priority to-do list with time estimates."


โš™๏ธ Manual Build & Development

If you prefer building and running from source manually:

# 1. Clone repository
git clone https://github.com/kesaruhasun/mcp-sliit-courseweb.git
cd mcp-sliit-courseweb

# 2. Install dependencies
npm install

# 3. Compile TypeScript
npm run build

# 4. Configure environment
cp .env.example .env
# Edit .env with your SLIIT credentials:
# SLIIT_USERNAME=ITxxxxxxxx
# SLIIT_PASSWORD=your_password
# HEADLESS=true

# 5. Start MCP Server (stdio mode)
node build/index.js

๐ŸŒ Live Landing Page & Multilingual Support

Check out the interactive web portal at https://sliitcoursewebmcp.kesaru.me.

  • ๐Ÿ‡ฑ๐Ÿ‡ฐ Spoken Sinhala (เทƒเท’เถ‚เท„เถฝ): Explains MCP and Courseweb automation in casual student terms with Apple SF-style Sinhala typography (Gemunu Libre / Sinhala MN).

  • ๐Ÿ‡ฑ๐Ÿ‡ฐ Spoken Tamil (เฎคเฎฎเฎฟเฎดเฏ): Native Sri Lankan Tamil explanations for students across all campuses.

  • โšก Interactive Prompt Builder: Instant copy-paste blocks for Claude, Antigravity, Cursor, and Windsurf.

  • ๐ŸŽฅ Live Video Player: Stream the 60fps launch showcase directly in your browser.


๐Ÿ›ก๏ธ Fair Use & Institutional Disclaimer

  • This project is an independent open-source utility developed for personal educational efficiency and is not officially affiliated with or endorsed by SLIIT.

  • The server uses polite request throttling and intelligent MD5 caching to avoid generating unnecessary server load on campus infrastructure.

  • Users are responsible for keeping their institutional credentials secure and complying with campus IT acceptable use policies.


๐Ÿ‘จโ€๐Ÿ’ป Author & Contributions

Built with โค๏ธ by Kesaru Hasun.

  • ๐ŸŒ Portfolio & Blog: kesaru.me

  • ๐Ÿ™ GitHub: @kesaruhasun

  • ๐Ÿ’ฌ Questions or bug reports? Open an Issue or submit a Pull Request!


Available Tools

10 tools
check_assignment_statusC

Check the submission status, grading status, and feedback for a specific assignment

Inputs: url (required).

check_module_updatesC

Check for new materials or announcements in a specific module

Inputs: courseId (required).

download_fileC

Download a file from Courseweb (e.g. PDFs, lab sheets) given its resource URL

Inputs: url (required), outputDir.

get_announcementsB

Get general site announcements from Courseweb

Inputs: no named parameters.

get_deadlinesB

Fetch all upcoming assignment deadlines and events from Courseweb

Inputs: no named parameters.

interactive_loginA

Open a browser window to manually log in to SLIIT Courseweb (useful for MFA)

Inputs: no named parameters.

list_modulesB

List all enrolled modules on SLIIT Courseweb

Inputs: no named parameters.

scrape_pageB

Scrape the text content of any Courseweb URL to investigate the layout

Inputs: url (required).

sync_moduleC

Bulk download all files (PDFs, lab sheets, etc.) from a specific course module

Inputs: courseId (required), outputDir.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    B3.3/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools have distinct purposes (list_modules vs get_deadlines vs download_file vs sync_module). There is mild overlap between get_announcements (site-wide) and check_module_updates (module-specific), and between download_file (single) and sync_module (bulk), but descriptions clarify the boundaries well enough.

    Naming Consistency4/5

    Nearly all tools follow a consistent snake_case verb_noun pattern (list_modules, get_deadlines, check_module_updates, download_file, sync_module, check_assignment_status, set_session_cookie). Only interactive_login deviates slightly (adjective_noun) and the auth-related verbs (set/interactive) differ from the read/download verbs, but the overall style is predictable.

    Tool Count5/5

    Ten tools is well-scoped for a Courseweb/Moodle student client, covering listing, monitoring, downloading, assignment status, and authentication without redundancy. Each tool appears to earn its place.

    Completeness4/5

    The surface covers the core student lifecycle: modules, announcements, updates, deadlines, downloads, assignment status, and two complementary auth paths. Gaps remain (e.g. grades/transcript retrieval, forum/quiz access, search), but these are minor and the core workflow has no dead ends.

    Maintenance

    ActivitySlowing
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.
      32
      15,926 npm
      5,681
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that provides seamless access to Moodle developer documentation from moodledev.io. It enables AI assistants and other MCP clients to search, browse, and retrieve Moodle development documentation with version-specific support.
      4
      MIT