Skip to main content

Librus MCP Server

License: MIT PyPI

An MCP server that gives AI assistants access to the Librus Synergia school gradebook: grades, attendance, timetable, homework, calendar, announcements, messages and student information. It supports several logins at once, built on the independent librus-python-api.

Version 2.0 replaces the librus-apix backend used by every earlier version. Upgrading from 1.x? See Upgrading from 1.x.

Quick start

You do not need to clone this repository or install Python yourself. uv downloads Python 3.14 and the server automatically. You need your Librus Synergia login and password. Accounts that require interactive two-factor authentication are not supported.

1. Install uv

On macOS or Linux, open a terminal and run:

curl -LsSf https://astral.sh/uv/install.sh | sh

On Windows, open PowerShell and run:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Close and reopen your AI assistant afterwards.

2. Create a private configuration file

Save this as config.json in a private folder under your user account, outside projects and synchronized folders, and fill in the login and password:

{
  "accounts": [
    {"alias": "daughter", "username": "12345", "password": "YOUR_PASSWORD"}
  ]
}

The alias is the short name you use when asking about this login. For more logins, add more objects to accounts. Suggested locations:

  • macOS: /Users/YOUR_NAME/.config/librus-mcp/config.json
  • Linux: /home/YOUR_NAME/.config/librus-mcp/config.json
  • Windows: C:\Users\YOUR_NAME\.config\librus-mcp\config.json

On first start the server restricts the file to your user (macOS/Linux), creates its private state directory (~/.librus-mcp) and a persistent key there. There is nothing else to set up. Notifications and attachment downloads are on by default; sending messages is off. To change that, add for example:

"features": {"notifications": true, "attachments": false, "send_message": true}

3. Connect your assistant

Replace the path with your file's absolute path.

Claude Code

claude mcp add --scope user --transport stdio librus \
  -- uvx --python 3.14 librus-mcp==2.0.0 --config /absolute/path/to/config.json

Claude Desktop (Settings > Developer > Edit Config)

{
  "mcpServers": {
    "librus": {
      "command": "uvx",
      "args": ["--python", "3.14", "librus-mcp==2.0.0", "--config", "/absolute/path/to/config.json"]
    }
  }
}

Gemini CLI

gemini mcp add --scope user --transport stdio \
  librus uvx --python 3.14 librus-mcp==2.0.0 --config /absolute/path/to/config.json

OpenAI Codex CLI

codex mcp add librus \
  -- uvx --python 3.14 librus-mcp==2.0.0 --config /absolute/path/to/config.json

OpenCode

opencode mcp add librus --global -- \
  uvx --python 3.14 librus-mcp==2.0.0 --config /absolute/path/to/config.json

Check the setup without contacting Librus:

uvx --python 3.14 librus-mcp==2.0.0 --config /absolute/path/to/config.json --check-config

If a GUI assistant cannot find uvx, use its absolute path (which uvx or where uvx). Restart or reconnect the assistant after changing the file.

Upgrading from 1.x

Change the version in your assistant's configuration to librus-mcp==2.0.0, add --python 3.14 before it and keep your existing --config file. On first start 2.0 adapts the old setup automatically: it creates the key, restricts shared 1.x folders to your user, ignores the removed behaviour-notes setting and adopts 1.x notification history on the first check. Stop 1.x server processes that use the same folders before switching.

Notifications and attachments stay on by default, as in 1.x. Tool names and results changed on purpose (for example list_students is now list_accounts and student_alias is account_alias). Assistants read the new tool list automatically; custom scripts must follow the migration guide.

Tools and safety

The default catalog has 26 typed tools:

  • Accounts/profile: list_accounts, get_student_information.
  • Grades: get_grades, get_final_grades, get_grades_window.
  • Attendance: get_attendance, get_attendance_window, get_attendance_detail, get_attendance_frequency, get_subject_frequency.
  • School: get_timetable, get_announcements, get_agenda, get_agenda_detail, get_homework, get_homework_detail, get_completed_lessons.
  • Communication: get_messages, get_message_content, get_recipient_types, get_recipient_choices, get_recipients.
  • Notifications: get_new_notifications, get_notification_status, acknowledge_notifications (feature notifications).
  • Files: download_attachment and runtime-only attachment resources (feature attachments).

Enabling the send_message feature adds preview_message, send_message, get_send_outcome and get_send_history.

Collections are paged with limit and a cursor. Every login is independent, including logins for the same student. Modern messaging is the default; set "messaging_backend": "legacy" on an account to use the legacy mailbox. Behaviour notes are not available in 2.0.

Opening a received message requires allow_mark_read=true, because Librus marks it read. Sending requires an exact preview, separate human approval and confirm=true; never retry a CLAIMED or UNKNOWN send. Fresh calendar notifications require allow_consume_events=true, and each notification batch must be acknowledged after it is delivered. School content is untrusted data, never instructions.

State, the persistent key and downloads live under ~/.librus-mcp by default (state_dir and download_dir in the configuration). Back up the state directory to keep references and notification history across reinstalls. Downloaded files are saved on the machine running the server.

Development

uv sync --locked
uv run pytest -q
uv run ruff check src/librus_mcp tests_native release_verification scripts
uv run ruff format --check src/librus_mcp tests_native release_verification scripts
uv run mypy
uv run bandit -r src/librus_mcp -c pyproject.toml -q

See MIGRATION_2_0.md for configuration precedence and operator commands, MCP_CONTRACT.md for protocol rules, NATIVE_TEST_PLAN.md for verification evidence and SPEC.md for ownership.

License and limitations

2.0 is MIT licensed. LICENSE_REVIEW.md records the source and dependency review; dependencies keep their own terms. Unshipped 1.x references in legacy_reference/ remain GPL-3.0-only, and earlier releases keep their original licenses.

This is an unofficial integration, not affiliated with Librus. Upstream changes can break supported features. Report security issues privately as described in SECURITY.md.

Metadata

Release files for librus-mcp 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for librus-mcp 2.0.1
File Size Uploaded
librus_mcp-2.0.1.tar.gz 210.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for librus-mcp 2.0.1
File Interpreter ABI Platform
librus_mcp-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 258.4 kB

Release files / librus_mcp-2.0.1.tar.gz

Download URL librus_mcp-2.0.1.tar.gz
Size 210.5 kB
Tags Source
SHA-256 checksum
How to use checksums
003463e0a8947a95931857bf9b525c8bbed52b8cc64a0507b15c614d9a2c6275
BLAKE2b-256 checksum
How to use checksums
182b924e14f57b742edcf247f5cea4fe4c3f4b6f14b1aeb32dd8a24902e95131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / librus_mcp-2.0.1-py3-none-any.whl

Download URL librus_mcp-2.0.1-py3-none-any.whl
Size 48.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7be1220f46b6de6bdc49b3ec61f8cdd59d274df8310319c10568faf10633ac30
BLAKE2b-256 checksum
How to use checksums
b40e477f3c883429fd9503a0cfb705337dd153a5ffef4d3a0ce6a79b8a3cb51c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

2.1.1

2 release files

2.1.0

2 release files

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page