Skip to main content
Glama

eClass MCP サーバー

特徴

  • 認証: UoAのCAS SSO認証システムを通じてeClassにログインします。

  • コース管理: 登録したコースのリストを取得する

  • セッション管理: ツール呼び出し間の認証されたセッションを維持する

  • ステータスチェック: 認証ステータスを確認する

Related MCP server: mcpUPB

プロジェクト構造

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

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
F
license - not found
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server teaching AI agents to implement TideCloak: auth, E2EE, IGA, security analysis

  • MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

View all MCP Connectors

Latest Blog Posts

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