MQL5 Documentation RAG MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MQL5 Documentation RAG MCP Server
A Model Context Protocol (MCP) server that provides Claude Desktop with access to up-to-date MQL5 documentation through a serverless AWS RAG (Retrieval-Augmented Generation) infrastructure.
Overview
This MCP server implements the search_mql5_docs tool, allowing Claude Desktop to retrieve relevant MQL5 documentation snippets for accurate code generation and technical assistance.
Related MCP server: j-quants-doc-mcp
Features
š Real-time MQL5 Documentation Search - Retrieves up-to-date documentation snippets
ā” Low Latency - Optimized for <500ms average response time
š”ļø Robust Error Handling - Circuit breaker pattern for graceful degradation
š Secure - API key-based authentication with AWS API Gateway
š Monitoring - Comprehensive logging and error reporting
Prerequisites
Python 3.10+
uv package manager (recommended for dependency management)
AWS Account with deployed RAG infrastructure
Claude Desktop with MCP support
Installation
1. Clone and Set Up Project
# Clone the repository
git clone <repository-url>
cd mcp-mql5-rag
# Create virtual environment with uv
uv venv
source .venv/bin/activate # On Windows: .\.venv\Scripts\activate
# Install dependencies
uv add "mcp[cli]" httpx pyyaml pydantic2. Configuration
Environment Variables
Set your AWS API Gateway API key:
# Linux/macOS
export MQL5_RAG_API_KEY="your-api-gateway-key-here"
# Windows
set MQL5_RAG_API_KEY=your-api-gateway-key-hereConfiguration File
Update config.yaml with your AWS API Gateway URL:
aws_api_gateway_url: "https://your-api-id.execute-api.us-east-1.amazonaws.com/prod/rag"3. Claude Desktop Integration
Add the following to your Claude Desktop configuration file:
Location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration:
{
"mcpServers": {
"mql5-docs": {
"command": "uv",
"args": ["run", "python", "-m", "mql5_mcp_server"],
"cwd": "/path/to/mcp-mql5-rag",
"env": {
"MQL5_RAG_API_KEY": "your-api-gateway-key-here"
}
}
}
}Usage
Once configured, the search_mql5_docs tool will be available in Claude Desktop:
Search MQL5 documentation for ArrayResize functionClaude will automatically use the tool when MQL5-related questions are asked.
Development
Project Structure
mcp-mql5-rag/
āāā src/
ā āāā mql5_mcp_server.py # Main MCP server implementation
āāā config.yaml # Configuration file
āāā requirements.txt # Dependencies (for compatibility)
āāā pyproject.toml # Python project configuration
āāā README.md # This fileRunning Locally
# Run the server directly
uv run python -m mql5_mcp_server
# Or install and run
uv pip install -e .
mql5-mcp-serverTesting
# Install development dependencies
uv add --dev pytest pytest-asyncio pyright ruff black
# Run tests
uv run pytest
# Type checking
uv run pyright
# Code formatting
uv run black src/
uv run ruff check src/Error Handling
The server implements robust error handling:
Timeout Protection: 2-second timeout on AWS API calls
Circuit Breaker: Automatic fallback after 3 consecutive failures
Graceful Degradation: User-friendly error messages
Comprehensive Logging: Detailed logs for debugging
Common Error Messages
Message | Cause | Solution |
"Documentation search temporarily unavailable" | Circuit breaker open or AWS API down | Wait for cooldown period |
"Search timed out, please try again" | Network timeout | Retry the request |
"Documentation service encountered an authentication error" | Invalid API key | Check API key configuration |
Configuration Reference
config.yaml Options
# Required: AWS API Gateway URL
aws_api_gateway_url: "https://your-api-id.execute-api.us-east-1.amazonaws.com/prod/rag"
# Optional: Environment variable for API key (default: MQL5_RAG_API_KEY)
api_key_env_var: "MQL5_RAG_API_KEY"
# Optional: Request timeout in seconds (default: 2)
timeout_seconds: 2
# Optional: Maximum snippets to retrieve (default: 5)
max_snippets: 5
# Optional: Circuit breaker configuration
circuit_breaker_failures: 3 # Failures before opening (default: 3)
circuit_breaker_cooldown: 300 # Cooldown in seconds (default: 300)Troubleshooting
Check Server Status
# View server logs
tail -f mql5_mcp_server.log
# Test configuration
uv run python -c "from mql5_mcp_server import MQL5MCPServer; server = MQL5MCPServer(); print('ā
Configuration valid')"Common Issues
ImportError: No module named 'mcp'
Solution:
uv add "mcp[cli]"
API Key not found
Solution: Set the
MQL5_RAG_API_KEYenvironment variable
Connection timeout
Solution: Check AWS API Gateway URL and network connectivity
License
MIT License - see LICENSE file for details.
Contributing
Fork the repository
Create a feature branch
Make changes with tests
Run
uv run ruff check src/anduv run pytestSubmit a pull request
Related Projects:
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Connect Amazon Seller Central to Claude or ChatGPT via MCP. Orders, inventory, pricing, fees, FBA.
Connect your team's living knowledge base ā docs, data, issues, CRM ā to Claude and ChatGPT.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables programmers to search, download, and access up-to-date API and software documentation through MCP tools, integrating with LLMs like Claude for Desktop.19MIT

j-quants-doc-mcpofficial
AlicenseAqualityDmaintenanceEnables searching J-Quants API endpoints, retrieving detailed documentation, generating executable sample code, and answering FAQs via MCP clients like Claude Desktop.716MIT- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to search custom knowledge bases using retrieval-augmented generation via a simple MCP tool.MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language control of AWS resources (EC2, Security Groups, S3, Bedrock, etc.) directly from Claude Desktop or Claude Code.75 PyPIMIT