Discussing the article: "How to Connect AI Agents to MQL5 Algo Forge via MCP"

 

Check out the new article: How to Connect AI Agents to MQL5 Algo Forge via MCP.

This article extends Part 1 by giving an AI access to the development lifecycle on MQL5 Algo Forge. We implement an MCP server over the Forgejo REST API so an agent can create repositories, commit Expert Advisors, branch from main, open pull requests, file issues, and tag releases. You will get a ready-to-run Python server, clear tools, and a safer, reversible workflow.

In the previous article, we connected an AI agent to MetaTrader 5. We built a Model Context Protocol (MCP) server that gave an AI assistant like Claude Desktop direct access to the trading terminal: pull live quotes, read candles, place orders, and manage positions through natural conversation. That server connected the AI to the place where trades run.

But running trades is only half of an algorithmic trader's life. The other half is building, versioning, and sharing the code that produces those trades. That work used to live on local disks and the old MQL5 Storage. It now lives on MQL5 Algo Forge, the community's Git-based platform for hosting and collaborating on trading projects. If Part 1 connected the AI to where trades run, this article connects it to where the code lives.


The good news is that Algo Forge is built on Git and exposes a standard REST API over HTTPS, which means an AI agent can drive the full developer workflow programmatically: create a repository, commit an Expert Advisor, open a branch, raise a pull request, file an issue, and tag a release. We will build a second MCP server that wraps that API and hands those capabilities to any MCP-compatible client. By the end, you will be able to tell your assistant "create a repository for my new EA and commit this code into it," and watch it happen on Algo Forge. In fact, the very server we build in this article was itself published to Algo Forge by an AI agent using that server, and we will show exactly that.

Author: Muhammad Minhas Qamar