
onbirdev/moodle-webservice_mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCP を実装する Moodle ウェブサービスプラグインで、AI アシスタントとのシームレスな統合を実現
概要
AIアシスタントと外部システムとのシームレスな統合を実現するMoodle Webサービスプラグイン。 このプラグインは、MCP の外部関数を JSON-RPC 2.0 を使用して MCP ツールとして公開し、MCP 互換のクライアントによって発見可能でコール可能にします。 - : JSON-RPC 2.0 を使用したモデルコンテキストプロトコルのフルサポート - : MCP ツールとして Moodle の外部機能を自動的に公開 - : Moodle パラメータの記述を JSON スキーマに変換し、より良いツールのドキュメンテーションのために - : Moodle の外部サービストークンを使用してセキュアなアクセス - : 認証されたサービスにのみ機能を公開 - : 包括的な PHPUnit テストカバレッジ - : 他のシステムとのクイック統合のための組み込みクライアントクラス アプリケーションがAIアシスタントと大型ランゲージモデル(LLM)のコンテキストをどのように提供するかを標準化するオープンプロトコルです.
概要(AI 翻訳)
AIアシスタントと外部システムとのシームレスな連携のために、**Model Context Protocol (MCP)**を実装するMoodle Webサービスプラグイン。 このプラグインは、MCP の外部関数を JSON-RPC 2.0 を使用して MCP ツールとして公開し、MCP 互換のクライアントによって発見可能でコール可能にします。
##特徴
- MCPプロトコルの実装: JSON-RPC 2.0 を使用したモデルコンテキストプロトコルのフルサポート -Dynamic Tool Discovery:MCPツールとしてMoodleの外部機能を自動的に露出
- ** JSON スキーマ生成**: Moodle パラメータの記述を JSON スキーマに変換し、より良いツールのドキュメント
- トークンベースの認証: Moodleの外部サービストークンを使用してセキュアなアクセス
- Service-aware: 認証サービスに使用できる機能のみを公開 -Well-tested:包括的なPHPUnitテストカバレッジ
- 容易な統合: 他のシステムとのクイック統合のための組み込みクライアントクラス
MCPとは?
Model Context Protocol (MCP) は、アプリケーションがAI アシスタントと大きな言語モデル (LLM) のコンテキストをどのように提供するかを標準化するオープンプロトコルです。 これにより、AI アシスタントが次のようになります。
- 利用可能なツールとその機能を発見
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Moodle MCP Web Service Plugin
A Moodle web service plugin that implements the Model Context Protocol (MCP) for seamless integration with AI assistants and external systems. This plugin exposes Moodle’s external functions as MCP tools using JSON-RPC 2.0, making them discoverable and callable by MCP-compatible clients.
Features
- MCP Protocol Implementation: Full support for Model Context Protocol using JSON-RPC 2.0
- Dynamic Tool Discovery: Automatically exposes Moodle external functions as MCP tools
- JSON Schema Generation: Converts Moodle parameter descriptions to JSON Schema for better tool documentation
- Token-based Authentication: Secure access using Moodle’s external service tokens
- Service-aware: Only exposes functions available to the authenticated service
- Well-tested: Comprehensive PHPUnit test coverage
- Easy Integration: Built-in client class for quick integration with other systems
What is MCP?
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to AI assistants and Large Language Models (LLMs). It allows AI assistants to:
- Discover available tools and their capabilities
- Invoke tools with proper parameters
- Receive structured responses
This plugin bridges Moodle’s web services with the MCP protocol, enabling AI assistants to interact with your Moodle instance in a standardized way.
Requirements
- Moodle: 4.5 or higher
- PHP: 8.1 or higher
- Moodle Web Services: Must be enabled
Installation
Method 1: Via Moodle Plugin Directory (Recommended)
- Visit Site administration → Plugins → Install plugins
- Search for “MCP Web Service”
- Click Install and follow the on-screen instructions
Method 2: Manual Installation
-
Download the plugin or clone from repository:
cd /path/to/moodle/webservice git clone https://github.com/onbirdev/moodle-webservice_mcp.git mcp -
Visit Site administration → Notifications to complete the installation
-
The plugin will be installed as
webservice_mcp
Configuration
1. Enable Web Services
- Go to Site administration → Advanced features
- Enable Enable web services
- Save changes
2. Enable MCP Protocol
- Go to Site administration → Plugins → Web services → Manage protocols
- Enable Model Context Protocol (MCP)
3. Create an External Service
- Go to Site administration → Server → Web services → External services
- Click Add to create a new service
- Configure the service:
- Name: e.g., “MCP Service”
- Short name: e.g., “mcp_service”
- Enabled: Yes
- Authorized users only: Yes (recommended)
- Add the external functions your service should expose
4. Create a Token
- Go to Site administration → Server → Web services → Manage tokens
- Click Add to create a new token
- Select:
- User: The user this token will authenticate as
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →