A Model Context Protocol (MCP) server for interacting with the MetaTrader 5 trading platform. This server provides AI assistants with tools and resources to access market data, perform trading operations, and analyze trading history.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcp-metatrader5-server": {
"args": [
"--from",
"git+https://github.com/Qoyyuum/mcp-metatrader5-server",
"mt5mcp"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol (MCP) server for MetaTrader 5, allowing AI assistants to interact with the MetaTrader 5 platform for trading and market data analysis. Documentation
This server supports HTTP transport. Be the first to test it — help the community know if it works.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in finance
Real-time financial market data: stocks, forex, crypto, commodities, and economic indicators
A Model Context Protocol (MCP) server that provides AI assistants with direct access to the Spreedly payments API. Enables LLMs to manage gateways, process transactions, tokenize payment methods, and more, through structured, validated tool calls.
MCP server for InsightSentry financial data API - market data, options, screeners, and more
Model Context Protocol for Actual Budget API
MCP Security Weekly
Get CVE alerts and security updates for Mcp Metatrader5 Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol (MCP) server for MetaTrader 5, allowing AI assistants to interact with the MetaTrader 5 platform for trading and market data analysis. Documentation
uvx --from mcp-metatrader5-server mt5mcp
git clone https://github.com/Qoyyuum/mcp-metatrader5-server.git
cd mcp-metatrader5-server
uv sync
uv run mt5mcp
The server runs in stdio mode by default for MCP clients like Claude Desktop:
uv run mt5mcp
For testing with HTTP transport, create a .env file:
MT5_MCP_TRANSPORT=http
MT5_MCP_HOST=127.0.0.1
MT5_MCP_PORT=8000
Then run:
uv run mt5mcp
The server will start at http://127.0.0.1:8000
uvx (Simplest - No Installation Required) ⭐Add this configuration to your MCP client's config file:
For Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"mcp-metatrader5-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Qoyyuum/mcp-metatrader5-server",
"mt5mcp"
]
}
}
}
git clone https://github.com/Qoyyuum/mcp-metatrader5-server
cd mcp-metatrader5-server
After git cloning the repo, run the following commands:
For MCP JSON format
uv run fastmcp install mcp-json src/mcp_mt5/main.py
For Claude Desktop
uv run fastmcp install claude-desktop src/mcp_mt5/main.py
For Claude Code
uv run fastmcp install claude-code src/mcp_mt5/main.py
For Cursor
uv run fastmcp install cursor src/mcp_mt5/main.py
For Gemini CLI
uv run fastmcp install gemini-cli src/mcp_mt5/main.py
Add this to your claude_desktop_config.json or whatever LLM config file:
{
"mcpServers": {
"mcp-metatrader5-server": {
"command": "uvx",
"args": [
"--from",
"mcp-metatrader5-server",
"mt5mcp"
]
}
}
}
initialize(): Initialize the MT5 terminallogin(account, password, server): Log in to a trading accountshutdown(): Close the connection to the MT5 terminalget_symbols(): Get all available symbolsget_symbols_by_group(group): Get symbols by groupget_symbol_info(symbol): Get information about a specific symbolget_symbol_info_tick(symbol): Get the latest tick for a symbolcopy_rates_from_pos(symbol, timeframe, start_pos, count): Get bars from a specific positioncopy_rates_from_date(symbol, timeframe, date_from, count): Get bars from a specific datecopy_rates_range(symbol, timeframe, date_from, date_to): Get bars within a date rangecopy_ticks_from_pos(symbol, start_pos, count): Get ticks from a specific pos