Metatrader5 Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Metatrader5 Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that provides comprehensive access to MetaTrader 5 trading platform functionality through Python.
📖 New to this project? Check out the Quick Start Guide for a condensed reference!
#### Method 1: Automated Installation (Recommended)
Windows:
# Clone the repository
git clone https://github.com/amirkhonov/metatrader5-mcp.git
cd metatrader5-mcp
# Run installation script
install.batLinux/Mac:
# Clone the repository
git clone https://github.com/amirkhonov/metatrader5-mcp.git
cd metatrader5-mcp
# Run installation script
chmod +x install.sh
./install.sh#### Method 2: Using pip
# Install from source
git clone https://github.com/amirkhonov/metatrader5-mcp.git
cd metatrader5-mcp
pip install -r requirements.txt
pip install -e .#### Method 3: Using Poetry
git clone https://github.com/amirkhonov/metatrader5-mcp.git
cd metatrader5-mcp
poetry install cp .env.example .env MT5_LOGIN=12345678
MT5_PASSWORD=your_password
MT5_SERVER=MetaQuotes-Demo
MT5_PATH=C:\Program Files\MetaTrader 5\terminal64.exe # Using environment variables from .env
metatrader5-mcp
# Or with command line arguments
metatrader5-mcp --login 12345 --password secret --server MetaQuotes-Demo# Check if the server starts correctly
metatrader5-mcp --helpThis MCP server exposes 32 tools for interacting with MT5, organized into the following categories:
Choose the method that works best for you:
Windows:
install.batLinux/Mac:
./install.shThe script will:
.env configuration file# Install dependencies
pip install -r requirements.txt
# Install the package
pip install -e .
# Copy environment template
cp .env.example .env
# Edit .env with your credentialspoetry install
cp .env.example .env
# Edit .env with your credentialspipx install .# Build and run
docker-compose up -d
# View logs
docker-compose logs -fNote: Docker support is experimental as MT5 requires Windows. Best for development/testing.
Add this configuration to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
#### With Auto-Initialization (Recommended)
{
"mcpServers": {
"metatrader": {
"command": "metatrader5-mcp",
"args": [
"--login", "YOUR_MT5_LOGIN",
"--password", "YOUR_MT5_PASSWORD",
"--server", "YOUR_MT5_SERVER",
"--path", "C:\\Program Files\\MetaTrader 5\\terminal64.exe"
]
}
}
}The server supports the following optional arguments:
--login LOGIN - Trading account number--password PASSWORD - Trading account password--server SERVER - Trading server name (e.g., "MetaQuotes-Demo")--path PATH - Path to MT5 terminal executable# With auto-initialization
metatrader5-mcp --login 12345 --password secret --server MetaQuotes-Demo
# Without initialization (manual connection via tools)
metatrader5-mcpHaving issues? Check our comprehensive Troubleshooting Guide for:
Or run the validation script:
python validate.py⚠️ Important Security Notes:
📖 For comprehensive security guidance, see [SECURITY.md](SECURITY.md)
mt5_symbol_select to add symbolspython -m metatrader5_mcpThe server uses stdio transport and communicates via JSON-RPC over stdin/stdout.
You can test individual MT5 functions in Python:
import MetaTrader5 as mt5
# Initialize
if not mt5.initialize():
print("Failed:", mt5.last_error())
quit()
# Get account info
account = mt5.account_info()
print(account._asdict())
# Cleanup
mt5.shutdown()MIT License - feel free to use and modify as needed. See LICENSE for details.
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
See CHANGELOG.md for version history and updates.
⚠️ Disclaimer:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.