Skip to content
Log in Open account

Connecting an AI assistant to your JAFX account with MCP

Updated 14 November 2026

An AI assistant or agent can read the market and your trading account through the JAFX MCP server. It can also place or propose trades. It uses the same limits and checks as the rest of the JAFX Trading API, which is live. The API is switched on for demo and live accounts. AI apps such as Claude and ChatGPT connect with a JAFX sign-in; other clients use an API key.

MCP (Model Context Protocol) is the open standard AI applications use to call outside tools. This is separate from JAFX AI, the assistant built into the web trader. See JAFX AI: what it can do, trade proposals and Confirm/Dismiss.

What you need

  • The MCP address: https://terminal.jafx.com/trading-api/mcp.
  • To connect with a JAFX sign-in: an AI app that supports it (Claude, ChatGPT, Claude Code, Cursor or VS Code) and your trading account's number and master password. You don't need an API key.
  • To connect with an API key: a key with Allow AI agents (MCP) ticked. It is ticked by default. You create keys on the Developers page of the web trader (terminal.jafx.com). The AI client must send the key in an Authorization: Bearer header.

Choose the key type

Your assistant Key type What it can do
Research assistant Read-only Quotes, candles, account, positions and history. The trading tools are not listed to it at all.
Trading assistant (recommended) Proposals The same, plus order tools that create proposals. Nothing is placed until you confirm it in the web trader.
Autonomous agent on a demo account Trading, with tight limits Places orders directly, within the key's limits.

Which clients connect

With a JAFX sign-in (OAuth): Claude (on the web, the desktop app and phones), ChatGPT, Claude Code, Cursor and VS Code connect with only the MCP address. There is no key to make or paste.

  1. Add the MCP address in the app. The AI agents (MCP) page at jafx.com/developers/ shows where, app by app.
  2. The app opens a JAFX page on terminal.jafx.com. Sign in there with your trading account's number and master password. The app never sees your password. Never type it on a page at any other address.
  3. Choose what the app may do (the same three types as a key, above), its limits and how many days it stays connected. Then select Allow.

On a live account an app can only read (Read-only) or propose trades that wait for you to confirm them (Proposals). Trading without asking you is for demo accounts only.

The app then appears on the web trader's Developers page under Connected apps. Its limits, its daily loss stop and Stop API trading work as they do for a key. Select Disconnect there to stop the app within seconds. It connects again only if you sign in from the app once more.

With an API key: any other AI client connects with a key, and so do your own bots and agents. The same AI agents (MCP) page has set-up steps for AI coding tools, AI provider APIs and an agent you write yourself.

What the assistant can do

The assistant can use up to 24 tools, depending on its key or on the access you gave the app:

  • Any key or app: read its limits and trading state, the account's notifications, what JAFX has changed in the API and what the account's keys did. It can also search and read this help centre and the developer documentation, send JAFX a feature request when you agree and read JAFX's answer, and stop API trading.
  • Read access: instruments, quotes, candles, the account summary, open positions, pending orders, closed trades, the status of an order request and the account's proposals. Closed trades cover the last 7 days by default and at most 90 days.
  • Trading and Proposals access: place an order, change a position's stop loss or take profit, change or cancel a pending order, and close a position wholly or partly.

Confirming an assistant's trades

With a Proposals key, each order the assistant sends answers awaiting_confirmation. It appears on the web trader's Developers page under Proposals waiting for you. Select Confirm or Reject. A proposal you don't confirm expires after 10 minutes.

Safety

  • The server enforces the key's limits: volume, open positions, order rate and the daily loss stop. An assistant cannot exceed them, whatever it is told.
  • A web page, email or document an assistant reads can contain text written to steer it into trading. Give it no more access than its task needs.
  • Never paste a key into a chat. Put it in the client's settings or an environment variable.
  • Hosted assistants send your key from their provider's servers, whose addresses change, so an IP lock can't hold them. Give them a Read-only or Proposals key of their own, and revoke it when you stop.
  • Keep tool approvals switched on for trading tools in clients that offer them.

Troubleshooting

What you see Cause and fix
401 invalid_api_key The key is wrong, expired or revoked, or the header is missing.
401 invalid_token The app's sign-in has ended: it expired, or the app was disconnected on the Developers page or by the app itself. Connect the app again and sign in. In Claude and ChatGPT, select Connect.
403 "MCP is disabled for this key" Create a key with Allow AI agents (MCP) ticked.
The client opens a browser to sign in That is the JAFX sign-in. Check that the page is on terminal.jafx.com, sign in and select Allow. If you meant to use a key, the client did not send it: check the header in the client's set-up.
The JAFX page offers no Trading On a live account an app can only read or propose trades. Trading without asking is for demo accounts only.
The JAFX page says "This sign-in has ended" A sign-in page lasts 10 minutes and works once. Start again from the app.
The trading tools are missing The key, or the access you gave the app, is Read-only.
Orders answer awaiting_confirmation Confirm them on the Developers page, under Proposals waiting for you.
423 trading_halted JAFX has paused API trading.
403 "Origin not allowed" You are using a browser-based client. Use a desktop or server-side client.

Need help?

Never send us your API key. Tell us the client you use and the message you see.

We are available 24/7 via live chat or email (support@jafx.com).

Was this article helpful?

Can't find your answer?

Our team is here 24/7, by live chat in your client area and by email at support@jafx.com.

Contact us