Metadata-Version: 2.4
Name: mcp-mt5-conection
Version: 1.0.4
Summary: MCP Server Framework for MetaTrader 5. Build HTTP and stdio servers with automatic tool registration and MT5 socket communication
Project-URL: Repository, https://forge.mql5.io/nique_372/McpServer
Project-URL: Documentation, https://forge.mql5.io/nique_372/McpServer
Project-URL: Issues, https://forge.mql5.io/nique_372/McpServer/issues
Author-email: Nique Mendoza <tradesystemsnique@gmail.com>, Leo <leo@example.com>
License: Copyright (c) 2026 Niquel and Leo.  
        
        This repository is governed by the Niquel & Leo NL-ND-P (No LLM, No Distribution, Private).  
        Full terms and conditions are available at:  
        https://forge.mql5.io/nique_372/TSNReposIndex/src/branch/main/Licenses/LICENSE-NL-ND-P.md
        
        By accessing, cloning, forking, or otherwise using this repository (including all repo code and all repo sections, issues, wiki, pull requesets, releases, packages, etc.), you agree to be bound by the terms of this license.
        If you do not agree to this repository's license, do not use any code from it for any purpose.
License-File: LICENSE
Keywords: mcp,metatrader5,mt5,server,trading
Requires-Python: >=3.10
Requires-Dist: fastapi>=0.136.1
Requires-Dist: mcp>=1.27.0
Requires-Dist: uvicorn>=0.46.0
Description-Content-Type: text/markdown

<!-- mcp-name: io.github.TradeSystemsNique/fullmt5mcp-by-leo -->
<p align="center">
  <img src="https://img.shields.io/badge/Language-Python-3776ab?style=flat-square"/>
  <img src="https://img.shields.io/badge/MQL5-Backend-13C7DE?style=flat-square"/>
  <img src="https://img.shields.io/badge/Protocol-MCP-1B6CA8?style=flat-square"/>
  <img src="https://img.shields.io/badge/Platform-MetaTrader%205-0D1B2A?style=flat-square"/>
  <img src="https://img.shields.io/badge/Author-Niquel%20Mendoza-C9D6DF?style=flat-square"/>
  <a href="./LICENSE">
    <img src="https://img.shields.io/badge/License-Nique%26Leo%20NL--ND--P-red.svg"/>
  </a>
</p>

<p align="center">
  <strong>MCP Servers for MT5</strong>
</p>

---

## 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](./dependencies.json)
- McpServer requerid a EX5 Library, pucharse in: [TheBotPlace - McpServerByLeo](https://www.thebotplace.com/bot/mcpserverbyleo)

---

## Installation of repo code 

```bash
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](https://pypi.org/project/tsndep)).. 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](https://forge.mql5.io/nique_372/McpServer/wiki)

---

## License

**[Read Full License](./LICENSE)**

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

---

## Documentation
- Avaialbe in Wiki: [https://forge.mql5.io/nique_372/McpServer/wiki](https://forge.mql5.io/nique_372/McpServer/wiki)

---

## Contact
- **Platform:** [MQL5 Community](https://www.mql5.com/es/users/nique_372)
- **Profile:** https://www.mql5.com/es/users/nique_372/news

---

<p align="center">Copyright © 2026 Niquel Mendoza (nique_372).<br/>
TSN Trading Systems ecosystem.</p>