XTester MCP — Connect AI Agents to Strategy Backtesting
XTester provides a local stdio MCP server for building, compiling and historically testing trading strategies. The MCP host and XTester run on the user's computer and do not expose a separate MCP network listener. Data you send to an AI client may be processed by that client's LLM provider according to its configuration and privacy policy.
What an agent can do through XTester
- inspect the strategy environment and API;
- create or edit strategy files inside an
.xtprojproject; - compile a strategy;
- check history availability and integrity;
- download the required historical range;
- run a backtest;
- read trades, metrics, the equity curve and drawdown;
- compare versions and runs;
- use the Research Lab and walk-forward where the current version supports it;
- port a strategy from another platform: accept the source, build the port inside a project and check it honestly.
How it works
AI client → local stdio → the local XTester MCP host → XTester engine / data / project
Converting a third-party strategy
A compatible external AI agent (for example Claude Code, Codex CLI or another stdio MCP client with the necessary permission and confirmation support) can move work from another platform into XTester over MCP — from accepting the source to compiling, checking and finalising it inside a project.
The agent is the "brain" of the conversion: it reads the source, builds a behaviour model, proposes decisions for incompatibilities and hands over the port files. XTester provides a controlled process contract: local import, a project sandbox, compilation, recorded decisions, a semantic audit and a final report. Only source is accepted — compiled .ex4, .ex5 and .dll are not accepted and not decompiled.
The result is not declared identical to the original. When a reference report exists (for example a CSV or a TradingView List of trades), a diff-test runs with a permitted per-bar tolerance, and the port gets an honest status: confirmed · conditionally confirmed · needs work · not confirmed. Without a reference report the status is "not confirmed". More on source, rights and verification on the Security page.
The choice of AI model and how it connects belong to your AI client's configuration: it may use a cloud model or a local OpenAI-compatible endpoint, including setups based on LM Studio or Ollama. XTester provides only the local stdio MCP interface and does not certify specific clients, models or providers.
Supported clients
The built-in connection screen documents configurations for Claude Code, Claude Desktop, Codex CLI, Cursor, Windsurf and VS Code. Other stdio MCP clients may work but require checking their config format and approval behaviour. A template is not proof of compatibility; no separate client certification was performed.
Why local
- the host runs on the user's machine;
- no separate MCP network port is opened;
- "local stdio" describes only the client-to-host transport and does not guarantee an entirely local AI workflow;
- the MCP client or a cloud model provider may receive tool schemas, arguments, results, strategy excerpts, paths and logs according to its configuration;
- separate network actions are possible for downloading market data, reaching GitHub, LLM providers, updates and other explicitly documented functions.
Limitations
- Windows 10/11, win-x64 architecture;
- a long history download can take significant time and includes network-read and local-write side effects;
- results depend on data, execution assumptions, fees, slippage and settings;
- a backtest does not prove future profitability;
- mutating tools may change
.xtproj, Git/GitHub or install an update and require the corresponding approvals; - live trading through a public MCP surface is not claimed.
Get started
- Download XTester from the official GitHub Releases.
- Open the built-in "Connect to an AI agent (MCP)" screen in XTester.
- Copy the configuration for your client.
- Restart the agent session.
- Ask the agent to call a safe read-only tool to verify the connection.
XTester is an environment for building and testing strategies, not investment advice. Backtest results do not guarantee future returns.