mcp-sliit-courseweb
Allows AI agents to interact with SLIIT Courseweb (Moodle), enabling them to list enrolled modules, sync course materials and lecture slides, retrieve assignment deadlines, and access exam marksheets without manual browsing.
SLIIT Courseweb MCP Server ๐
Bridge SLIIT Courseweb (Moodle) into Claude Code, Antigravity, OpenAI Codex, ChatGPT & Cursor.
๐ฌ 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:
Clone & compile:
git clone https://github.com/kesaruhasun/mcp-sliit-courseweb.git cd mcp-sliit-courseweb && npm install && npm run buildStart the local SSE bridge (supports ChatGPT remote MCP protocol):
npx -y supergateway --port 8000 -- node build/index.jsIn ChatGPT Desktop App:
Go to Settings โ Connectors (or Developer Mode).
Toggle Developer Mode ON and click "Add MCP Server".
Server Name:
SLIIT CoursewebServer URL:
http://localhost:8000/sse
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:
Method 1: Interactive Browser Login (Recommended for Local Machines)
Ideal for macOS, Windows, or Linux with a desktop GUI:
In your agent chat, run the
interactive_logintool:"Run interactive_login to sign into Courseweb."A Playwright Chromium browser window pops up, navigates to
courseweb.sliit.lk, and automatically fills your email and password.Complete the Microsoft Authenticator 2-digit number match on your phone.
Once authenticated, the browser captures your session and securely persists cookies to
storage_state.json. All future requests run 100% headlessly in the background!
Method 2: Session ID / Cookie Injection (Headless Cloud & VMs)
Ideal for headless Linux servers, GitHub Codespaces, or remote VMs where opening a browser window is not possible:
Open your laptop browser, navigate to courseweb.sliit.lk, and log in.
Press
F12(orCmd + Option + I) to open Developer Tools โ Console.Paste this one-liner and press Enter to copy your active session cookie:
copy(document.cookie.split('; ').find(row => row.startsWith('MoodleSession=')).split('=')[1])Tell your AI assistant:
"Use set_session_cookie with this value: <PASTE_COOKIE_HERE>"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 |
| Lists all enrolled modules, codes, and Moodle course IDs | None | "What modules am I registered for this semester?" |
| Scrapes upcoming assignment submission deadlines and calendar events | None | "What assignments are due in the next 7 days?" |
| Fetches course notices, exam schedules, and lecturer broadcasts |
| "Did the Distributed Systems lecturer post any exam notices?" |
| Detects newly posted files or modified sections in a course |
| "Check if any new tutorial answers were uploaded to Software Architecture." |
| Delta-downloads all slides, lab sheets, and materials (MD5 hashed) |
| "Download all slides from Computer Networks to ./slides/networks." |
| Downloads a specific file or syllabus document directly |
| "Download the lecture 4 PDF from this URL." |
| Inspects submission status, grading grade, and marker comments |
| "Did my SE4020 assignment 1 get graded yet?" |
| Scrapes any Courseweb URL into clean, LLM-ready markdown |
| "Scrape the main page for module 14202 and summarize the syllabus." |
| Launches Playwright browser for Microsoft SSO & MFA approval | None | "Run interactive login." |
| Manually injects |
| "Set Moodle session cookie to 9a8b7c6d5e4f..." |
๐ Student Superpowers
Superpower 1: 103-Page Exam Marksheet PDF Search
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 toolscheck_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).
set_session_cookieA
Manually set the MoodleSession cookie (useful for headless VMs where you can't use a browser)
Inputs: value (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
Scored across 10 tools
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.
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.
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.
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
Related MCP Connectors
Model Context Protocol server for Studex tools, notifications, and profile integrations
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseBqualityDmaintenanceA 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.3215,926 npm5,681MIT
- FlicenseAqualityCmaintenanceA Model Context Protocol server that helps students manage academic workflows by integrating with Canvas and Gradescope to fetch deadlines, download course materials, and sync with macOS Calendar or Reminders.108-
- AlicenseAqualityDmaintenanceA 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.4MIT
- AlicenseAqualityCmaintenanceEnables read-only querying of Moodle as a student, including courses, assignments, grades, forums, and files, using a personal web services token.1139 npmMIT