@@ -128,6 +128,26 @@ Pick one based on how you want to use it:
128128}
129129```
130130
131+ ** Optional: Specify Custom MT5 Terminal Path**
132+
133+ If your MT5 terminal is installed in a non-standard location, add the ` --path ` argument:
134+
135+ ``` json
136+ {
137+ "mcpServers" : {
138+ "metatrader" : {
139+ "command" : " metatrader-mcp-server" ,
140+ "args" : [
141+ " --login" , " YOUR_MT5_LOGIN" ,
142+ " --password" , " YOUR_MT5_PASSWORD" ,
143+ " --server" , " YOUR_MT5_SERVER" ,
144+ " --path" , " C:\\ Program Files\\ MetaTrader 5\\ terminal64.exe"
145+ ]
146+ }
147+ }
148+ }
149+ ```
150+
1311513 . Replace ` YOUR_MT5_LOGIN ` , ` YOUR_MT5_PASSWORD ` , and ` YOUR_MT5_SERVER ` with your actual credentials
132152
1331534 . Restart Claude Desktop
@@ -142,6 +162,14 @@ Pick one based on how you want to use it:
142162metatrader-http-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER --host 0.0.0.0 --port 8000
143163```
144164
165+ ** Optional: Specify Custom MT5 Terminal Path**
166+
167+ If your MT5 terminal is installed in a non-standard location, add the ` --path ` argument:
168+
169+ ``` bash
170+ metatrader-http-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER --path " C:\Program Files\MetaTrader 5\terminal64.exe" --host 0.0.0.0 --port 8000
171+ ```
172+
1451732 . Open your browser to ` http://localhost:8000/docs ` to see the API documentation
146174
1471753 . In Open WebUI:
@@ -305,6 +333,9 @@ Instead of putting credentials in the command line, create a `.env` file:
305333LOGIN=12345678
306334PASSWORD=your_password
307335SERVER=MetaQuotes-Demo
336+
337+ # Optional: Specify custom MT5 terminal path (auto-detected if not provided)
338+ # PATH=C:\Program Files\MetaTrader 5\terminal64.exe
308339```
309340
310341Then start the server without arguments:
@@ -313,6 +344,8 @@ Then start the server without arguments:
313344metatrader-http-server
314345```
315346
347+ The server will automatically load credentials from the ` .env ` file.
348+
316349### Custom Port and Host
317350
318351``` bash
@@ -328,14 +361,29 @@ config = {
328361 " login" : 12345678 ,
329362 " password" : " your_password" ,
330363 " server" : " MetaQuotes-Demo" ,
331- " timeout" : 60000 , # Connection timeout (ms)
332- " max_retries" : 3 , # Retry attempts
333- " backoff_factor" : 1.5 , # Delay multiplier between retries
334- " cooldown_time" : 2.0 , # Seconds to wait between connections
335- " debug" : True # Enable debug logging
364+ " path" : None , # Path to MT5 terminal executable (default: auto-detect)
365+ " timeout" : 60000 , # Connection timeout in milliseconds (default: 60000)
366+ " portable" : False , # Use portable mode (default: False)
367+ " max_retries" : 3 , # Maximum connection retry attempts (default: 3)
368+ " backoff_factor" : 1.5 , # Delay multiplier between retries (default: 1.5)
369+ " cooldown_time" : 2.0 , # Seconds to wait between connections (default: 2.0)
370+ " debug" : True # Enable debug logging (default: False)
336371}
337372```
338373
374+ ** Configuration Options:**
375+
376+ - ** login** (int, required): Your MT5 account login number
377+ - ** password** (str, required): Your MT5 account password
378+ - ** server** (str, required): MT5 server name (e.g., "MetaQuotes-Demo")
379+ - ** path** (str, optional): Full path to the MT5 terminal executable. If not specified, the client will automatically search standard installation directories
380+ - ** timeout** (int, optional): Connection timeout in milliseconds. Default: 60000 (60 seconds)
381+ - ** portable** (bool, optional): Enable portable mode for the MT5 terminal. Default: False
382+ - ** max_retries** (int, optional): Maximum number of connection retry attempts. Default: 3
383+ - ** backoff_factor** (float, optional): Exponential backoff factor for retry delays. Default: 1.5
384+ - ** cooldown_time** (float, optional): Minimum time in seconds between connection attempts. Default: 2.0
385+ - ** debug** (bool, optional): Enable detailed debug logging for troubleshooting. Default: False
386+
339387---
340388
341389## 🗺️ Roadmap
@@ -468,7 +516,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
468516
469517## 📊 Project Stats
470518
471- - ** Version** : 0.2.8
519+ - ** Version** : 0.2.9
472520- ** Python** : 3.10+
473521- ** License** : MIT
474522- ** Status** : Active Development
0 commit comments