Skip to main content

MCP Server Framework for MetaTrader 5. Build HTTP and stdio servers with automatic tool registration and MT5 socket communication

Project description

MCP Servers for MT5


Overview

mcp-mt5-conection is a Python library that bridges MetaTrader 5 (MT5) with the Model Context Protocol (MCP). It provides a simple and extensible framework to create tools that communicate between Python and MT5 via socket connections. Define your tools once in Python, and expose them through either FastMCP (for Claude and MCP clients) or HTTP (for custom integrations).


Main Features

Library Capabilities

  • Simple Tool Registration: Use Python decorators to define MCP tools with minimal boilerplate
  • Dual Protocol Support: Expose tools via FastMCP (for Claude) or HTTP API simultaneously
  • Socket-Based Communication: Reliable TCP socket connection between Python and MT5 with JSON serialization
  • Extensible Architecture: Abstract base classes allow custom implementations (MCP, HTTP, or custom protocols)
  • MT5 Function Access: Call any MT5 function from Python through registered tools (trading, data, charts, etc.)

Repository Structure

McpServer/
├── Src/                    # MQL5 Backend Functions
├── mcp_mt5_conection/      # Python MCP Server Package
└── Configuration & metadata files

Requirements


Installation of repo code

cd "C:\Users\YOUR USER\AppData\Roaming\MetaQuotes\Terminal\YOUR ID\MQL5\Shared Projects"
tsndep install "https://forge.mql5.io/nique_372/McpServer.git"
  • For use tsndep command requerid tsndep pacakage (avaible in pypi).. This command automatically downloads all dependencies and installs all requirements from the repositories.
  • If any part of the system is private, then it will fail... contact me so I can give you access (if it's a product, you can buy it; if you have any questions, don't hesitate to contact me).

Quick start


License

Read Full License

By downloading or using this repository, you accept the license terms.


Documentation


Contact


Copyright © 2026 Niquel Mendoza (nique_372).
TSN Trading Systems ecosystem.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_mt5_conection-1.0.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_mt5_conection-1.0.3-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file mcp_mt5_conection-1.0.3.tar.gz.

File metadata

  • Download URL: mcp_mt5_conection-1.0.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for mcp_mt5_conection-1.0.3.tar.gz
Algorithm Hash digest
SHA256 946670e86772194a436b02cdb457cc0a7af3d9e5662660bc0d5021d6f6305ae7
MD5 50a3531e1effe5330f97bbf40284e611
BLAKE2b-256 f5a809120b7250cfe969b738113b911f2f66d5795db17953f47be70ccc6853db

See more details on using hashes here.

File details

Details for the file mcp_mt5_conection-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_mt5_conection-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e27d96a7987b5f77e38a9165f04f2cea1dc53d5e204d74238387c30a8ace4a5
MD5 f2dc5dc1a6297616a38c0a0a64efc02f
BLAKE2b-256 3561b9e09c96028e3cd0887279bb945487cb8ce44b7851c9d1fc983399efb92a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page