Learn
Giving Claude or ChatGPT Access to Your Trading Account: What Can Go Wrong
At a glance
AI trading account access means an agent such as Claude Code can read your MetaTrader 5 account, change charts and files, and, if the permission is on, send orders. In our October 2026 test of MT5’s built-in MCP server the terminal listed six order tools, and the trading permission was reported separately from the Algo Trading button. What can go wrong falls into five groups: an order you did not intend, a program started through a side door, data leaving your computer, a key left lying around, and the wrong account. Five measures limit this: demo account first, trading prohibited, tools allowed one by one, an investor-password login where only reading is needed (not yet tested by us with the MCP server), and a short written test of the lock before you rely on it.
On this page
An AI agent with access to a trading account can do whatever the account permissions, the platform switches and the tools you allow add up to. A polite instruction in a chat is not one of those controls. Brokers and platforms now offer this connection, and the useful question is no longer whether it works, but which part of it you have actually locked.
This guide is about the account side of the connection. It uses what we saw when we connected Claude Code to MetaTrader 5’s built-in MCP server on a demo account in October 2026, and it says plainly where we have not tested something. The setup itself, the tool list and the logged run are in our MT5 MCP server guide; the assistant inside the platform is in the MT5 AI Assistant guide. We did not test ChatGPT or any other client. Where we write “agent”, the tested one is Claude Code.
Disclosure: RoboXpert develops trading software, but this guide sells none. AI assisted with research and drafting. See our editorial disclosure. This is not investment advice.
AI trading account access: what can go wrong
Five things can go wrong. The first four need no malicious intent from anyone; they follow from what the tools can do.
Scroll horizontally if needed
| # | What goes wrong | How it happens | What limits it |
|---|---|---|---|
| 1 | An order you did not intend | The agent misreads a request, or acts on text it read elsewhere, and calls an order tool | Trading permission, tools allowed one by one, demo account |
| 2 | A program starts through a side door | A tool that attaches an EA or runs a script to a chart; an attached EA then trades by its own code | Leave chart and script tools off; check the Algo Trading state |
| 3 | Data leaves your computer | A web-request tool, or account details you paste into a prompt | Web access off; the model provider’s data rules |
| 4 | A key stays behind | The configuration file holds a token to your terminal | Keep it out of shared folders and Git; remove it afterwards |
| 5 | The wrong account | The terminal is logged in to something other than you think | Read the account first, every session |
What an agent can do with the MT5 MCP server
MetaQuotes added the server with build 6060 on 23 July 2026. In our session on 12 October 2026 (build 6230, demo account) the terminal server listed 67 tools. Six of them send, change or close orders on the logged-in account. Others read the account, change charts, read and write files in the MQL5 and Common folders, run the Strategy Tester, or send a web request.
Three observations from that session matter for safety:
- The trading permission and the Algo Trading button are two different things.
get_trading_account_inforeturnedexperts_trade_allowed: false(the button was off) andmcp_trade_allowed: trueat the same time, and the order tools were listed. Switching Algo Trading off therefore did not tell us that the agent could not trade. We did not send an order, so we cannot say what happens when one flag allows and the other does not. - The caution in the tool description is an instruction to the model, not a lock. The description of
trade_send_market_ordersays to use it only after an explicit user instruction naming symbol, side and volume. The control you can rely on is the setting under Tools → Options → AI Assistant, which MetaQuotes documents with three positions for trading: allowed, confirmation required, prohibited. The same page lists separate settings for web access and for shell operations. - File access stayed inside the platform’s folders. Requests for a file in the terminal’s
configfolder and for a Windows system file were refused with “access to the specified file is prohibited”.
One more observation comes from our own later working notes and is not part of the logged lab: running a compiled script on a chart through the agent’s chart tools switched Algo Trading on in a terminal that was logged in to a real account. We have no build number or log for it in the lab files, so treat it as a lead to check yourself, not as a documented behaviour. The reason to check is the same either way: a tool that changes charts can change the state that your order protection depends on.
Five measures that limit an AI agent
These are our working rules. Measure 4 is the one we have not proven.
- Demo account first, for every new setup. The order tools act on whichever account is logged in. A demo account turns a wrong order into a wrong test result. Move to a funded account only after you have run the test below and read the result.
- Set trading to “prohibited”, and read the account after changing it. Use the three-position setting in the platform, then call the account information tool and read both flags. If you only need analysis, leave it there.
- Allow tools one by one if your client can. Claude Code can allow or ask per tool. Leave out the order tools, the chart tools, the file-delete tools and the web request until a task needs them. The lab script in our MCP guide refused them by name, and we kept that habit afterwards.
- Use the read-only login where reading is enough (untested with MCP). MT5 accounts have an investor password that gives a login without trading rights; FX Blue asks for exactly that for account sync, and we describe the same route in our track-record guide. The idea is that an agent logged in with it cannot trade, whatever its tools say. We have not tested what the MCP server’s order tools answer in that case. Test it on a demo account before you rely on it.
- Treat the token like a password. Each program has its own token, and the
.mcp.jsonfile with it is a key to your terminal. Keep it out of shared folders and out of Git, and remove the entry when you stop using it. Never paste trading passwords or unredacted account details into a prompt.
Test the lock before you rely on it
This is a short test you can run on a demo account. We describe it as a procedure; we did not run it for this guide, so no result is claimed.
- Log in to the demo account. Note the account number and server.
- Set trading to “prohibited” in Tools → Options → AI Assistant.
- Ask the agent to read the account information and report both flags. Compare with what the platform shows.
- Ask for one very small order on the demo account. The expected result is a refusal, or in the confirmation mode a prompt that you can decline. Write down the exact message.
- Repeat with the investor-password login (measure 4). Write down what each order tool answers.
- Set the permission back to “prohibited”, close the platform and remove the token entry if you do not need the connection.
If step 4 places an order, the lock did not hold. Stop there and leave the account alone until you know why.
What we did not test
- Orders. We sent none, on purpose.
- What the order tools do when the trading permission is prohibited, in confirmation mode, with the Algo Trading button off, or with an investor-password login.
- ChatGPT, Codex and other clients. Only Claude Code was used.
- Broker-side MCP servers and cloud-hosted agents. A coinspectator report of 18 November 2026 says that seven of 14 tested brokers run their own MCP server and that at least ten firms connected agents to live accounts in the first half of the year. We did not open that article for this guide and did not verify the figures. Our observations cover only the MT5 server on your own computer.
- An unattended agent. Every call in our session was sent from a supervised session.
Frequently asked questions
Can ChatGPT or Claude trade my account by itself?
Only if three things allow it: the platform’s trading permission, the tools your client lets the agent call, and the account login. In our test the permission was a switch in the platform and the order tools were present when it was on. Whether a given chat product can reach that server at all depends on the product; we tested only a local client.
Is the investor password enough protection?
It is the best-known way to give read-only access, but we have not tested it against the MCP order tools. Treat it as a measure to verify on a demo account, not as a guarantee.
Does turning off Algo Trading stop the agent?
Not on the evidence we have. The platform reported the two states separately. Check what the trading permission says, not only the button.
Should I let an agent trade at all?
That is your decision and depends on your risk and your account. If you do, use a small demo-proven setup first and ask what you would lose if the agent’s best guess was wrong.
Scope and sources
Written on 20 November 2026. Observations come from our session of 12 October 2026 (MetaTrader 5 build 6230, macOS package, demo account, Claude Code 2.1.282) as described in the MCP server guide; the three permission positions and the separate settings are from MetaQuotes’ configuration page and were not re-checked for this guide. We could not open web pages while preparing this guide; the cited MetaQuotes and FX Blue pages were used in our other guides. The coinspectator figures were not opened and are unverified. We have not reviewed any broker’s MCP server and measured no market-wide figures. The test in this guide is a procedure, not a result.


