We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ariadng/metatrader-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
_find_terminal_path.py•744 B
def _find_terminal_path(connection):
"""
Find the MetaTrader 5 terminal path.
Returns:
str: Path to the MetaTrader 5 terminal.
Raises:
InitializationError: If the terminal path cannot be found.
"""
import os
if connection.path and os.path.isfile(connection.path):
return connection.path
# Try standard paths
for path in connection.standard_paths:
if '*' in path:
import glob
paths = glob.glob(path)
if paths:
return paths[0]
elif os.path.isfile(path):
return path
from metatrader_client.exceptions import InitializationError
raise InitializationError("Could not find MetaTrader 5 terminal path")