Smartschool MCP
Click on "Deploy 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., "@Smartschool MCP download de volledige cursus van nrt"
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.
Smartschool MCP
A lean, very fast Model Context Protocol core for Smartschool, built to run on tiny machines (0.1 vCPU, 512 MB RAM).
It has one tool, download_course, on top of a small core: the MCP protocol (stdio and Streamable HTTP), a lazily created, TTL-cached and login-guarded Smartschool session, and a tool registry.
download_course
Ask your agent something like "download de volledige cursus van nrt". In one call the tool:
finds the course by name, part of the name, abbreviation (
nrt), id, or a close typo;lists all Documenten folders in parallel and starts each download as soon as its folder is listed (
MCP_DOWNLOAD_WORKERSconnections, default 8);returns the files inside the tool result: a JSON summary (paths, sizes, web links), then each file as an MCP embedded resource (images as
image, text astext, everything else base64blob).
Nothing is written to the server's disk; the files end up in the agent's context. Arguments: course (required), document (only files whose folder or name contains these words, e.g. "hoofdstuk 3"), max_mb (default 40, max 60, so the reply fits in 512 MB RAM).
Set SMARTSCHOOL_PREWARM=1 so the library import and login happen at startup instead of during the first call.
Related MCP server: CourseLink MCP
Why it is fast
No heavy dependencies. The MCP protocol is implemented in about 250 lines of standard-library Python: no pydantic, anyio, starlette or uvicorn. Runtime dependencies are
smartschoolandlxml(fast HTML parsing).Lazy loading. The
smartschoollibrary is imported, and the login happens, only when a tool first asks for a session. Startup imports about 6 ms of modules.Prebuilt hot path.
initialize,pingandtools/listare answered from objects built once.Small HTTP server. Plain sockets, one thread per keep-alive connection,
TCP_NODELAY, compact JSON.Non-blocking stdio. Tool calls run in a small thread pool, so a slow Smartschool request never delays a
ping.
Measured in Docker with --cpus=0.1 --memory=512m (Python 3.12):
v0.3.0 | v0.4.0 | |
stdio cold start to | 10.5 s | 0.2–0.3 s |
HTTP cold start | 11.3 s | 0.5 s |
HTTP | 2.0 / 98 ms | 0.1 / 0.9 ms |
HTTP throughput (one keep-alive client) | 34 req/s | 407 req/s |
Peak RSS (stdio / HTTP) | 85 / 85 MB | 11 / 17 MB |
Adding a tool
from smartschool_mcp.server import ToolError, mcp, session
@mcp.tool(
description="List enrolled courses.",
input_schema={"type": "object", "properties": {}},
annotations={"readOnlyHint": True},
)
def get_courses() -> dict:
from smartschool import Courses # import heavy modules inside the tool
return {"courses": [course.name for course in Courses(session())]}Return a
dict(sent as text plusstructuredContent), a list or a string.Raise
ToolError("...")for a clean error result; any other exception is caught and reported asisError.Without
input_schema, the schema is built from the signature (int,str,bool,float,list,dict, optional| None).Register tools in a module imported by
smartschool_mcp/server.py(or in it).
Quick start: Claude Desktop
With the extension (see above), Claude Desktop needs uv on your computer to run it. Or install it from PyPI:
uvx mcp install smartschool-mcp \
-e SMARTSCHOOL_USERNAME="you" \
-e SMARTSCHOOL_PASSWORD="secret" \
-e SMARTSCHOOL_MAIN_URL="school.smartschool.be" \
-e SMARTSCHOOL_MFA="YYYY-MM-DD"Or add it manually to claude_desktop_config.json:
{
"mcpServers": {
"smartschool": {
"command": "uvx",
"args": ["smartschool-mcp"],
"env": {
"SMARTSCHOOL_USERNAME": "you",
"SMARTSCHOOL_PASSWORD": "secret",
"SMARTSCHOOL_MAIN_URL": "school.smartschool.be",
"SMARTSCHOOL_MFA": "YYYY-MM-DD"
}
}
}
}Config file locations: %APPDATA%\Claude\claude_desktop_config.json (Windows) · ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) · ~/.config/Claude/claude_desktop_config.json (Linux)
Remote / claude.ai
Remote (Streamable HTTP)
export SMARTSCHOOL_USERNAME="..." SMARTSCHOOL_PASSWORD="..."
export SMARTSCHOOL_MAIN_URL="school.smartschool.be" SMARTSCHOOL_MFA="YYYY-MM-DD"
export MCP_API_KEY="a-long-random-secret" # recommended
smartschool-mcp --transport streamable-http --host 0.0.0.0 --port 8000The endpoint is http://HOST:PORT/mcp (stateless, JSON responses); GET /health answers {"status":"ok"} without auth. Put it behind HTTPS (Caddy, nginx, Cloudflare Tunnel) and add it to your client with the header Authorization: Bearer <MCP_API_KEY>.
Environment variables
Variable | CLI flag | Default | Description |
|
|
|
|
|
|
| Bind address (HTTP) |
|
|
| Port (HTTP) |
| Require | ||
| Comma-separated | ||
|
| Tool-call threads (stdio) | |
|
| Parallel Smartschool connections for | |
| off |
| |
|
| Rebuild the Smartschool session after this many seconds | |
| Smartschool username | ||
| Smartschool password | ||
| School address, e.g. | ||
| Birth date ( |
Login safety
Settings are checked before the first login, so a typo never costs a login attempt. A password Smartschool rejects is posted only once: an auth_failed marker next to the session cache blocks further attempts until you delete it, because Smartschool locks an account after a few failed logins. Credentials are only ever posted to the school's own host over HTTPS.
Development
uv sync --extra dev
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run mypy smartschool_mcp/Disclaimer
Unofficial tool, not affiliated with Smartschool. Use in accordance with your school's terms of service.
Available Tools
1 tooldownload_courseARead-only
Download the documents of a Smartschool course (vak) straight into this conversation, e.g. 'download de volledige cursus van nrt'. Finds the course by name, abbreviation or id, walks all its Documenten folders and returns every file as an embedded resource (images as images, text as text, other files base64), after a JSON summary of paths, sizes and web links. Nothing is stored on the server. Use document to fetch only files whose folder or name contains those words.
Inputs: course (required), max_mb, document.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of confusion between tools. The one tool has a clearly stated purpose.
The name download_course follows a clean verb_noun snake_case convention. With only one tool there is no pattern to break, but it is a readable, conventional name.
A single tool for a whole platform integration (Smartschool courses, documents, presumably grades/messages) is very thin. The domain implies many more operations than one download endpoint.
Only downloading course documents is supported, with no way to list courses, browse folders, or access other Smartschool data. Agents cannot discover courses or perform any lifecycle operations beyond a single bulk fetch.
Maintenance
Related MCP Connectors
Search, read and cite documents. Add, replace and delete files with write access. OAuth required.
Read and search folders on your own computer with explicit consent. Files are never uploaded.
Documents to Markdown/PDF, OCR, video and audio transcripts, TTS, screenshots, domains, frames.
Convert PDF, DOCX, PPTX, XLSX and HTML links to clean Markdown with tables and RAG chunks.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI agents to read and extract text, tables, and image content from files (PDF, DOCX, PPTX, SVG, PNG) within a folder, providing structured data for interpretation by the calling model.7-
- AlicenseNot gradedqualityBmaintenanceEnables users to monitor their courses for new posts, changed instructions, and due dates, search downloaded documents, and automatically sync new or changed files into course folders.4MIT
- AlicenseAqualityCmaintenanceEnables MCP-capable AI clients to query course announcements, deadlines, grades, and assignments and to preview or incrementally sync course materials to local storage.10MIT
- FlicenseNot gradedqualityBmaintenanceEnables agents to query course information, announcements, assignments, and deadlines, and to download attachments, syllabus PDFs, and lecture videos through a local browser connection. It can also prepare assignment submissions for review without uploading by default.2-