Skip to main content
Glama

Moodle MCP サーバー

LLM が Moodle プラットフォームと対話してコース、学生、課題、クイズを管理できるようにする MCP (Model Context Protocol) サーバー。

特徴

学生管理ツール

  • list_students - コースに登録されている学生のリストを取得します

    • 各生徒のID、名前、メールアドレス、最終アクセス時間を表示します

課題管理ツール

  • get_assignments - コース内の利用可能なすべての課題を取得します

    • ID、名前、説明、期限、最高成績などの情報が含まれます

  • get_student_submissions - 特定の課題に対する学生の提出物を調べる

    • 課題IDとオプションで学生IDが必要です

  • provide_assignment_feedback - 学生の提出物に対する成績とコメントを提供します

    • 学生ID、課題ID、成績、フィードバックコメントが必要です

クイズ管理ツール

  • get_quizzes - コース内の利用可能なすべてのクイズを取得します

    • ID、名前、説明、開始/終了日、最大グレードなどの情報が含まれます

  • get_quiz_attempts - 特定のクイズにおける生徒の試行を調べる

    • クイズIDとオプションで学生IDが必要です

  • provide_quiz_feedback - クイズの回答に対するコメントを提供します

    • 試行IDとフィードバックコメントが必要です

Related MCP server: Moodle MCP

要件

  • Node.js (v14以上)

  • 適切な権限を持つMoodle APIトークン

  • MoodleコースID

インストール

  1. このリポジトリをクローンします:

git clone https://github.com/your-username/moodle-mcp-server.git
cd moodle-mcp-server
  1. 依存関係をインストールします:

npm install
  1. 次の構成で.envファイルを作成します。

MOODLE_API_URL=https://your-moodle.com/webservice/rest/server.php
MOODLE_API_TOKEN=your_api_token
MOODLE_COURSE_ID=1  # Replace with your course ID
  1. サーバーを構築します。

npm run build

クロードとの使用

Claude Desktop で使用するには、サーバー構成を追加します。

MacOSの場合: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "moodle-mcp-server": {
      "command": "/path/to/node",
      "args": [
        "/path/to/moodle-mcp-server/build/index.js"
      ],
      "env": {
        "MOODLE_API_URL": "https://your-moodle.com/webservice/rest/server.php",
        "MOODLE_API_TOKEN": "your_moodle_api_token",
        "MOODLE_COURSE_ID": "your_course_id"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Windows ユーザーの場合、パスにはバックスラッシュを使用します。

{
  "mcpServers": {
    "moodle-mcp-server": {
      "command": "C:\\path\\to\\node.exe",
      "args": [
        "C:\\path\\to\\moodle-mcp-server\\build\\index.js"
      ],
      "env": {
        "MOODLE_API_URL": "https://your-moodle.com/webservice/rest/server.php",
        "MOODLE_API_TOKEN": "your_moodle_api_token",
        "MOODLE_COURSE_ID": "your_course_id"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

設定が完了すると、Claude は Moodle コースを操作して次の操作を実行できるようになります。

  • 生徒とその提出物のリストを見る

  • 課題にコメントと成績を付ける

  • クイズの試みを検査し、フィードバックを提供する

発達

自動リビルドを使用した開発の場合:

npm run watch

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。MCP Inspectorの使用をお勧めします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

Moodle APIトークンの取得

  1. 管理者としてMoodleサイトにログインします

  2. サイト管理 > プラグイン > Webサービス > トークンの管理に移動します

  3. コースを管理するために必要な権限を持つ新しいトークンを作成します

  4. 生成されたトークンをコピーして.envファイルに追加します。

安全

  • .envファイルやMoodle APIトークンを決して共有しないでください

  • MCPサーバーが管理に必要なコースにのみアクセスできるようにします。

  • 必要最小限の権限を持つトークンを使用する

ライセンス

マサチューセッツ工科大学

Available Tools

7 tools
get_assignmentsB

Obtiene la lista de tareas asignadas en el curso configurado

Inputs: no named parameters.

get_quiz_gradeB

Obtiene la calificación de un estudiante en un quiz específico

Inputs: studentId (required), quizId (required).

get_quizzesB

Obtiene la lista de quizzes en el curso configurado

Inputs: no named parameters.

get_studentsB

Obtiene la lista de estudiantes inscritos en el curso configurado

Inputs: no named parameters.

get_submission_contentC

Obtiene el contenido detallado de una entrega específica, incluyendo texto y archivos adjuntos

Inputs: studentId (required), assignmentId (required).

get_submissionsC

Obtiene las entregas de tareas en el curso configurado

Inputs: studentId, assignmentId.

provide_feedbackC

Proporciona feedback sobre una tarea entregada por un estudiante

Inputs: studentId (required), assignmentId (required), feedback (required), grade.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 7 tools

    Disambiguation4/5

    The tools are mostly distinct with clear purposes: get_assignments, get_quizzes, get_students, get_submissions, and get_submission_content target different resources, while get_quiz_grade and provide_feedback focus on specific actions. However, get_submissions and get_submission_content could be slightly confusing as they both relate to submissions, though their descriptions clarify the difference between listing submissions and getting detailed content.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, starting with 'get_' for retrieval operations and 'provide_' for the feedback action. This uniformity makes the tool set predictable and easy to understand, with no deviations in naming conventions.

    Tool Count4/5

    With 7 tools, the count is reasonable for a Moodle server focused on course management. It covers key areas like assignments, quizzes, students, and submissions, though it might be slightly thin for broader educational workflows, such as missing tools for creating or updating resources.

    Completeness3/5

    The tool set provides good read-only coverage for retrieving course data (assignments, quizzes, students, submissions) and includes a feedback action. However, there are notable gaps in CRUD operations: no tools for creating, updating, or deleting resources (e.g., assignments or quizzes), which limits agent functionality for full lifecycle management in the Moodle domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers