MCP cover image
See in Github
2025-04-14

模型上下文协议(MCP)使AI LLMS能够使用Metatrader平台进行交易

5

Github Watches

0

Github Forks

5

Github Stars

MetaTrader MCP Server

This is a Model Context Protocol (MCP) server built with Python to enable AI LLMs to trade using MetaTrader platform.

MetaTrader MCP Server

Disclaimer

Financial trading involves significant risk, and the developers of this package disclaim any liability for any losses or profits; this package is provided solely to facilitate MetaTrader 5 trade executions via AI LLMs using the Model Context Protocol (MCP). By using this package, you assume all risks and agree not to hold the developers liable or to initiate any legal action for any damages, losses, or profits.

Updates

  • April 23, 2025: Published to PyPi (0.2.0)
  • April 16, 2025: We have our first minor version release (0.1.0)

Installation Guide

Make sure you have Python version 3.10+ and MetaTrader 5 terminal installed in your workspace. Then install the package:

pip install metatrader-mcp-server

Then you need to enable algorithmic trading on MetaTrader 5 terminal. Open Tools > Options and check Allow algorithmic trading.

Claude Desktop Integration

To use this package to enable trading operations via Claude Desktop app, please add this into your Claude Desktop configuration:

{
  "mcpServers": {
    "metatrader": {
      "command": "metatrader-mcp-server",
      "args": [
        "--login",    "<YOUR_MT5_LOGIN>",
        "--password", "<YOUR_MT5_PASSWORD>",
        "--server",   "<YOUR_MT5_SERVER>"
      ]
    }
  }
}

Other LLMs using Open WebUI

You can use this MCP server with other LLMs such as OpenAI's GPT by using its HTTP server and Open WebUI.

To start, make sure you have installed the package. Then, run the server:

metatrader-http-server --login <YOUR_MT5_LOGIN> --password <YOUR_MT5_PASSWORD> --server <YOUR_MT5_SERVER> --host 0.0.0.0 --port 8000

It will launch HTTP server locally on port 8000 and automatically launch MetaTrader 5 terminal.

On Open WebUI settings page, navigate to Tools menu. Then click plus button on "Manage Tool Servers". Add http://localhost:8000 (or whatever you set your port is).

Open WebUI - Add Connection

If all is well, you can now access the tools via chat using available models, such as gpt-4o or o4-mini.

Open WebUI - Chat

Project Roadmap

For full version checklist, see version-checklist.md.

Task Status Done Tested
Connect to MetaTrader 5 terminal Finished
Develop MetaTrader client module Finished
Develop MCP Server module Finished
Implement MCP tools Finished
Publish to PyPi Finished
Claude Desktop integration Finished
OpenAPI server Finished -
Open WebUI integration - - -

Developer Documentation

For developers, see Developer's Documentation.

相关推荐

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • Matthieu Savioux
  • Evaluates language quality of texts, responds with a numerical score between 50-150.

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • Carl Oscar Aaro
  • Structured recipes for food and desserts – ingredient lists and step-by-step recipe instructions from any input. Become surprised, try something new or breathe life into grandma's old recipe notebook.

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • langgenius
  • alibaba
  • caio-moliveira
  • 创建该项目是为了证明我们如何与不同的模型上下文协议(MCP)连接。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • lasso-security
  • 基于插件的网关,可协调其他MCP,并允许开发人员在IT企业级代理上构建。

    Reviews

    5 (1)
    Avatar
    user_l37Vvjol
    2025-04-24

    As a dedicated user of the metatrader-mcp-server, I am incredibly impressed with its seamless integration and powerful features. Developed by the brilliant ariadng, this tool has significantly enhanced my trading efficiency. The intuitive interface and reliable performance make it stand out from other similar services. Highly recommended for anyone serious about trading!