Using Trade Style with AI Assistants
Trade Style can be connected to an AI assistant, so you can log a trade or ask how a plan is doing in a sentence instead of opening the site. It works with any assistant that supports the Model Context Protocol (MCP) and lets you add a server by URL — Claude Code, Cursor and VS Code among them.
The assistant works with the same journal you see on the site: your strategies, trading plans, accounts and trades. It is available on the Pro and Premium plans.
What your assistant can and cannot do
It can:
- Read your strategies, trading plans, accounts and trades, and narrow trades down by plan, symbol or date.
- Get your statistics — win rate, profit factor, net result, expectancy, average and largest win and loss, maximum drawdown, winning and losing streaks and average holding time — for an account, a plan, a symbol or a date range. These are worked out by Trade Style rather than by the assistant, so they are exact.
- Follow your balance over time — an equity curve by trade, day, week or month, with the drawdown at each point.
- Break your results down by symbol, long or short, trading plan, day of the week or hour of the day, so it can tell you where you make and lose money.
- See your whole portfolio — every account's balance and return, and the total across them converted into your preferred currency.
- Record a trade, one at a time, against one of your accounts and a trading plan assigned to it.
It cannot:
- Edit or delete anything. A trade it records that you don't want is removed on the site, like any other, or through the REST API with your own key.
- Import many trades at once. Trade Style does have bulk import — the CSV import on the account page, and the REST API's batch endpoint, which records up to 500 trades in one request (see the API reference linked from the Developer page). The assistant just isn't given it, for the reason below: one misled request could otherwise add hundreds of trades.
- See other people's journals, or place orders with your broker. Trade Style never connects to your broker account.
These limits are deliberate. The assistant reads what you have written in your journal, including your trade notes, and an assistant can be talked into things by text it reads. Keeping its only write to "record one trade" means the worst a misbehaving conversation can do is add a trade you can delete.
The assistant treats your notes, names and plan text as information, never as instructions, and Trade Style removes hidden characters from them, so the assistant sees only what you see on the site. Text can still reach your journal from somewhere else, such as a CSV someone sent you or an app connected with your key. So keep Trade Style out of assistant sessions that can also send data elsewhere (web browsing, email, or other connectors that can write).
1. Get an API key
The assistant signs in with an API key, the same key used for the REST API.
- Sign in, select your email address at the top of the page to open your account settings, then Developer.
- Select Generate key.
- Copy the key straight away. It starts with
tl_and is shown only once — if you lose it, revoke it and generate a new one.
Treat the key like a password: anyone holding it can read your journal and record trades in it. Don't paste it into a chat, a screenshot or a file you share or commit to a repository.
2. Connect your assistant
Every assistant needs the same two things:
- Server URL:
https://api.tradestyle.io/mcp(the transport is called HTTP or Streamable HTTP) - Header:
Authorization: Bearer tl_..., with your own key in place oftl_...
There is no sign-in window to click through: the key in the header is the whole of the login.
Claude Code
claude mcp add --transport http tradestyle https://api.tradestyle.io/mcp \
--header "Authorization: Bearer tl_..."
Run claude mcp list afterwards to check it connected.
Cursor
Add this to .cursor/mcp.json in your project, or to the global one in your home folder:
{
"mcpServers": {
"tradestyle": {
"url": "https://api.tradestyle.io/mcp",
"headers": { "Authorization": "Bearer tl_..." }
}
}
}
VS Code
Add this to .vscode/mcp.json. It asks for the key the first time the server starts, so the key never sits
in the file:
{
"inputs": [
{ "type": "promptString", "id": "tradestyle-key", "description": "Trade Style API key", "password": true }
],
"servers": {
"tradestyle": {
"type": "http",
"url": "https://api.tradestyle.io/mcp",
"headers": { "Authorization": "Bearer ${input:tradestyle-key}" }
}
}
}
Assistants that only run local servers
Some desktop assistants can only start a program on your computer, not call a URL. A bridge such as
mcp-remote fills the gap:
{
"mcpServers": {
"tradestyle": {
"command": "npx",
"args": ["mcp-remote", "https://api.tradestyle.io/mcp", "--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer tl_..." }
}
}
}
Connectors added through a web page that asks you to sign in with an account (rather than paste a key) are not supported yet.
3. Ask
Ready-made prompts
Trade Style offers six prompts your assistant can run for you. In Claude Code, type / and look for the
tradestyle entries; other assistants list them in their prompt or attachment menu.
- Weekly review — compares a week with the one before, names the symbols and days that made and lost the most, looks for drift from your plans, and suggests one thing to change. Leave the week empty for the last complete one.
- Monthly review — the same for a calendar month, adding which trading plans made and lost the most, and ending with up to three changes for next month. Leave the month empty for the last complete one.
- Review against plan — checks the trades taken under one plan against its rules and says what the breaches cost.
- Journal a trade — asks for whatever is missing, shows you a summary, and only records the trade once you confirm.
- Pre-session plan — before you trade: the rules of the plans you can trade today, what you have already traded today, and the mistakes of the last two weeks (or however many days you choose) to watch for.
- Risk check — how far each account is below its peak and how long your current losing streak is, compared with your worst ever and with your plans' stop-loss and bail-out rules, ending with OK, CAUTION or STOP. It only applies your own rules and history; it is not financial advice.
When a prompt asks for an account or a trading plan, assistants that support suggestions list yours by name, so you pick one instead of copying an id. The choice shows the name with the id after it; that is what the prompt uses.
Your assistant can also attach resources: a guide to what every number means, a trading plan, or an account summary.
Or just ask
Once connected, just talk to it. A few things that work well:
- "Which accounts and trading plans do I have?"
- "How has my London breakout plan done this month?"
- "What's my win rate on EURUSD since January?"
- "Show me my last ten losing trades and what my notes say about them."
- "Which symbols are losing me money this quarter?"
- "Am I better on longs or shorts?"
- "What was my worst drawdown this year, and when?"
- "What is my whole portfolio worth in euros?"
- "Log a long on AAPL, +150, against my London breakout plan."
For a review question the assistant reads your plan and asks Trade Style for the numbers, then explains them. For a new trade it finds the account and plan, records the trade, and it appears on the account page on the site straight away.
Tips
- Name your plans so you can say them. "London breakout" is easier to ask about than "Plan 3". The assistant matches what you say to your plans' names.
- Check a trade before it is recorded. Recording is not undone by asking again — repeating the request records the trade twice. Most assistants show the tool call and ask before running it; read it.
- Results are per account, except the portfolio. Each account keeps its own currency, so statistics, curves and breakdowns are given per account. For one figure across accounts, ask for your portfolio: Trade Style converts every account at the latest stored exchange rates before adding them up.
- Times of day. "Which day" and "which hour" questions are answered in UTC unless the assistant passes your time zone; tell it where you are if the answer looks a few hours off.
- Dates. A trade is dated by when it closed, or by when it was recorded if it has no exit time. A range "from the 1st to the 1st of next month" includes the first day and stops before the second date, so back-to-back months never count a trade twice.
Limits and plans
Each request your assistant makes counts towards the same allowance as your API: 60 a minute on Pro, 300 a minute on Premium. A typical question takes two or three requests, so you are unlikely to notice. If you do reach it, requests are refused for a few seconds; ask again shortly.
If your subscription ends, the assistant's requests are refused with a message pointing to the pricing page. Your key is kept, and works again as soon as you renew.
Troubleshooting
- "Unauthorized" or the server will not connect. The key is missing, mistyped or revoked, or the header
is not exactly
Authorization: Bearerfollowed by the key. Generate a new key if in doubt. - "Forbidden" or an upgrade message. Your account is on the Free plan. AI assistants need Pro or Premium.
- "No such resource." The account, plan or trade the assistant asked for is not in your journal. Ask it to list your accounts or plans first.
- "Trading plan does not exist for this account." The plan exists but is not attached to that account. Attach it on the account page, then ask again.
For what each field of a strategy or plan means, see Understanding Strategies & Trading Plans. If you are new to Trade Style, start with Getting Started.