I built an MCP server for crypto trading strategies, design decisions and what I learned
说明与用途
MCP 服务器通过将信号逻辑与执行和杠杆分离,并引入 7 步验证流程,简化了加密交易策略的开发。
问题
Developing algorithmic crypto trading bots was slow and error‑prone because each bot had to be manually backtested, tweaked, and redeployed. The loop of writing code, eyeballing results, and iterating 20+ times was brutal.
结果
The MCP server decouples strategy logic from execution and leverage, enabling rapid, automated development and rigorous validation. Bots can be deployed at any leverage without code changes, and the 7‑stage pipeline protects against overfitting.
工作流
- 1. Define a strategy by subclassing Strategy and implementing on_bar(ctx).
- 2. Use the provided ctx to access OHLCV bars, feature catalog, and market regime.
- 3. Submit the strategy code to the MCP server via submit_strategy.
- 4. The server runs a 7‑stage validation pipeline (static check, in‑sample, out‑of‑sample, walk‑forward, randomized start, perturbation, holdout).
- 5. If the strategy passes all stages, it is deployed to the live platform.
- 6. The bot can be opened‑source, forked, or delisted via MCP tools.
- 7. Users can compete in tournaments and view performance via marketplace tools.
证据
The server exposes a strategy contract, a 7‑stage validation pipeline, and a set of tools for discovery, backtesting, submission, and marketplace interactions.
Bots compete in 3‑day rounds across 6 domains (ETH/BTC/SOL spot + scalp).
- 记录日期: 2026-09-08T15:00:32.303Z