5366b45c36
- Changed /target/release/mt5-quant to /mt5-quant for prebuilt binary path - Added path notes explaining prebuilt vs dev build locations - Fixed both Full Example and Environment Variables sections
3.4 KiB
3.4 KiB
Claude Desktop MCP Integration Setup
Quick Setup
Option 1: Install via MCP Registry (Recommended)
Search for mt5-quant in Claude Desktop's MCP manager, or add directly to your config.
Option 2: Download Prebuilt Binary
# macOS (Apple Silicon)
curl -L -o mt5-quant.tar.gz https://github.com/masdevid/mt5-quant/releases/latest/download/mt5-quant-macos-arm64.tar.gz
tar -xzf mt5-quant.tar.gz
# Linux (x64)
curl -L -o mt5-quant.tar.gz https://github.com/masdevid/mt5-quant/releases/latest/download/mt5-quant-linux-x64.tar.gz
tar -xzf mt5-quant.tar.gz
Option 3: Build from Source
git clone https://github.com/masdevid/mt5-quant
cd mt5-quant
cargo build --release
Configure Claude Desktop
Step 1: Open MCP Configuration
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
Step 2: Add mt5-quant
{
"mcpServers": {
"mt5-quant": {
"command": "/absolute/path/to/mt5-quant"
}
}
}
Step 3: Reload and Verify
- Save the file
- Restart Claude Desktop
- In a new conversation, type:
What tools do you have access to? - The agent should list MT5 tools like
verify_setup,run_backtest, etc.
Full Example Configuration
{
"mcpServers": {
"mt5-quant": {
"command": "/Users/name/mt5-quant/mt5-quant"
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${env:GITHUB_TOKEN}"
}
}
}
}
Path notes:
- Prebuilt binary:
/Users/name/mt5-quant/mt5-quant(extracted from release tarball) - Dev build:
/Users/name/mt5-quant/target/release/mt5-quant(aftercargo build --release)
Environment Variables
Claude Desktop supports ${env:VAR_NAME} syntax for environment variable substitution:
{
"mcpServers": {
"mt5-quant": {
"command": "/Users/name/mt5-quant/mt5-quant",
"env": {
"MT5_MCP_HOME": "${env:HOME}/.config/mt5-quant"
}
}
}
}
Verify Setup
In a Claude Desktop conversation, type:
Run verify_setup
Expected output:
Wine: /Applications/MetaTrader 5.app/.../wine64
MT5 dir: ~/Library/Application Support/.../MetaTrader 5
Display: gui
Arch: arch -x86_64
Troubleshooting
"Tool not found" or server not appearing
- Double-check the absolute path in
claude_desktop_config.json - Ensure the binary has execute permissions:
chmod +x /path/to/mt5-quant - Restart Claude Desktop completely
- Check Claude Desktop logs:
~/Library/Logs/Claude/(macOS)
JSON syntax errors
- Validate the JSON at jsonlint.com
- Ensure no trailing commas
- Use absolute paths (not
~or relative paths)
Agent hallucinating tool parameters
- Verify the tool is available: "List your available MCP tools"
- Start a new conversation
- Be explicit: "Use the
run_backtesttool with expert=MyEA"
Configuration Location
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |