BJF Trading Group Inc. — Ontario, Canada Contact Member Zone Blog Affiliates
EN DE JA AR KO ES PT ID VI HI FR TR IT CN

GUIDE · AI AGENTS FOR TRADERS

MCP for Trading: control your trading software with Claude and ChatGPT

How the Model Context Protocol lets an AI assistant read and manage a trading platform, what it should and should not be allowed to do, how to connect it safely to software running on a VPS, and a step-by-step setup for Claude, ChatGPT and DeepSeek.

Control SharpTrader from Claude or ChatGPT with an MCP server

New: agent orders, trailing stop, flow profile and 76 indicators

Short answer: the SharpTrader AI agents server now has 37 tools. Besides reading SharpTrader and managing strategies, an agent can book non-toxic orders that SharpTrader sends and closes on schedule, protect them with a stop loss, take profit and trailing stop, show how each account’s order flow looks to the broker, and calculate 76 technical indicators. Order tools exist only when you switch them on, and the agent trades only on the sessions you mark Active, inside limits it can read but never change.

The update in 3 minutes. In the video the orders are called camouflage orders; the settings page now labels them non-toxic orders. Full details: AI agent orders in SharpTrader.
These are real orders. They go to your broker with real volume, pay spread and commission, and can lose money. Keep the limits small, and check that your broker’s terms allow such orders before you switch them on.

Free agent skills. Nine skills teach Claude, ChatGPT, Codex and other agents to plan non-toxic orders within your limits: what to add, how many, at what cost, and how to check the effect. See Non-toxic skills for AI agents.

What MCP is, in one paragraph

Short answer: the Model Context Protocol (MCP) is an open standard that lets an AI assistant call functions in another program. The program runs a small MCP server that publishes a list of tools, each with a name, a description and typed arguments. The assistant reads that list, decides which tool answers your request, calls it and turns the result into an answer. For a trading platform, the tools are things like “list strategies”, “get performance” or “stop strategy”.

The important part for traders: the assistant does not get a screen or a mouse, and it does not guess. It can only call the tools the server publishes, with the arguments the server accepts, and the server decides what each tool is allowed to change. That makes MCP very different from “giving an AI remote access to your VPS”.

Why traders want an AI agent connected to their platform

Algorithmic and arbitrage traders run their software around the clock, usually on a VPS close to the broker or exchange. Most of the day-to-day work is checking, not trading: is every session connected, is every strategy running, what does the log say after a disconnect, how did a strategy do this week, what was the slippage. Each check means a remote desktop session, several windows and some scrolling.

How the connection works: local and VPS

There are two typical layouts. Which one you use decides whether you need a certificate and firewall rules.

Layout Where things run Address What you need
Local The trading software and the AI assistant on the same computer http://127.0.0.1:47350/mcp Access token only. Nothing is reachable from the network.
VPS Trading software on a VPS, the assistant on your home or office computer https://<VPS address>:47350/mcp Access token, HTTPS certificate, firewall rule for your home IP, port open at the VPS provider.
Hosted agents Trading software on a VPS, the agent on OpenAI’s servers https://<public name or IP>:47350/mcp A publicly trusted certificate (Let’s Encrypt), public address, open port.

The VPS layout is the most common for SharpTrader users: the platform keeps its low-latency location, and the assistant runs where you are. Your phone then talks to the assistant, and the assistant’s desktop app talks to the VPS.

What an AI agent should be allowed to do

Language models are good at reading and summarising and sometimes wrong about what you meant. A sensible design gives an agent wide read access and narrow, explicit write access. In SharpTrader the 37 tools are split into five permission groups:

Group Tools Allows Default
Read 16 Overview, sessions, strategies, settings, instruments, open and closed orders, performance, session and strategy logs, journal, news, the flow profile of each account, 76 technical indicators, the list of agent orders and your limits Always on while the server runs
Control 9 Start and stop strategies (one or all), trading on/off, connect and disconnect sessions Off
Settings 7 Change strategy and instrument settings, the news filter and events, create and clone strategies Off
Positions 1 Close all positions of a strategy at market Off
Orders 4 Send, cancel and close non-toxic orders through manual trading and change their trailing stop, only on sessions you mark Active and within each session’s limits Off; a risk warning must be accepted first

Just as important is what is not available to any agent: sending an order outside the sessions and limits you set, changing those limits, deleting or renaming strategies, adding or removing instruments, session properties and symbol mapping, backtests and optimisation, and anything about paths, files, DLLs or network addresses. Those stay in the program’s own windows.

Rule of thumb: start with Read only for a week. Add Control when you trust the answers, Settings when you know which values you want the agent to touch, and Positions only if you really want to close positions from your phone. Switch on order sending last, on one session, with small limits.

Security checklist

An MCP server on a trading VPS is a door into your trading. These are the protections to look for, in SharpTrader or in any platform you connect:

Check Why it matters In SharpTrader
Token on every request Without it anyone who finds the port can call tools 32-byte random token, stored encrypted, “401” without it
HTTPS off the local computer A token sent in plain text can be captured The server refuses to listen on a network address without a certificate
IP allow-list Limits who can even try a token “Allowed external IPs” plus one-button Windows Firewall rules
Brute-force block Stops token guessing 10 wrong tokens in 10 minutes block that address for 15 minutes
No browser access A malicious web page could call a local server Requests from web pages are refused
Least privilege Limits the damage of a misunderstood request Read-only by default, four separate write switches; orders only on sessions you mark Active, inside per-session limits the agent cannot change
Audit trail You can see what the agent did and when Daily call log plus journal entries for every action and failure
Token rotation Revokes a leaked token at once “New token” cuts off every client using the old one

Step by step: the server side

In SharpTrader open Settings › AI agents (MCP). For the local layout, tick “Allow AI agents to connect”, keep “This computer only” and press Apply changes. For the VPS layout:

1

Listen on: choose the VPS address (or all network interfaces). Keep port 47350 unless it is taken.

2

Allowed external IPs: your home or office IP, single addresses or ranges. Press Create firewall rules and confirm the administrator prompt.

3

Certificate: press Create self-signed and keep the suggested names and addresses, then press Copy .cer file and paste the file with Ctrl+V into a folder on your computer (this also works over Remote Desktop), for example C:\SharpTrader.

4

Token and permissions: press Copy next to the access token and keep it safe. Tick “Allow AI agents to connect”, choose the allowed operations and press Apply changes.

5

Orders (optional): tick Send non-toxic orders and accept the risk warning. In the Non-toxic orders grid mark the sessions agents may trade on as Active and set each one’s limits: max volume per order, max orders and positions at once, max orders per hour and max holding time. Press Apply changes.
SharpTrader AI agents (MCP) settings page: address and port, allowed IPs, certificate, access token, allowed operations, non-toxic order limits per session and AI client setup buttons
The AI agents (MCP) page with the server running: connection settings, allowed operations, the Non-toxic orders grid with limits for each session, and the AI client setup buttons. “Server is running” shows the address your assistant connects to (IP addresses are blurred here).

If your VPS provider has its own firewall in its control panel, open TCP port 47350 there too; SharpTrader can only change Windows Firewall.

Connecting Claude

Claude Desktop is the easiest client because SharpTrader ships a ready extension file, SharpTrader.mcpb. It uses Claude Desktop’s own runtime, so nothing else has to be installed.

1

Open Claude Desktop › Settings › Extensions (if you do not see it, search for “extensions”).

2

Drag SharpTrader.mcpb into the window and press Install.

3

Enter the SharpTrader address: http://127.0.0.1:47350/mcp on the same computer, or the https address shown next to “Server is running” for a VPS. Paste the access token, choose the .cer file, press Save.

4

Restart Claude (quit from the tray icon). The SharpTrader tools appear under + › Connectors in a chat. Ask: “show me my SharpTrader strategies”.
Claude answers from live SharpTrader data on the VPS.
Claude Desktop
ChatGPT
Voice from the phone

Given a certificate file, the extension connects only to a server that presents that certificate, so the token never goes anywhere else. If SharpTrader starts after Claude, the extension retries every 15 seconds and loads the tools once it connects. Claude Code, VS Code and Cursor users can instead press the matching Copy … config button in SharpTrader. The order, flow profile and indicator tools need extension version 1.3.0 or newer: install the current SharpTrader.mcpb, or turn the SharpTrader extension off and on so it reloads the tool list.

Connecting ChatGPT

The ChatGPT desktop app starts local MCP servers as programs, so it reaches SharpTrader through the small mcp-remote bridge. Install Node.js on your computer first (the Windows installer, default options).

Then open ChatGPT › Settings › Plugins, add an MCP server and fill in:

Field Value
Command to launch npx
Arguments (one per line) -y · mcp-remote@latest · https://YOUR-VPS-IP:47350/mcp · --header · Authorization:${AUTH_HEADER}
AUTH_HEADER Bearer, a space, then your access token
NODE_EXTRA_CA_CERTS Path to the certificate, for example C:\SharpTrader\mcp-server.cer
NODE_OPTIONS --use-system-ca
ChatGPT desktop app MCP server form for SharpTrader with npx, mcp-remote arguments, AUTH_HEADER, NODE_EXTRA_CA_CERTS and NODE_OPTIONS
The SharpTrader entry in the ChatGPT desktop app. The token goes into AUTH_HEADER, never into the arguments.

Save, start a new chat and ask “show me my SharpTrader strategies”. If ChatGPT asks whether to trust the folder, confirm. For OpenAI’s hosted agents (Responses API, Agents SDK, Agent Builder) use Copy OpenAI config in SharpTrader instead; they need a Let’s Encrypt certificate and a public address.

Connecting DeepSeek (Cherry Studio)

Short answer: DeepSeek’s own apps cannot call external tools, so use Cherry Studio, a free open-source desktop client (Windows and macOS) with a built-in DeepSeek provider and MCP support. It needs no Node.js and no certificate file, but it accepts only trusted certificates: press Get a trusted certificate (Let’s Encrypt)… in SharpTrader first (a domain name pointing at the VPS is required). Both deepseek-flash (fast, cheap) and deepseek-v4-pro (stronger reasoning) support tool calls. This is the route for users in mainland China, where Claude and ChatGPT are not reachable without a VPN.

Video tutorial for our Chinese-speaking users (Chinese narration, 3:47): Cherry Studio install, DeepSeek API key, adding the SharpTrader MCP server, first message. PDF guide (Chinese).

1

Install Cherry Studio 2.0 or newer from cherry-ai.com (mainland mirror: cherryai.com.cn).

2

Get a DeepSeek API key at platform.deepseek.com: top up any amount, then API keys › Create (the sk-… key is shown once).

3

Settings › Model Provider › DeepSeek: paste the key, keep the address https://api.deepseek.com, press Fetch models and add deepseek-flash, then switch the provider on (top-right toggle).

4

Settings › MCP › MCP Servers › Add › Import from JSON, paste the configuration below with your address and token, then enable the server and wait for the green status.

5

In a chat: switch the model to deepseek-flash, open the + menu › MCP › enable sharptrader, and ask “Show the SharpTrader overview and list all strategies with their status.” A tool-call block above the reply means the chain works.
Field Value
Type Streamable HTTP (streamableHttp), not SSE or STDIO
URL The https address shown after “Server is running”, e.g. https://your-domain.com:47350/mcp (no trailing slash)
Headers Authorization=Bearer <your access token> (one space after Bearer)
{
  "mcpServers": {
    "sharptrader": {
      "type": "streamableHttp",
      "url": "https://your-domain.com:47350/mcp",
      "headers": { "Authorization": "Bearer <your access token>" }
    }
  }
}
Cherry Studio, Settings › Model Provider › DeepSeek: API key, fetch models, enable switch
Cherry Studio › Settings › Model Provider › DeepSeek (Chinese UI shown; the English UI has the same layout): ① provider ② API key ③ fetch models and add deepseek-flash ④ enable switch.
Cherry Studio, Settings › MCP › MCP Servers page
Cherry Studio › Settings › ① MCP › ② MCP Servers › Add › Import from JSON.
Cherry Studio chat with deepseek-flash selected and the MCP option in the + menu
Cherry Studio chat: ① switch the model to deepseek-flash ② open the + menu ③ MCP › enable sharptrader, then ask.

Cherry Studio’s UI is shown in Chinese in the screenshots; the English UI has the same layout. Common errors: a red server status means a wrong URL or type; 401 in the server log means a wrong token (press New token in SharpTrader); no tool calls in the chat means MCP is not enabled for that conversation or the model does not support tools. A step-by-step PDF with every screen is available in Chinese: SharpTrader × DeepSeek setup guide (PDF, 中文).

Useful requests to try

Request Permission group
“Give me an overview: which sessions are connected and which strategies are running?” Read
“Show the last errors in the log of strategy 21.” Read
“What were the net profit, profit factor and average slippage of strategy 23 this week?” Read
“Which high-impact USD events are on the calendar today?” Read
“Connect all sessions, then start strategy 19.” Control
“Stop all strategies until the release is over.” Control
“Clone strategy 18 and set MaxOrdersTotal to 5 on the copy.” Settings
“Turn on the news filter for strategy 21 and refresh the calendar.” Settings
“Close all positions of strategy 23.” Positions
“Show me the flow profile of my main account for the last 7 days and tell me what stands out to the broker.” Read
“What are the RSI(14) and the 50-period SMA on H1 for EURUSD on session MAIN? Warn me if the candles are not complete.” Read
“Book 4 orders on EURUSD on session MAIN: 0.01 lots, two buys and two sells, spread over the next 3 hours, each held 40 to 90 minutes.” Orders
“Give order 12 a trailing stop: start after 20 points of profit, with a 15-point step.” Orders

Good habits: name strategies by ID, ask the agent to read the state again after an action (connecting, closing positions and order updates continue in the background), and keep write requests short and explicit.

Troubleshooting

Symptom What to do
The client shows no tools, or old tools After changing allowed operations, reconnect the server in the client (or restart it) so it reloads the list.
“Server could not start” The reason follows: usually the port is taken, the certificate or its password is wrong, or a network address has no certificate.
401 Unauthorized Wrong token, or New token was pressed. Copy the configuration again.
429 Too many requests That address sent 10 wrong tokens in 10 minutes. Fix the token; the block ends after 15 minutes.
Other computers cannot connect Check that Listen on is not “This computer only”, the VPS provider’s firewall, and the message of Create firewall rules.
Claude shows the server but no SharpTrader tools Quit Claude Desktop fully from the tray icon and start it again.
A settings change is refused Stop the strategy for general settings, close its window in SharpTrader, or close its open orders before changing a symbol.
The agent cannot send an order Check that Send non-toxic orders is ticked, the session is Active in the grid and the order fits that session’s limits; then reconnect the client so it loads the order tools.
Indicator values come with a warning Switch on candle collection for that timeframe in the symbol’s properties in the session settings, then reconnect the session.
A call times out after 30 seconds A message box or dialog is open in SharpTrader. Close it, then let the agent read the state.

Add AI agents to your SharpTrader

37 tools, read-only by default, order sending only inside the limits you set, HTTPS and token protection. Works with Claude, ChatGPT, DeepSeek (via Cherry Studio) and other MCP clients.

SharpTrader AI Agents moduleSharpTrader Pro

Limits and honest caveats

FAQ

What does MCP stand for?

Model Context Protocol, an open standard for connecting AI assistants to programs and data. A program runs an MCP server that publishes tools; an assistant such as Claude or ChatGPT calls them.

Can an AI agent trade for me through MCP?

Only if you allow it. In SharpTrader the order tools are off by default. When you switch on non-toxic orders and accept the risk warning, an agent can send orders through manual trading on the sessions you mark Active, within the limits you set for each one; it can never change those limits. Without that switch an agent can only start or stop the strategies you configured and, if you allow it, close a strategy’s positions.

Do I need a VPS?

No. If the assistant runs on the same computer as SharpTrader, the server listens only on 127.0.0.1 and needs no certificate. A VPS is only needed if your trading already runs there.

Does it work with DeepSeek?

Yes, through the Cherry Studio desktop client: it has a built-in DeepSeek provider and connects to the same MCP server with a Streamable HTTP entry and a bearer token. It needs a Let’s Encrypt certificate on the SharpTrader side and works without a VPN in mainland China. See Connecting DeepSeek.

Is Claude or ChatGPT better for this?

Both work with the same tools. Claude Desktop is quicker to set up thanks to the ready extension file; ChatGPT needs Node.js and a few more fields. Use the assistant you already pay for.

Can I control SharpTrader by voice from my phone?

Yes. Connect the assistant on your computer, then use its mobile app; the connector is available there too, and you can ask by text or voice.

What happens if my token leaks?

Press New token in SharpTrader and apply the changes: every client using the old token is cut off at once. Then paste the new token into your own clients.

Trading involves risk. This guide is educational and not financial advice. AI assistants can make mistakes; always review what you allow an agent to do.