mcp-moodle
Enables AI assistants to interact with Moodle via web services, allowing tasks like listing courses, assignments, events, and downloading files.
README
mcp-moodle
An MCP server that exposes Moodle Web Services to any MCP-compatible AI assistant — Claude Code, Claude Desktop, Cursor, Codex, and others.
Ask your assistant things like "what's due this week?", "list my courses", "download the slides from CS101 week 3" — without leaving the chat.
Features
site_info— verify the token and get the authenticated userlist_my_courses— courses you're enrolled inget_course_contents— sections, modules, file URLssearch_courses— search the public cataloglist_assignments— assignments across one or all coursesupcoming_events— calendar deadlines and sessionsget_user_grades— your grades for a coursedownload_file— save any Moodle file locally (token appended automatically)
Works with any Moodle 3.5+ instance that has Web Services enabled.
Install
The recommended way is uv — no virtualenv to manage:
# One-off run (no install)
uvx mcp-moodle
# Or persist as a tool
uv tool install mcp-moodle
Plain pip works too:
pip install mcp-moodle
Get a token
Moodle Web Services require a personal token. The package ships a helper that handles every common login flow — native accounts, SSO (Microsoft, Google, SAML, OAuth), or manual paste:
# Default: opens a Chromium window, you complete SSO, token is captured
uvx --from "mcp-moodle[token]" mcp-moodle-token https://moodle.example.org
# Native (non-SSO) account
uvx --from "mcp-moodle[token]" mcp-moodle-token https://moodle.example.org \
--method local --user jdoe
# Headless server fallback (paste the moodlemobile:// URL by hand)
uvx --from "mcp-moodle[token]" mcp-moodle-token https://moodle.example.org \
--method manual-mobile
The token is written to ./.env (chmod 600) as MOODLE_URL and MOODLE_TOKEN.
Pass --stdout to print it to stdout instead.
The
[token]extra pulls in Playwright. First run downloads Chromium (~150 MB, one-time). Skip the extra if you only ever use--method local,--method web, or--method manual-mobile.
Configure your MCP client
Claude Code
claude mcp add moodle \
--env MOODLE_URL=https://moodle.example.org \
--env MOODLE_TOKEN=your_token_here \
-- uvx mcp-moodle
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
(macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"moodle": {
"command": "uvx",
"args": ["mcp-moodle"],
"env": {
"MOODLE_URL": "https://moodle.example.org",
"MOODLE_TOKEN": "your_token_here"
}
}
}
}
Cursor / other clients
Any MCP client that supports stdio servers works the same way: command
uvx, args ["mcp-moodle"], env MOODLE_URL and MOODLE_TOKEN.
Verify it works
In your MCP client, ask: "call the moodle site_info tool". You should see your name, username, and the site URL.
Development
git clone git@github.com:Snaw80/moodle-mcp.git
cd moodle-mcp
uv sync --all-extras
uv run mcp-moodle
Security notes
- Your token is the equivalent of a password for Moodle Web Services — keep
.envout of version control (the included.gitignorealready does this). - The server reads
MOODLE_TOKENfrom the environment and never logs it. download_fileappends the token to the URL; that URL is not logged either, but be mindful if your client echoes tool arguments.
License
MIT — see LICENSE.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.