Skip to main content
Glama
lms-polinema-mcp

lms-polinema-mcp

lms-polinema-mcp

License: MIT Python: 3.11+ MCP: 2.x

An MCP server for LMS Polinema. Gives AI agents access to your courses, assignments, deadlines, and materials.

Works with Claude Code, Cursor, Antigravity, or any MCP-compatible client.

How it works

Polinema does not allow direct Moodle logins with student credentials. Authentication flows through an institutional single sign-on chain: SIAKAD (academic portal) → SLC (SPADA gateway) → LMSSLC (Moodle).

On first run, auth.py authenticates via SIAKAD (NIM and password) using HTTP requests (httpx), exchanges tokens through SLC, and captures the authenticated MoodleSession. Session cookies are saved to ~/.lms_polinema/. When a session expires, the server re-authenticates automatically in the background without requiring browser binaries.

Related MCP server: MoodlIA MCP Server

Tools

Tool

Parameters

Returns

lms_list_courses

-

Enrolled courses for the current semester

lms_list_assignments

course_id (int, optional)

Assignments, optionally filtered by course

lms_get_assignment_detail

assignment_id (int)

Instructions, attachments, submission status

lms_list_materials

course_id (int)

Material links and metadata (slides, jobsheets, folders)

lms_check_deadlines

-

Deadline summary across all courses

Installation

Requires Python 3.11+ and uv.

git clone https://github.com/hafidzrafi/lms-polinema-mcp.git
cd lms-polinema-mcp
uv sync

Run once to set up credentials:

uv run auth.py

Credentials are stored as plaintext JSON at ~/.lms_polinema/credentials.json (0600 permissions).

Configuration

Add to your MCP client config:

{
  "mcpServers": {
    "lms-polinema": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/lms-polinema-mcp", "lms-polinema-mcp"]
    }
  }
}

Or use the virtualenv directly:

macOS / Linux: .venv/bin/python -m lms_polinema_mcp.server

Windows: .venv\Scripts\python.exe -m lms_polinema_mcp.server

Settings can be overridden via environment variables or a .env file:

Variable

Default

Description

LMS_POLINEMA_HTTP_TIMEOUT

20.0

Request timeout (seconds)

LMS_POLINEMA_COURSE_CACHE_TTL_SECONDS

1800

Course list cache lifetime

LMS_POLINEMA_SESSION_CACHE_TTL_SECONDS

300

Session validation cache lifetime

LMS_POLINEMA_SIAKAD_BASE_URL

https://siakad.polinema.ac.id

SIAKAD portal URL

LMS_POLINEMA_MOODLE_BASE_URL

https://lmsslc.polinema.ac.id

Moodle URL

See .env.example for the full list.

Known limitations

  • All data is retrieved by scraping HTML. The Moodle Web Services API is disabled on this instance.

  • All operations are currently read-only; assignment submission is not supported.

  • lms_list_materials returns resource links and metadata, not downloaded file contents.

  • Courses without an active Moodle link configured by the lecturer will return moodle_id: null.

  • Sessions expire after ~30 min idle. Re-auth happens automatically in the background.

  • SSL verification is disabled for lmsslc.polinema.ac.id and slc.polinema.ac.id due to a missing intermediate CA.

Disclaimer

This project is an independent open-source utility for academic productivity and is not officially affiliated with or endorsed by State Polytechnic of Malang (Polinema).

License

MIT License - Hafidz Rafi' Rabbani

Available Tools

5 tools
lms_check_deadlinesA

Return deadline summary for all active assignments across all enrolled courses.

Inputs: no named parameters. Returns: result

lms_get_assignment_detailB

Return complete assignment details including instructions, attachments, and submission status.

Inputs: assignment_id (required). Returns: Detailed assignment record including submission status and instructions.

lms_list_assignmentsA

Return all active assignments, optionally filtered by specific course_id.

Inputs: course_id. Returns: result

lms_list_coursesA

Return all enrolled academic courses for the current semester from SPADA portal.

Inputs: no named parameters. Returns: result

lms_list_materialsA

Return all educational material items (slides, documents, folders) for a specific course.

Inputs: course_id (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool maps to a distinct resource or action: courses, assignments, assignment details, materials, and deadlines. There is no overlap in purpose, and the descriptions clearly differentiate them.

    Naming Consistency4/5

    All tools follow a consistent verb_noun pattern with the 'lms' prefix recommended for MCP servers caterpillar walking. The only minor deviation is 'lms_check_deadlines' which uses a verb that is semantically different from 'list' or 'get', but it still matches the pattern.

    Tool Count5/5

    With 5 tools, the server is well-scoped for an LMS portal integration. Each tool provides essential functionality without redundancy, covering the primary needs of listing and retrieving data.

    Completeness3/5

    The tools cover read-only operations for courses, assignments, materials, and deadlines. Missing are mutating operations like creating or submitting assignments, and there is no tool for listing modules or grades, which are common in LMS platforms. However, the core browsing workflow is supported.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers