Most MCP tutorials end when the tool list appears. With a trading account on the other end, that is where the decisions start: what the assistant may see, what it may do, and who presses the button. This walk-through connects Claude and OpenAI's GPT Astra in ChatGPT to JAFX, then covers the API-key route for code.

One rule first: use a demo account. JAFX's developer docs say to build and test with virtual money, and demo orders go through the same routing as live ones.

Connect Claude or ChatGPT with just the address

The JAFX MCP server has a single endpoint, https://terminal.jafx.com/trading-api/mcp. It speaks Streamable HTTP and is stateless. Claude and ChatGPT need only that address and a JAFX sign-in: no key to make, copy or paste.

In Claude (web, desktop app or phone), open Settings → Connectors → Add custom connector. Name it JAFX, enter the address as its URL and click Connect.

In ChatGPT, where GPT Astra runs, turn on developer mode (Settings → Apps → Advanced settings), create an app with the address as its URL and OAuth as its authentication, then connect it.

Either way, a JAFX page opens showing which app is asking, which account (Live or Demo) and three access levels:

Read-only: prices and the account.

Proposals: every trade waits for a Confirm in the web terminal.

Trading: trades within its limits without asking, on demo accounts only.

The same page sets limits (lots per order, orders per minute, open positions, a daily loss stop, symbols) and how many days the app stays connected. Sign in with the trading account's number and master password, then press Allow. The docs say the password goes to the trading platform only, never to JAFX's servers or to the app, so check that the page is on terminal.jafx.com first.

Ask for prices, then propose a trade

Start with reads. The docs offer prompts such as “What is my equity, and which positions are losing?” Behind the answer, the assistant calls tools like get_limits (which agents should call first), get_quotes, get_account and get_positions. The server exposes up to 24 tools, filtered by the access granted; with Read-only access the trading tools are not even listed.

Then try the docs' other example: “Propose a 0.01 lot EURUSD buy with a stop 30 pips below the market.” With Proposals access, place_order answers awaiting_confirmation and nothing reaches the broker. The proposal waits on the web terminal's Developers page under Proposals waiting for you, with Confirm and Reject, and expires after 10 minutes. The assistant can follow it with list_proposals, and Disconnect under Connected apps cuts the assistant off within seconds.

The API-key route for developers

Code built on the Claude API's MCP connector or OpenAI's Responses API uses a key instead. Both call from their provider's servers, whose addresses change, so an IP lock can't hold them. Create a dedicated Read only or Proposals key on the Developers page, tick Let this key be used from any IP address, and revoke it when finished.

For the Claude API, add the address to mcp_servers as a "type": "url" entry named jafx, then pass the key and enable the toolset:

"authorization_token": os.environ["JAFX_API_KEY"],

tools=[{"type": "mcp_toolset", "mcp_server_name": "jafx"}],

This connector runs tool calls on Anthropic's servers without asking first, so the key should never be one that trades on its own.

For the Responses API, add a tool of "type": "mcp" with the address as server_url, and send the key with every request (OpenAI does not store headers):

"server_label": "jafx",

"headers": {"Authorization": f"Bearer {os.environ['JAFX_API_KEY']}"},

"require_approval": "always",

That setting returns an approval request before each tool call. To skip approval for reads only, the docs pass:

{"never": {"tool_names": ["get_quotes", "get_account",

"get_positions"]}}

The safety model, briefly

Volume, open positions, order rate and the daily loss stop are enforced by the server, so a confused or manipulated agent cannot exceed them. On a live account, an app connected by sign-in can only read or propose, and live keys start with 0.10 lot per order and a 2% daily loss stop, every order waiting for confirmation. Never paste a key into a chat, and stay on demo until the proposals look right.


JAFX (PTY) LTD is an authorised Financial Services Provider (FSP No. 52058) regulated by the FSCA. Trading leveraged derivatives carries a high risk of losing money rapidly and is not suitable for everyone.

This story was distributed as a release by Jon Stojan under HackerNoon’s Business Blogging Program