Skip to main content
Glama

eClass MCP Server

eClass MCP サーバー

特徴

  • 認証: UoAのCAS SSO認証システムを通じてeClassにログインします。
  • コース管理: 登録したコースのリストを取得する
  • セッション管理: ツール呼び出し間の認証されたセッションを維持する
  • ステータスチェック: 認証ステータスを確認する

プロジェクト構造

このプロジェクトは、保守性を向上させるためにモジュール式アーキテクチャを採用しています。

eclass-mcp-server/ ├── run_server.py # Entry point script for running the server ├── pyproject.toml # Project configuration and dependencies ├── .env # Environment variables (create from example.env) ├── src/ └── eclass_mcp_server/ # Main package ├── __init__.py # Package initialization ├── server.py # Core server implementation and tool handlers ├── authentication.py # Authentication functionality ├── course_management.py # Course-related functionality ├── html_parsing.py # HTML parsing utilities └── test/ # Test scripts for functionality verification ├── __init__.py ├── test_login.py ├── test_courses.py └── run_all_tests.py

インストール

UV を使用してサーバーをインストールします (推奨):

# Clone the repository git clone https://github.com/yourusername/eClass-MCP-server.git cd eClass-MCP-server # Install dependencies uv sync --dev --all-extras

あるいは、pip を使用してインストールします。

pip install -e .

構成

次の構成でルート ディレクトリに.envファイルを作成します (または、提供されているexample.envファイルをコピーして名前を変更します)。

ECLASS_URL=https://eclass.uoa.gr ECLASS_USERNAME=your_username ECLASS_PASSWORD=your_password

すべての資格情報は.envファイルで提供する必要があります。サーバーは資格情報をパラメータとして受け入れません。

使用法

ターミナル

エントリ ポイント スクリプトを使用してサーバーを実行します。

python run_server.py

またはモジュールとして:

python -m src.eclass_mcp_server.server

カーソル

「設定」→「MCP」に移動し、 Add new MCP serverをクリックします。

  • エージェントがサーバーの用途を認識できるように、一意かつ適切な名前を選択します(例:「eClass Server」)
  • 「タイプ」のcommandオプションを選択します
  • コマンド入力に以下を追加します: python /path/to/eclass-mcp-server/run_server.py

このコマンドは、MCP クライアントをserver.pyのメイン サーバー エントリ ポイントに接続するrun_server.pyスクリプトを実行します。

クロードデスクトップ

Claude Desktop で使用するには:

  1. クロードデスクトップを開く
  2. 設定 > サーバーに移動
  3. 次の詳細で新しいサーバーを追加します。
    • 名前: eClass MCP
    • コマンド: run_server.py スクリプトへのパス
  4. サーバーの追加をクリック
  5. クロードとチャットするときにドロップダウンからサーバーを選択してください

ツール

サーバーは、MCP クライアントで使用するための次のツールを提供します。

ログイン

SSO 認証を使用して eClass にログインします。

{ "random_string": "any_value" }

コースを取得する

登録済みのコースのリストを取得します (最初にログインする必要があります)。

{ "random_string": "any_value" }

ログアウト

eClass からログアウトします。

{ "random_string": "any_value" }

認証ステータス

現在の認証ステータスを確認します。

{ "random_string": "any_value" }

テスト

このプロジェクトには、機能性を検証するためのテスト スクリプトが含まれています。

# Run all tests python -m src.eclass_mcp_server.test.run_all_tests # Run specific tests python -m src.eclass_mcp_server.test.test_login python -m src.eclass_mcp_server.test.test_courses

MCPクライアントの使用例

from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client import asyncio async def run_agent(): server_params = StdioServerParameters( command="python /path/to/eclass-mcp-server/run_server.py", ) async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: # Initialize the session await session.initialize() # Login to eClass login_result = await session.call_tool("login", { "random_string": "dummy" }) print(login_result) # Get courses courses_result = await session.call_tool("get_courses", { "random_string": "dummy" }) print(courses_result) # Logout logout_result = await session.call_tool("logout", { "random_string": "dummy" }) print(logout_result) if __name__ == "__main__": asyncio.run(run_agent())

AIエージェントとの統合

このMCPサーバーは、モデルコンテキストプロトコルをサポートするAIエージェントと連携して使用するように設計されています。これにより、AIシステムはeClassと直接やり取りできるようになり、以下のような機能を実現できます。

  • コース情報の取得
  • コースのお知らせを確認する
  • コース教材へのアクセス
  • 課題の提出(将来の機能)

セキュリティに関する考慮事項

  • サーバーは機密性の高い認証資格情報を処理します
  • 認証情報は認証にのみ使用され、永続的に保存されることはありません
  • セッションクッキーはサーバーのライフサイクル中にメモリ内に保持されます
  • サーバーは操作を実行する前にセッション状態を検証します
  • 資格情報を含む.envファイルはバージョン管理にコミットしないでください (.gitignore に含まれています)

ライセンス

MITライセンス

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

AI エージェントが Open eClass プラットフォーム インスタンスを認証して対話できるようにする MCP サーバー。コース情報を取得して基本的なプラットフォーム操作を実行するための UoA の SSO 認証システムをサポートします。

  1. 特徴
    1. プロジェクト構造
      1. インストール
        1. 構成
          1. 使用法
            1. ターミナル
            2. カーソル
            3. クロードデスクトップ
          2. ツール
            1. ログイン
            2. コースを取得する
            3. ログアウト
            4. 認証ステータス
          3. テスト
            1. MCPクライアントの使用例
              1. AIエージェントとの統合
                1. セキュリティに関する考慮事項
                  1. ライセンス
                    1. 貢献

                      Related MCP Servers

                      • -
                        security
                        F
                        license
                        -
                        quality
                        A personal MCP server for securely storing and accessing API keys across projects using the macOS Keychain, letting AI assistants and applications retrieve credentials through natural language.
                        Last updated -
                        10
                        TypeScript
                        • Apple
                      • -
                        security
                        F
                        license
                        -
                        quality
                        An MCP server that enables AI assistants to access and interact with Google Classroom data, allowing users to view courses, course details, and assignments through natural language commands.
                        Last updated -
                        508
                        1
                        JavaScript
                      • -
                        security
                        A
                        license
                        -
                        quality
                        An MCP server that enables AI assistants to control a web browser through natural language commands, allowing them to navigate websites and extract information via SSE transport.
                        Last updated -
                        505
                        Python
                        MIT License
                        • Apple
                      • -
                        security
                        -
                        license
                        -
                        quality
                        This MCP server provides tools to interact with the Salesforce Agentforce API, allowing authentication, session creation, and message exchange with Salesforce agents.
                        Last updated -
                        1
                        Python

                      View all related MCP servers

                      MCP directory API

                      We provide all the information about MCP servers via our MCP API.

                      curl -X GET 'https://glama.ai/api/mcp/v1/servers/sdi2200262/eclass-mcp-server'

                      If you have feedback or need assistance with the MCP directory API, please join our Discord server