mcpUPB
Allows querying and interacting with a Moodle LMS, including courses, assignments, grades, announcements, notifications, deadlines, and file downloads.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcpUPBwhat's due this week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
"What's due this week?" · "Summarize the latest announcement" · "Build a study plan from this course" · "Sync all my Algorithms material to markdown"
It talks to Moodle's official Web Services REST API (no browser scraping), so it's fast and
robust. Although it's tuned for UPB Virtual, it works against any Moodle site with web services
enabled — just change MOODLE_BASE_URL.
⚠️ Personal tool. It acts on your account with your token. Respect your institution's terms of service and only access data you're entitled to.
How it works
flowchart LR
A["🤖 AI Assistant<br/>(Claude, mcpjam…)"] -- MCP / stdio --> B
subgraph B ["mcp-upb server"]
T["🛠️ Tools"]
R["📚 Resources<br/>upb://…"]
P["💬 Prompts"]
end
B --> C["Moodle REST client<br/>(token auth)"]
C -- "webservice/rest/server.php" --> M[("🎓 UPB Virtual<br/>Moodle")]
B --> V["🔄 Vault sync"]
V --> D["🗂️ vault/<br/>markdown + files"]A typical request flows straight through to the LMS and back as clean JSON:
sequenceDiagram
participant U as You
participant AI as AI Assistant
participant S as mcp-upb
participant M as Moodle
U->>AI: "What's due this week?"
AI->>S: weekly_digest()
S->>M: core_calendar / forum / messages
M-->>S: JSON
S-->>AI: deadlines + announcements + alerts
AI-->>U: "3 things due, 1 overdue…"Related MCP server: Moodle MCP Server
Features
Tools
Tool | Description |
| Verify the connection; return the authenticated user + site info |
| All enrolled courses |
| Search the site catalogue |
| Sections, activities and downloadable files of a course |
| Assignments (deadlines + attachments) for one or more courses |
| Full detail of one assignment |
| Whether an assignment is submitted, plus grade/feedback |
| Grade items and your grades for a course |
| Latest announcements for a course |
| Latest announcements across all courses |
| Recent Moodle notifications |
| Calendar deadlines across all courses, sorted |
| One overview: deadlines + announcements + unread notifications |
| Download a Moodle file by its |
| Convert a local PDF to markdown (text layer) |
| Save markdown into the vault |
| Download all new files of a course into the vault, converting PDFs (incremental) |
| Sync every enrolled course |
Resources
Browsable upb:// URIs a client can attach as context:
upb://courses— enrolled coursesupb://course/{id}— a course's contentsupb://course/{id}/assignments— a course's assignments
Prompts
Ready-made commands: weekly_summary, study_plan (arg: course), assignment_checklist (arg: assignment).
Setup
npm install
cp .env.example .env # Windows: copy .env.example .env
npm run get-token # enter your UPB username + passwordget-token calls login/token.php and prints a MOODLE_TOKEN=... line. Paste it into .env.
Your password is never stored — only the token, which lives in .env (gitignored).
If
get-tokenfails with an invalid-login error, your account may use SSO/Google login, which can disable password-based tokens. In that case generate a token manually in Moodle under Preferences → Security keys and paste it into.env.
Environment variables
Variable | Default | Purpose |
|
| Moodle site root (no trailing slash) |
| — | Web-services token (required) |
|
| Where |
|
| Where synced material is written |
|
| Incremental-sync metadata |
Testing with mcpjam
mcpjam spawns the server as a stdio process and gives you a UI to run tools, browse resources and chat against an LLM.
Launch the inspector (opens
http://127.0.0.1:6274):npm run inspect # = npx @mcpjam/inspector@latestAdd Server → STDIO:
Field
Value
Transport
STDIOCommand
npxArguments
tsx src/server.tsWorking directory
the project root
Environment
MOODLE_TOKEN=<token>(most reliable; avoids.env/cwd issues)For the compiled build:
npm run build, then Commandnode, Argumentsdist/server.js.Open Tools and start with
whoami. Thenlist_courses→ copy anid→get_course,list_assignments,get_grades, etc.
Use with Claude / other MCP clients
After npm run build, add to your client's MCP config:
{
"mcpServers": {
"upb": {
"command": "node",
"args": ["C:/Users/User/Desktop/GitHub/mcpUPB/dist/server.js"],
"env": { "MOODLE_TOKEN": "your-token-here" }
}
}
}Scripts
Script | What it does |
| Run the server with tsx (stdio) |
| Compile to |
| Run the compiled server |
| Exchange credentials for a token |
| Launch mcpjam inspector |
Notes & limitations
pdf_to_markdown/sync_courseextract the PDF text layer only (good for slides and notes; no tables/math reconstruction). For high-fidelity conversion, plug in a Docling / PyMuPDF4LLM helper — the rest of the pipeline is unchanged.Available data depends on what your Moodle role/capabilities expose via web services; some tools may return errors if a function is disabled site-wide.
Project structure
src/
server.ts MCP server entry (stdio)
config.ts env config
tools.ts tool registrations
resources.ts upb:// resources
prompts.ts prompt templates
moodle/
client.ts REST transport (token, params, file urls)
api.ts typed Moodle function wrappers
storage/
cache.ts incremental-sync cache
vault/
sync.ts sync_course / sync_all
pdf.ts pdf -> markdown
markdown.ts vault writer
scripts/
get-token.ts credentials -> token helperLicense
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/olartgabo/mcpUPB'
If you have feedback or need assistance with the MCP directory API, please join our Discord server