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
- Py requeriements and MQL5 Dependencies: dependencies.json
- McpServer requerid a EX5 Library, pucharse in: TheBotPlace - McpServerByLeo
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
- Check wiki to create a complete MT5 EA and PyServer: https://forge.mql5.io/nique_372/McpServer/wiki
License
By downloading or using this repository, you accept the license terms.
Documentation
- Avaialbe in Wiki: https://forge.mql5.io/nique_372/McpServer/wiki
Contact
- Platform: MQL5 Community
- Profile: https://www.mql5.com/es/users/nique_372/news
Copyright © 2026 Niquel Mendoza (nique_372).
TSN Trading Systems ecosystem.
Metadata
Release files for mcp-mt5-conection 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_mt5_conection-1.0.4.tar.gz | 8.2 kB | Without provenance | Details for mcp_mt5_conection-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_mt5_conection-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for mcp_mt5_conection-1.0.4-py3-none-any.whl |
Total release size: 17.3 kB
Release files / mcp_mt5_conection-1.0.4.tar.gz
| Download URL | mcp_mt5_conection-1.0.4.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
525a609baf10823de98c7ce99ecbd43e0593eb1fca929e5765dc5e17cb3d8d42
|
|
BLAKE2b-256 checksum How to use checksums |
4dffd3bf0cc68670a942dd0238772f47bee448a44f19a00b09a11ee334e1d2b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Release files / mcp_mt5_conection-1.0.4-py3-none-any.whl
| Download URL | mcp_mt5_conection-1.0.4-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a977542aaf09bef7d30683d9d59e54cbbf624c7696ac064dd58693c9d89cf75e
|
|
BLAKE2b-256 checksum How to use checksums |
a2b7e364c528154fb4474a54ffed8b43f9ae9db391a70cef49d319590c2c80a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Security for mcp-mt5-conection 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.