Skip to content

MCP server doesn't expose get_symbol_info — blocks lot sizing & margin calculations from MCP clients (also: get_candles_by_date missing @mcp.tool() decorator) #25

Description

@minada422

Summary

The MCP server (metatrader_mcp/server.py) does not register get_symbol_info as a @mcp.tool(), even though the underlying client method (metatrader_client/market/get_symbol_info.py) and the REST endpoint (/symbol/info/{symbol_name} in metatrader_openapi/routers/market.py) already implement and expose the full symbol specification.

Effect on MCP clients: there is no MCP-accessible way to retrieve volume_min, volume_max, volume_step, trade_tick_value, trade_tick_size, trade_contract_size, margin_initial, or sessions_trades. This blocks any pre-trade lot sizing, margin estimation, and risk-per-trade calculation — fundamental requirements for safe automated trading.

Bonus finding: get_candles_by_date (defined in metatrader_mcp/server.py around lines 69–73) also lacks the @mcp.tool() decorator, so historical/backtest queries by explicit date range are equally unreachable from MCP clients. Recommend either fixing both in the same PR or splitting into a separate issue (this one can be the umbrella).

Reproduction

From a Claude Code or Claude Desktop session with metatrader-mcp-server 0.5.1 connected:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions