ELE MCP Server
by harvey
README.md
# ELE MCP Server
[](https://github.com/harvey/ele-mcp-server/actions/workflows/ci.yml)
**Let an AI assistant answer students' questions from their own ELE (Moodle) and Panopto data:** deadlines,
grades and weightings, assignment briefs, feedback, lecture slides and lecture transcripts.
> A student-built proposal for the University of Exeter. Not an official University project.
> For the university's developers, [PROPOSAL.md](PROPOSAL.md) covers how this plugs into the existing
> assistant, what hosting it needs, and what is left to build.

## Why
The current Exeter AI Assistant can only search public university pages: the AI policy, the AI tools
catalogue, general help pages. It can't see a student's own modules, so it can't say when their
coursework is due or what they got.
<p align="center">
<img src="docs/images/current-assistant.webp" width="720" alt="The Exeter AI Assistant home screen">
</p>
<p align="center">
<img src="docs/images/current-assistant-sources.png" width="520" alt="The assistant's sources: public catalogue and help pages only">
<br><em>Asked a question, it reads public catalogue and help pages.</em>
</p>
This server fills that gap. It connects any MCP-capable assistant (Amazon Quick, which runs the current
assistant, Copilot Studio, Claude, ...) to ELE and Panopto through their official APIs. It acts strictly as
the signed-in student, so nobody sees anything they couldn't already see in a browser. It is read-only.
## What it looks like
These images show real output from the server, run against the demo data in `tests/`.
**"What have I got due?"**

**"What did I get for Coursework 1, and how much is it worth?"** Grade, weighting, contribution to the
module total, marker comments, feedback files, and the text of the PDF brief, all from one call:

**"Go through the week 1 slides with me."** PowerPoint is read slide by slide, including tables and
speaker notes:

## Tools
| Tool | What it answers |
|---|---|
| `list_courses` | Enrolled modules, codes, progress |
| `get_deadlines` | Everything still to do, soonest first (assignments, quizzes, ...) |
| `get_assignment` | One assignment: brief + brief files' text, dates, extension, submission, grade, weighting, feedback (comments and annotated feedback PDFs) |
| `get_grades` | Gradebook per module: mark, %, weighting, contribution to total, feedback; or all module totals |
| `get_quiz_results` | Quizzes, close dates, attempts and marks |
| `get_announcements` | Recent module announcements |
| `get_course_contents` | Course page: sections, activities and files |
| `search_materials` | ELE Global Search when enabled (searches file contents), otherwise titles and descriptions |
| `read_file` | Any ELE file as text: **PDF** (by page), **PowerPoint** (by slide, with speaker notes and tables), **Word**, **Excel**, HTML, text and code. Long files are read in parts |
| `list_lectures` | Panopto recordings for a module |
| `get_lecture_transcript` | A recording's captions with timestamps |
All tools are marked `readOnlyHint`. There are no tools that submit, post or change anything.
## Run it locally (one student, for testing)
Requires Python 3.12+.
```bash
python -m venv .venv
.venv/Scripts/activate # Windows; on macOS/Linux: source .venv/bin/activate
pip install -e . pytest pytest-asyncio
cp .env.example .env # then fill in ELE_TOKEN (and PANOPTO_TOKEN if you have one)
pytest # 18 tests against a fake ELE; no network needed
```
Add it to an MCP client such as Claude Desktop or Claude Code (stdio):
```json
{
"mcpServers": {
"ele": { "command": "exeter-ele-mcp", "env": { "ELE_TOKEN": "..." } }
}
}
```
Or serve it over HTTP, which is what Amazon Quick and other hosted assistants need:
```bash
exeter-ele-mcp --http --host 0.0.0.0 --port 8000 # endpoint: http://host:8000/mcp
docker build -t ele-mcp . && docker run -p 8000:8000 --env-file .env ele-mcp
```
### Getting a token for local testing
`ELE_TOKEN` is a Moodle web-service token for your own account. If ELE's *Preferences → Security keys*
page lists one for "Moodle mobile web service", use that. Otherwise ask an ELE administrator. In the
proposed university deployment, students never handle tokens: they sign in with their normal university
account.
## Layout
```
src/exeter_ele_mcp/
server.py MCP tool definitions; stdio or Streamable HTTP
service.py what each tool does (Moodle/Panopto calls -> compact answers)
moodle.py Moodle Web Services client + REQUIRED_FUNCTIONS (the 13 read-only functions used)
panopto.py Panopto REST v1 client, SRT -> text, StartTime fix
documents.py PDF / PPTX / DOCX / XLSX / HTML / text -> paged text
auth.py per-user token resolution (env for local use; SSO hook for the university)
config.py environment settings
tests/ fake ELE + Panopto over httpx.MockTransport, with generated PDF/PPTX/DOCX files
```
## Status
A working framework, tested against a faithful fake of the Moodle and Panopto APIs. It has not yet been
run against the live ELE web-service endpoint, because that needs a token for a web service the
university enables. The remaining work is in PROPOSAL.md under "What is left to build".
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues