Home Troubleshooting

Troubleshooting

By Thanh
3 articles

"No terminal connected" in your AI client

You've connected your AI client, it lists the MTContext tools, but every time you ask for a price you get "no terminal connected." The good news: this specific message means your key and your client are fine. The problem is on the MetaTrader side — the terminal the tools would talk to isn't online right now. What this message actually means MTContext has two halves: the MCP connection (your AI client, authenticated with your terminal key) and the terminal (MetaTrader running the Expert Advisor). "No terminal connected" means the first half is working — your key authenticated — but there's no live EA for the request to reach. That's why it's different from an auth error: if the key were bad, you'd get a 401/403 instead, and often no tools at all. Fix it in order 1. Is MetaTrader open? The terminal has to be running for the EA to connect. Open it. 2. Is the EA attached and running? Look for the smiley face in the top-right of the chart the EA is on. No smiley means it isn't running — check that algo trading is enabled (see EA won't connect / shows "disconnected"). 3. Does the dashboard show the terminal online? Open your dashboard. If it shows disconnected there too, this is really an EA connection problem — fix that first; the client message will clear on its own once the terminal is back online. 4. Right key, right terminal? If your key was bound to a different terminal, requests won't find the one you expect. Confirm the EA that's online is the one bound to the key your client is using. If you have more than one terminal On multi-seat plans you may have several terminals bound. When more than one is connected, tools accept an optional terminal_id so you can target a specific one — ask your AI to "use terminal <id>" if a request is hitting the wrong account. Empty tool list instead? If your client shows no MTContext tools at all (rather than tools that fail), that's a capability/tier or auth issue, not a terminal one — recheck the bearer key and your subscription tier. Next steps Most of the time the fix lives in EA won't connect / shows "disconnected". If the key itself is suspect, see Activating your license key. Check your terminal status at mtcontext.com/dashboard.

Last updated on Jul 25, 2026

Auth errors and expired tokens

Authentication errors almost always come down to two numbers: 401 and 403. They mean different things, and telling them apart is most of the fix. This article covers both, plus the "it worked an hour ago and now it doesn't" case. 401 Unauthorized — the key isn't accepted A 401 means the credential itself was rejected. Check, in order: - The key starts with MTMCP- and has no trailing spaces (a copy-paste space is the single most common cause). - Your client sends it as Authorization: Bearer MTMCP-YOUR-TERMINAL-KEY, exactly. - The key hasn't been revoked or rotated. If you rotated recently, update the client to the new key. - The key has been bound — a brand-new key must connect a terminal once before it authenticates anywhere. See Activating your license key. 403 Forbidden — the key is fine, the tool isn't allowed A 403 means you authenticated successfully but the key lacks the capability for that specific tool. This is a tier gate, not a key problem — for example, trying to place a trade on the free tier, or calling an analytics tool below the Team tier. The fix is a plan change, not a key change; see Choosing a plan and subscribing. "It worked, then suddenly stopped" If a session ran fine and then began failing, the usual cause is a session token that couldn't refresh. Session tokens (JWTs) are short-lived and normally refreshed automatically. Refresh fails — and you start seeing 401s — when: - the underlying terminal key was revoked or rotated mid-session, or - you're managing the token manually and let it expire without minting a new one. Restarting the client forces a fresh exchange from your terminal key. If it still fails, the key itself is the problem — rotate it and retry. See Session tokens: getting and rotating your JWT. Other auth-adjacent errors - Terminal mismatch — the key is valid but bound to a different terminal than the request expects. Confirm the online terminal is the one your key is bound to. - Works in the dashboard but not the client — usually a stale client config or the wrong profile file loaded. Restart the client to force a config reload. Quick checklist 1. Key starts with MTMCP-, no trailing space. 2. Sent as a Bearer token. 3. Not revoked; bound at least once. 4. Restart the client to force a token refresh. 5. Still failing? Rotate the key and test with a read-only prompt. Next steps If tools authenticate but report no terminal, that's a different problem — see "No terminal connected" in your AI client. Manage keys at mtcontext.com/dashboard.

Last updated on Jul 22, 2026

Trades that don't execute as expected

You asked your AI to place a trade, it said something happened, and nothing showed up in your terminal. Almost every case falls into one of a few buckets. Here they are, most common first. 1. It was a dry run (by far the most common) Every trade-affecting tool defaults to dry_run: true — it validates and describes the trade without sending it. If your AI reported what "would" happen but no order appeared, it was almost certainly a dry run. A real order requires dry_run: false to be passed explicitly. Ask again and be explicit: "Place that order for real" / "execute live." See Placing trades safely with dry_run. 2. Trading is disabled on the EA Even a live request won't execute if the Expert Advisor isn't allowed to trade. The EA needs inp_AllowTrading = true, and algorithmic trading must be enabled in the terminal (the Algo Trading button green, and the chart's Allow Algo Trading checked). This is a deliberate second gate — see EA won't connect / shows "disconnected" for the exact toggles. 3. You're on a tier without trading The free tier is read-only. Trade tools require the trade capability (Pro and up); calling them below that returns a 403. See Choosing a plan and subscribing. 4. The broker rejected it If the request was live and trading was enabled, your broker may still have said no. Common reasons MTContext surfaces or the broker enforces: - Market closed / outside trading hours for that symbol. - Lot size too small — below the symbol's minimum or step (LOT_TOO_SMALL). Re-size the trade (see Sizing positions by risk, not lots). - Insufficient margin for the requested volume. - Symbol not available in your Market Watch or not tradable on your account. MTContext validates against these and fails safe rather than sending an order it knows will bounce. 5. The position or order changed underneath the request Closing or modifying by ticket can return POSITION_NOT_FOUND or ORDER_NOT_FOUND if the position was already closed (for example, a stop was hit) between the dry-run preview and the live call. Re-check current positions and try again with a valid ticket. 6. An equity guard is blocking new trades If you've set an equity guard and it has breached, new live trades are blocked until the daily reset (or until you remove the guard). Check with "What's my equity guard status?" — see Setting up equity protection guardrails. Quick diagnosis Ask your AI to "show me the exact result of that order request." The returned status usually names the reason directly — dry run, capability, lot size, margin, market hours, or a missing ticket — and points you straight at the fix above. Next steps For the safety model behind all of this, see Understanding the dry_run safety model. Check your account at mtcontext.com/dashboard.

Last updated on Jul 22, 2026