1. Conduid
  2. Developer Tools
  3. Metatrader5 Server
MCP server · Developer Tools

Metatrader5 Server

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.

73Good

Scored 9 hours ago · breakdown

About Metatrader5 Server

Metatrader5 Server is an MCP server published by Qoyyuum in the Developer Tools category: 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. Conduid read 26 tools from its source: copy_rates_from_date, copy_rates_from_pos, copy_rates_range, copy_ticks_from_date, copy_ticks_from_pos, copy_ticks_range and 20 more. It is published to PyPI as mcp-metatrader5-server and runs with uvx.

The repository has 250 stars and 81 forks, and its last commit was on 30 Nov 2026. The latest release is v0.1.8 (19 Jun 2026): Bumped version update and support #74 #75 #76 Added support for Buy Limit and Sell Limit #72 #64 Improved order send and order check validation #63 Shoutout to @syahnur1… It follows v0.1.7 (23 Oct 2025), and the 4 most recent releases go back to v0.1.5 (2 Oct 2025). It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass License declared and Scoped permissions. Its topics include metatrader-5 and devtools.

Install

Claude Code
claude mcp add metatrader5-server -- uvx --from mcp-metatrader5-server mt5mcp
Run
uvx --from mcp-metatrader5-server mt5mcp
uvx
uvx mcp-metatrader5-server
pip
pip install mcp-metatrader5-server
From source
git clone https://github.com/Qoyyuum/mcp-metatrader5-server

Tools (26)

copy_rates_from_dateGet bars from a specified symbol and timeframe starting from the specified date.
ParameterTypeDescription
count *integerNumber of bars to retrieve
date_from *anyStart date for bar retrieval
symbol *stringSymbol name
timeframe *integerTimeframe (use TIMEFRAME_* constants)
copy_rates_from_posGet bars from a specified symbol and timeframe starting from the specified position.
ParameterTypeDescription
count *integerNumber of bars to retrieve as an INTEGER (e.g., 100 for last 100 bars)
start_pos *integerStarting position as an INTEGER (0 = most recent bar, 1 = second most recent, etc.)
symbol *stringSymbol name (e.g., "EURUSD", "GBPUSD")
timeframe *integerTimeframe in minutes as an INTEGER: - 1: TIMEFRAME_M1 (1 minute) - 5: TIMEFRAME_M5 (5 minutes) - 15: TIMEFRAME_M15 (15 minutes) - 30: TIMEFRAME_M30 (30 minutes) - 60: TIMEFRAME_H1 (1 hour) - 240: TIMEFRAME_H4 (4 hours) - 1440: TIMEFRAME_D1 (1 day) - 10080: TIMEFRAME_W1 (1 week) - 43200: TIMEFRAME_MN1 (1 month)
copy_rates_rangeGet bars from a specified symbol and timeframe within the specified date range.
ParameterTypeDescription
date_from *anyStart date for bar retrieval
date_to *anyEnd date for bar retrieval
symbol *stringSymbol name
timeframe *integerTimeframe (use TIMEFRAME_* constants)
copy_ticks_from_dateGet ticks from a specified symbol starting from the specified date.
ParameterTypeDescription
count *integerNumber of ticks to retrieve
date_from *anyStart date for tick retrieval
flagsintegerType of requested ticks
symbol *stringSymbol name
copy_ticks_from_posGet ticks from a specified symbol starting from the specified position.
ParameterTypeDescription
count *integerNumber of ticks to retrieve
flagsintegerType of requested ticks: - mt5.COPY_TICKS_ALL: All ticks (default) - mt5.COPY_TICKS_INFO: Ticks containing bid and/or ask price changes - mt5.COPY_TICKS_TRADE: Ticks containing last price and volume changes
start_time *anyInitial time for tick retrieval
symbol *stringSymbol name
copy_ticks_rangeGet ticks from a specified symbol within the specified date range.
ParameterTypeDescription
date_from *anyStart date for tick retrieval
date_to *anyEnd date for tick retrieval
flagsintegerType of requested ticks
symbol *stringSymbol name
get_account_infoGet information about the current trading account.
get_last_errorGet the last error code and description.
get_symbol_infoGet information about a specific symbol.
ParameterTypeDescription
symbol *stringSymbol name
get_symbol_info_tickGet the latest tick data for a symbol.
ParameterTypeDescription
symbol *stringSymbol name (e.g., "EURUSD", "XAUUSD", "GBPUSD")
get_symbolsGet all available symbols (financial instruments) from the MetaTrader 5 terminal.
get_symbols_by_groupGet symbols that match a specific group or pattern.
ParameterTypeDescription
group *stringFilter for arranging a group of symbols (e.g., "*", "EUR*", etc.)
get_terminal_infoGet information about the MetaTrader 5 terminal.
get_versionGet the MetaTrader 5 version.
history_deals_getGet deals from history.
ParameterTypeDescription
from_dateanyStart date for deal retrieval. Defaults to the epoch.
groupstringFilter for arranging a group of deals (e.g., "*", "USD*")
positionintegerPosition ticket. Looked up on its own; other filters are ignored.
symbolstringSymbol name, used as a filter (e.g. "EURUSD"). Ignored when group is given.
ticketintegerOrder ticket - returns the deals generated by that order (DEAL_ORDER), not a deal ticket. Looked up on its own; other filters are ignored.
to_dateanyEnd date for deal retrieval. Defaults to tomorrow.
history_orders_getGet orders from history.
ParameterTypeDescription
from_dateanyStart date for order retrieval. Defaults to the epoch.
groupstringFilter for arranging a group of orders (e.g., "*", "USD*")
positionintegerPosition ticket. Looked up on its own; other filters are ignored.
symbolstringSymbol name, used as a filter (e.g. "EURUSD"). Ignored when group is given.
ticketintegerOrder ticket. Looked up on its own; other filters are ignored.
to_dateanyEnd date for order retrieval. Defaults to tomorrow.
initializeInitialize the MetaTrader 5 terminal.
ParameterTypeDescription
pathstringFull path to the MT5 terminal executable (optional). If omitted, the MT5_PATH environment variable of the server is used. If that is not set either, MetaTrader5 connects to the terminal it finds on its own. Common paths: - "C:\\Program Files\\MetaTrader 5\\terminal64.exe" - "C:\\Program Files (x86)\\MetaTrader 5\\terminal64.exe"
loginLog in to the MetaTrader 5 trading account.
ParameterTypeDescription
loginintegerTrading account number (integer, e.g., 12345678). Optional.
passwordstringTrading account password (string). Optional.
serverstringTrading server name (e.g., "Demo-Server", "YourBroker-Live"). Optional.
order_checkCheck if an order can be placed with the specified parameters.
ParameterTypeDescription
request *anyOrderRequest object (same format as order_send) See order_send() documentation for field details and examples.
order_sendSend an order to the trade server.
ParameterTypeDescription
request *anyOrderRequest object with these fields:
orders_getGet active orders.
ParameterTypeDescription
groupstringFilter for arranging a group of orders (e.g., "*", "USD*", etc.)
symbolstringSymbol name. If specified, only orders for this symbol will be returned.
orders_get_by_ticketGet an active order by its ticket.
ParameterTypeDescription
ticket *integerOrder ticket
positions_getGet open positions.
ParameterTypeDescription
groupstringFilter for arranging a group of positions (e.g., "*", "USD*", etc.)
symbolstringSymbol name. If specified, only positions for this symbol will be returned.
positions_get_by_ticketGet an open position by its ticket.
ParameterTypeDescription
ticket *integerPosition ticket
shutdownShut down the connection to the MetaTrader 5 terminal.
symbol_selectSelect a symbol in the Market Watch window or remove a symbol from it.
ParameterTypeDescription
symbol *stringSymbol name (e.g., "EURUSD", "XAUUSD", "GBPUSD")
visiblebooleanSymbol visibility flag - True: Add/show the symbol in Market Watch (default, recommended) - False: Hide the symbol from Market Watch

Security checks

Static checks derived from the repository 10 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository's README runs to about 1.0K words.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedDependency versions are pinned by uv.lock.
  • ✓No dynamic code executionScanned 2 source files and found no eval, dynamic Function or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

What the source scan found

Transport
stdio and Streamable HTTPsrc/mcp_mt5/__init__.py:27, src/mcp_mt5/__init__.py:24
Starts other programs
No calls that start other programs
Outbound network calls
No outbound network calls
Writes or deletes files
No file writes or deletes
Lockfile
uv.lock

Pattern matches on the source text of 2 files: places to read, not proof of what the code does at run time.

Releases

v0.1.8v0.1.8 · 19 Jun 2026Bumped version update and support #74 #75 #76 Added support for Buy Limit and Sell Limit #72 #64 Improved order send and order check validation #63 Shoutout to @syahnur197 for contributing
v0.1.7v0.1.7 · 23 Oct 2025What's Changed Improve MT5 tool robustness, input validation, and error messages by @Qoyyuum in https://github.com/Qoyyuum/mcp-metatrader5-server/pull/32 :rocket: 0.1.7 - improved MT5 Tool Error Handling and Input Validation by @Qoyyuum in…
v0.1.6Release v0.1.6 - JSON Serialization Fixes & Pydantic AI example doc · 22 Oct 2025Release Notes - v0.1.6 Release Date: October 22, 2025 🎉 What's New This release brings significant improvements to JSON serialization, comprehensive Pydantic AI integration documentation, and enhanced testing infrastructure. 🔧 Bug Fixes…
v0.1.5v0.1.5 - MT5 FastMCP · 2 Oct 2025🎉 v0.1.5 - Complete MT5 Timeframe Support ✨ New Features All 21 MT5 Timeframes: Added support for M2, M3, M4, M6, M10, M12, M20, H2, H3, H6, H8, H12 Timeframe Validation: New `get_timeframe_constant()` function with clear error messages…

README

The repository's README runs to about 1.0K words, fetched 10 hours ago. The original in the repository is authoritative.

Read full README
Questions

About Metatrader5 Server

How do I install Metatrader5 Server?

In Claude Code, run claude mcp add metatrader5-server -- uvx --from mcp-metatrader5-server mt5mcp. Other MCP clients take the command after "--" in their server configuration.

Is Metatrader5 Server safe to use with an AI agent?

Its trust score is 73 out of 100 (good). It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass License declared and Scoped permissions. Conduid's scan of 2 source files found that it serves MCP over stdio and Streamable HTTP. Its dependencies are pinned by uv.lock. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Metatrader5 Server still maintained?

Yes — the latest release is v0.1.8 (19 Jun 2026), and the last commit was 2 days ago. The repository has 250 stars and 2 open issues.

What tools does Metatrader5 Server provide?

Conduid read 26 tools from the source: copy_rates_from_date, copy_rates_from_pos, copy_rates_range, copy_ticks_from_date, copy_ticks_from_pos, copy_ticks_range, get_account_info, get_last_error and 18 more. 20 of them publish their parameters, listed under Tools above.