Strateda MCP
Officialby strateda
README.md
# Strateda MCP
Backtest, optimize and walk-forward test trading strategies from Claude, ChatGPT or any MCP client, on built-in CME futures and US stock data, or on any broker's data through your own MetaTrader 5 terminal.
[Strateda](https://www.strateda.com) is a strategy research platform. Its MCP server lets an AI assistant build a trading strategy from a plain-language description, run it as a backtest or a parameter optimization on Strateda's servers, and read the results back as data: equity metrics, drawdown, per-trade rows and optimization surfaces.
This repository holds the connection guide, example prompts, example strategies and the [MCP Registry](https://registry.modelcontextprotocol.io) entry. The server itself is hosted by Strateda; there is nothing to install.
| | |
|---|---|
| **Endpoint** | `https://app.strateda.com/mcp/agent` |
| **Transport** | Streamable HTTP |
| **Authentication** | OAuth 2.1 (dynamic client registration and client ID metadata documents) |
| **Registry name** | `com.strateda/agent` (registry names use the reversed domain: strateda.com) |
| **Requires** | A Strateda account on the Plus, Pro or Premium plan. Not available on the Free plan. Plus is free until 28 February 2027. |
## Two ways to bring market data
- **Built in:** 1-minute OHLC and Best Bid/Offer (BBO) spread data from Databento for 82 US stocks (history from May 2018) and 12 CME futures contracts (most from 2010). Nothing to install.
- **Any broker with MetaTrader 5:** install the Strateda EA once in your own MT5 terminal ([Expert Advisor Setup](https://www.strateda.com/docs/mt5-integration/expert-advisor-setup)), then test on that broker's symbols and history, such as forex, indices, commodities and stock CFDs, with your broker's margin, spread and swap data. The EA streams the history directly, no data files to export or import.
See [Historical Data](https://www.strateda.com/docs/market-data/historical-data) and [Available Instruments](https://www.strateda.com/docs/market-data/available-instruments).
## Connect
### Claude (web, Desktop and mobile)
1. In Claude, open **Settings**, then **Connectors**, and click **Add custom connector**.
2. Name it "Strateda" and paste `https://app.strateda.com/mcp/agent`. Leave the advanced fields as they are.
3. Click **Connect**. A Strateda page opens: log in if asked, check that it names **Claude**, and click **Approve**.
### Claude Code
```bash
claude mcp add --transport http strateda https://app.strateda.com/mcp/agent
```
On the first prompt that uses a Strateda tool, Claude Code opens a browser window to approve the connection.
### ChatGPT
1. In ChatGPT, open **Settings**, then **Apps & Connectors**, then **Advanced settings**, and turn on **Developer mode**.
2. Back in **Apps & Connectors**, click **Create**. Name it, paste `https://app.strateda.com/mcp/agent` and choose **OAuth**.
3. Log in on the Strateda page that opens, check that it names **ChatGPT**, and click **Approve**.
4. In a chat, enable the connector from the tools menu.
### Any other MCP client
Point it at the endpoint and complete the OAuth flow. Client registration is dynamic, so there is nothing to pre-provision. A local client must use a loopback callback (`http://127.0.0.1:<port>/...` or `http://localhost:<port>/...`).
Every connected client appears under **Connected apps** on your Strateda account page, where you can disconnect it at any time. Disconnecting revokes its tokens immediately.
## Try it
Three prompts to start with. Each works in a new chat, on the built-in data:
```text
Backtest a 20/50 EMA crossover, long only, on AAPL H1 for 2024, and give me the net profit, maximum drawdown and number of trades.
```
```text
Optimize a 20/50 EMA crossover on AAPL H1 for 2024, long only: test fast EMA 10 to 30 and slow EMA 40 to 100 in steps of 10, and tell me whether the best result holds up for neighbouring values.
```
```text
List my saved strategies and my most recent jobs, then summarize the metrics of the latest finished backtest.
```
Results are measured against buy and hold on the same instrument, and optimizations come with overfitting checks (deflated Sharpe ratio, SPA and Reality Check tests), so a lucky combination is reported as one.
## Example strategies
[`examples/`](examples) holds three complete strategies, each checked against the server's validator and run once on the built-in data:
| File | What it is |
|---|---|
| [`sma-crossover-backtest.json`](examples/sma-crossover-backtest.json) | SMA 20/50 crossover on ES futures, H1, long only. The `strategy` argument of `run_backtest`. |
| [`zscore-mean-reversion-expression.json`](examples/zscore-mean-reversion-expression.json) | A formula condition: buy when price is two standard deviations below its 20-bar mean, exit back at the mean. Session hours in exchange time. |
| [`ema-grid-optimization.json`](examples/ema-grid-optimization.json) | The arguments of `run_optimization`: 21 combinations of fast and slow EMA, with the exit linked to the entry. |
To use one in a chat, paste it with a request such as "Run this strategy with Strateda and summarize the result".
## Tools
### The unattended server (19 tools)
No browser required. Each call carries the whole configuration, so there is no session state to set up first.
| Tool | What it does |
|---|---|
| `list_symbols` | List available symbols for a given market source. |
| `list_calendar_events` | List the economic-calendar events a News Filter rule can watch. |
| `run_backtest` | Submit one complete strategy for backtesting. |
| `run_optimization` | Submit one complete strategy for optimization (grid search over any param carrying a `<field>_optimize` range) or walk-forward optimization (if `walk_forward` is given). |
| `get_backtest_metrics` | The aggregate metrics of a completed backtest job, as data. |
| `get_backtest_trades` | The per-trade rows of a completed backtest job, paged. |
| `get_job_result` | Fetch a job's full strategy configuration and result. |
| `get_optimization_metrics` | Aggregate metrics for a completed optimization or WFO job: the same numbers the Strategy Analytics charts show, returned as data. |
| `get_optimization_chart_data` | One optimization chart's numbers, without its styling. |
| `list_jobs` | List this account's backtest, optimization and WFO jobs, most recent first, with each job's kind, status, progress and outcome, one page at a time. |
| `list_strategies` | List this account's saved strategies. |
| `save_strategy` | Save a completed job's result as a named strategy. It appears in your strategy list in the app, the same as using the Save button. |
| `delete_strategy` | Delete one of this account's saved strategies by name. |
| `wait_for_job` | Wait for one job to finish, for up to 55 seconds per call. |
| `wait_for_jobs` | Wait on several jobs in one call. |
| `cancel_job` | Cancel one of this account's pending or running jobs. |
| `list_live_strategies` | Which of this account's strategies are running live on a demo account right now, with each one's heartbeat age. |
| `get_live_metrics` | Live demo performance for one strategy, computed from its fills. |
| `get_live_trades` | The live demo fills the EA executed, the same per-trade record the app's strategy log shows. |
Five of them write (`run_backtest`, `run_optimization`, `save_strategy`, `delete_strategy`, `cancel_job`); the other fourteen only read. Every tool carries MCP annotations (`title`, `readOnlyHint`, `destructiveHint`).
### Working inside the app: the interactive server
A second endpoint, `https://app.strateda.com/mcp`, drives your **open Strateda tab**: the assistant selects the market, plots indicators, edits the strategy panel and runs jobs, and you watch the form and the chart change as it works. It needs a logged-in Strateda tab open while you use it; with no tab open, calls time out. Connect it the same way, with this URL.
The full list of both servers, tool by tool: [MCP Tool Reference](https://www.strateda.com/docs/ai-assistant/mcp-tool-reference).
## What it does not do
No tool on any surface can open, close or modify a position on your MT5 demo account, or start, stop or alter a live strategy. The three live tools read and nothing more: they report what a running strategy has already done, and cannot change what it does next.
Every backtest and optimization an MCP client submits counts against your plan's quota, the same as in the app.
## Scopes
A scope is the permission level stored in the access token. Your MCP client picks it automatically during the OAuth login; there is nothing to configure.
- **`mcp.agent`**: the scope this endpoint asks for. Read results, run backtests and optimizations, list, save and delete strategies, cancel jobs, and read live-strategy state. A token with this scope cannot control the Strateda tab in your browser, so a credential meant for unattended use stays limited to this endpoint.
- **`mcp`**: full access, including the interactive endpoint that operates the open Strateda tab in your browser. A client that requests no scope gets this one; it also works here.
## Links
- Documentation: [Connect Your Own Tooling (MCP)](https://www.strateda.com/docs/ai-assistant/connect-your-own-tooling)
- Tool reference: [MCP Tool Reference](https://www.strateda.com/docs/ai-assistant/mcp-tool-reference)
- Plans: [Feature Access by Plan](https://www.strateda.com/docs/pricing-and-plans/feature-access-by-plan)
- Privacy policy: [strateda.com/privacy](https://www.strateda.com/privacy)
- Terms: [strateda.com/terms](https://www.strateda.com/terms)
- Support: [info@strateda.com](mailto:info@strateda.com)
## Research tool, not advice
Strateda is a research tool. Results come from simulations on historical data or from MT5 demo accounts, and examples are illustrative. Nothing here is investment advice. Simulated past results do not predict future results. See [Research Tool, Not Investment Advice](https://www.strateda.com/docs/getting-started/research-tool-not-advice) and the [Terms & Conditions](https://www.strateda.com/terms), which are the binding text.
## License
The contents of this repository (this guide, the example strategies and `server.json`) are released under the [MIT License](LICENSE). The license covers these files only. It grants no rights to the Strateda service, its software or data, or the Strateda name and logo; use of the service is governed by the [Terms & Conditions](https://www.strateda.com/terms).
Strateda is a product of Tutari GmbH, Switzerland.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues