The MCP server
Eleven tools over the simulator. A coding agent can ask whether momentum beats buy-and-hold here, and whether the difference is real.
pip install "tradefloor[mcp]" claude mcp add tradefloor -- tradefloor-mcp # then ask it a question in plain words
Inside the market, or outside it
Two places a model can sit
Both are supported and they answer different questions. Pick by what you want out.
The model studies the market
The model trades the market
# outside: the model asks
check_envelope(days=252,
roster="sp_like")
rank_strategies(
specs=[momentum, hold],
seeds=12)
# inside: the model decides
class LLMTrader:
def act(self, obs):
reply = ask_model(obs)
return reply["weights"]
The eleven tools
Strategies are data, never code
A client composes a strategy as JSON. There is no path from a tool argument to code execution.
{
"spec_version": 1,
"signal": {"kind": "momentum", "lookback_days": 1.0},
"portfolio": {"gross": 1.0, "top_k": 5},
"execution": {"cadence": "step", "max_participation": 0.02},
"seed": null
}
Universes and scenarios are data in the same way. Each result carries a fingerprint, so a second client can check the first one.
The limits, and why they exist
A direct call answers inline and caps at 60 days. A background job runs to 252 days, which is the certified horizon. Ask for more than that and the server refuses rather than returns a number it can not support.
Every result carries its own caveats
A model that summarises a result has the tool output and nothing else. Without the caveats in the payload it will report return_pct: 88.7 as "the strategy made 88.7%". So each result ships with computed caveats and full provenance: package version, preset, seed, universe fingerprint, and the strategy fingerprint.
One seed is not an answer
A single market is one sample. rank_strategies runs many seeds and compares them with a paired sign test. On the twelve-market grid the docs measure, mean-reversion wins 9 to 3 at p = 0.15. One seed picks the pooled leader eight times in twelve.