Moodle Developer Documentation MCP Server
A Model Context Protocol (MCP) server that provides seamless access to Moodle developer documentation from moodledev.io. It enables AI assistants and other MCP clients to search, browse, and retrieve Moodle development documentation with version-specific support.
README
Moodle Developer Documentation MCP Server
A Model Context Protocol (MCP) server that provides seamless access to Moodle developer documentation from moodledev.io. This server enables AI assistants and other MCP clients to search, browse, and retrieve Moodle development documentation with version-specific support.
Features
- 🔍 Search Documentation: Search across Moodle developer documentation with intelligent filtering
- 📚 Version Support: Access documentation for multiple Moodle versions (4.1, 4.2, 5.0, etc.)
- 🗂️ API Structure: Browse and explore Moodle's API documentation structure
- 📄 Page Fetching: Retrieve full content from specific documentation pages
- ⚡ Async Performance: Built with async/await for efficient concurrent operations
- 🔧 MCP Compatible: Works with any MCP-compatible client (Claude Desktop, etc.)
Installation
Prerequisites
- Python 3.8 or higher
- pip (Python package installer)
Install from PyPI
The easiest way to install the Moodle Developer Documentation MCP Server is via PyPI:
pip install moodle_dev_mcp
For Development or Specific Environments
If you're working in a virtual environment (recommended):
# Create a virtual environment
python -m venv moodle_mcp_env
# Activate the virtual environment
# On Windows:
moodle_mcp_env\Scripts\activate
# On macOS/Linux:
source moodle_mcp_env/bin/activate
# Install the package
pip install moodle_dev_mcp
Install with UV (Recommended for faster installs)
If you have uv installed:
uv pip install moodle_dev_mcp
Verify Installation
After installation, verify that the server is properly installed:
python -c "import moodle_dev_mcp; print('Installation successful!')"
Or test the server directly:
python -m moodle_dev_mcp
Configuration
Claude Desktop Integration
To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop config file:
Location of config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration:
{
"mcpServers": {
"moodle_dev_docs": {
"command": "python",
"args": ["-m", "moodle_dev_mcp"],
"env": {}
}
}
}
If you installed in a virtual environment, use the full path to the Python executable:
{
"mcpServers": {
"moodle_dev_docs": {
"command": "/path/to/your/venv/bin/python",
"args": ["-m", "moodle_dev_mcp"],
"env": {}
}
}
}
Other MCP Clients
For other MCP clients, use the following command to start the server:
python -m moodle_dev_mcp
Available Tools
The server provides the following tools that can be used by MCP clients:
1. get_versions
Get a list of available Moodle versions in the developer documentation.
Parameters: None
Example usage:
Get available Moodle versions
2. search_docs
Search Moodle developer documentation for specific topics or APIs.
Parameters:
query(required): Search query (e.g., "database API", "plugin development")version(optional): Specific Moodle version to searchlimit(optional): Maximum number of results (default: 10)
Example usage:
Search for "plugin development" in Moodle documentation
Search for "database API" in version 4.2 with limit 5
3. get_api_structure
Get the API documentation structure for a specific Moodle version.
Parameters:
version(optional): Moodle version (defaults to latest)
Example usage:
Get API structure for Moodle 4.2
Get latest API structure
4. fetch_page
Fetch full content of a specific Moodle developer documentation page.
Parameters:
url(required): Full URL of the documentation page
Example usage:
Fetch content from https://moodledev.io/docs/apis/plugintypes/mod
Usage Examples
Once configured with your MCP client, you can use natural language to interact with the Moodle documentation:
Basic Searches
- "Search for plugin development best practices"
- "Find documentation about database APIs"
- "Look up authentication methods in Moodle"
Version-Specific Queries
- "Get API documentation for Moodle 4.2"
- "Search for web services in version 5.0"
- "Show me the plugin structure for the latest version"
Detailed Content Retrieval
- "Fetch the complete plugin development guide"
- "Get the full content of the database API documentation"
Development
Development Installation
For development, clone the repository and install in development mode:
git clone https://github.com/khairu-aqsara/moodle_dev_mcp.git
cd moodle_dev_mcp
# Install in development mode
pip install -e .
# Or with development dependencies
pip install -e ".[dev]"
Dependencies
- Python 3.8+
- mcp: Model Context Protocol implementation
- aiohttp: Async HTTP client for web requests
- beautifulsoup4: HTML parsing and content extraction
Testing
Run tests with:
pytest
Troubleshooting
Common Installation Issues
- Permission Errors: Use
pip install --user moodle_dev_mcpif you encounter permission issues - Python Version: Ensure you're using Python 3.8 or higher:
python --version - Virtual Environment: Consider using a virtual environment to avoid conflicts
Runtime Issues
- Network Connectivity: Ensure you have internet access to reach moodledev.io
- Timeout Errors: The server includes built-in retry logic, but very slow connections may timeout
- Rate Limiting: The server respects rate limits and includes appropriate delays
Debug Mode
Enable debug logging by setting the environment variable:
export PYTHONPATH=.
python -c "import logging; logging.basicConfig(level=logging.DEBUG)" -m moodle_dev_mcp
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Setup
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: wenkhairu@gmail.com
Acknowledgments
- Built on the Model Context Protocol by Anthropic
- Documentation sourced from Moodle Developer Resources
- Thanks to the Moodle development community for comprehensive documentation
Note: This is an unofficial tool and is not affiliated with Moodle HQ. It's designed to make Moodle developer documentation more accessible through modern AI tools.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。