Every runtime option is set via environment variables — there is no config file to edit beyondDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/ai-trading-mcp/llms.txt
Use this file to discover all available pages before exploring further.
.env. The trading process reads these values at startup; restart the process after any change. Variables without a Required marker are optional and fall back to the listed default.
Telegram
These credentials authorize the GramJS user session that scrapes the channel intoget_status. They are not bot credentials — the scraper acts as a regular Telegram user account that has already scanned the QR code and written its session string to session.txt.
Telegram API ID from my.telegram.org. The value shown is a dev fallback included in the source code — it will work in development but you must replace it with your own ID before any production or shared deployment.
Telegram API hash paired with
CC_TELEGRAM_API_ID. The default is the same dev fallback — replace it with the hash from your own my.telegram.org application entry.Numeric channel ID to scrape. The GramJS client fetches the last 15 posts from this channel and appends them — text and chart screenshots — to every
get_status response. Change this to the ID of any channel the authorized user account can read.Trading
Comma-separated list of Binance spot symbols that the engine will trade. One
Live.background() candle loop is started per symbol at process startup. Any open_position call for a symbol that is not in this list is rejected by the engine — the agent cannot bypass it. Requires a process restart to take effect.Binance (live mode only)
These credentials are only required when running with the--live flag. Paper mode uses a public Binance connection for market data and simulates all fills inside the engine — no API keys are needed.
Binance API key. Required for live mode only. The key must have Spot & Margin Trading permission enabled. IP allowlisting is strongly recommended.
Binance API secret paired with
BINANCE_API_KEY. Required for live mode only. Never commit this value to version control.MCP Bridge
The stdio MCP server (npx @backtest-kit/mcp) is a separate process that forwards every tool call over HTTP to the trading process. These variables configure the address of that bridge, and must match on both sides.
Hostname or IP address the HTTP bridge listens on inside the trading process, and the address the stdio MCP server dials to forward tool calls. Change this only if you are running the two processes on different hosts or inside a custom network namespace.
TCP port for the HTTP bridge. The dashboard UI runs on port
60050; the bridge runs on 60051 by default. Change this if there is a port conflict on your host.Infrastructure (optional)
These variables enable optional Redis and MongoDB persistence backends provided by the@backtest-kit/mongo package. When they are not set the engine uses the default local-filesystem backends under dump/data/.
Redis host for the Redis-backed persistence backend. Only used when
@backtest-kit/mongo is wired in. Leave unset to use the default filesystem backend.MongoDB connection string for the Mongo-backed persistence backend. Only used when
@backtest-kit/mongo is wired in. Leave unset to use the default filesystem backend..env.example
The repository ships a minimal.env.example that covers the optional infrastructure variables. Copy it to .env and fill in values as needed:
.env.example — set them directly in your shell or CI secrets manager before running the process:
session.txt is not part of .env. It is written by the --session command (npm start -- --session) after you scan the QR code and complete Telegram authorization. The trading process reads it from the strategy’s working folder at runtime (content/manual.strategy/session.txt). Treat this file with the same care as a password — it grants full access to the Telegram account that authorized it.