TextToQuant MCP server
Backtest trading strategies written in plain English on real market data (crypto and stocks), from any MCP client. Every result comes back graded, with honesty flags (zero fees, missing stops, thin sample), plus the tools to stress-test it: parameter sweeps, walk-forward, multi-asset, overfit verdicts, edge by market regime, custom indicators in JavaScript / Python / Pine Script / CSV, shared-capital portfolios, Pine Script export and shareable interactive reports.
Research and education only — nothing is traded, nothing is bought through the server. Runs use the credits of your own TextToQuant account (free tier at https://www.texttoquant.com).
Two ways to connect
A. Remote server (OAuth sign-in) — Claude, ChatGPT, Cursor, VS Code, Gemini CLI
URL: https://www.texttoquant.com/api/mcp (streamable HTTP). The client opens a browser to sign in; no keys to copy.
- Cursor one-click:
cursor://anysphere.cursor-deeplink/mcp/install?name=texttoquant&config=eyJ1cmwiOiJodHRwczovL3d3dy50ZXh0dG9xdWFudC5jb20vYXBpL21jcCJ9 - VS Code one-click:
https://vscode.dev/redirect/mcp/install?name=texttoquant&config=%7B%22name%22%3A%22texttoquant%22%2C%22url%22%3A%22https%3A%2F%2Fwww.texttoquant.com%2Fapi%2Fmcp%22%2C%22type%22%3A%22http%22%7D - Claude Code:
claude mcp add --transport http texttoquant https://www.texttoquant.com/api/mcp - Gemini CLI:
gemini extensions install https://github.com/Youssef2784/texttoquant-gemini-extension
B. Local server (API key) — Cline, Claude Desktop, any stdio client
ttq-mcp.mjs in this repo is a single-file Node 18+ server with no dependencies. It needs an API key from Account → API keys on https://www.texttoquant.com.
git clone https://github.com/Youssef2784/texttoquant-mcp
# or: curl -o ttq-mcp.mjs https://www.texttoquant.com/api/v1/mcp-server.mjs
Register it with your client (example cline_mcp_settings.json / claude_desktop_config.json):
{
"mcpServers": {
"texttoquant": {
"command": "node",
"args": ["/absolute/path/to/texttoquant-mcp/ttq-mcp.mjs"],
"env": {
"TTQ_API_KEY": "ttq_...",
"TTQ_API_BASE": "https://www.texttoquant.com/api"
}
}
}
}
Claude Code: claude mcp add texttoquant -e TTQ_API_KEY=ttq_... -e TTQ_API_BASE=https://www.texttoquant.com/api -- node /absolute/path/to/ttq-mcp.mjs
First prompt
Backtest buying BTCUSDT on the 1d chart when RSI(14) crosses above 30, take profit 8%, stop loss 4%, from 2022 to 2025
The agent will parse the idea, run it (one credit), and show the graded chart. Ask "is it overfit?", "which regimes does it make money in?", "sweep the stop loss", or "share it as a link".
Tools (77)
describe_capabilities · parse_strategy · explain_parse · run_backtest · show_backtest · get_backtest · list_backtests · get_backtest_data · edit_backtest · compare_backtests · diff_iterations · share_backtest · start_analysis / get_analysis / show_analysis (sweep, grid, walk-forward, joint sweep, multi-asset, variants, screen) · get_overfit_verdict · get_regime_edge · show_context · refine_context · filter_by_context · get_context_trades · explain_grade · custom indicators (validate_*, preview_*, save_js_indicator, save_py_indicator, save_pine_indicator, save_csv_indicator, list_indicators, get_indicator) · portfolios (parse_portfolio, run_portfolio, get_portfolio, show_portfolio, get_portfolio_analysis, run_portfolio_sweep) · market (scan_market, market_regime, market_sectors, token_stats, custom_benchmark, get_candles, list_markets) · export_pine · get_usage · get_plans · workspace_summary and more. Full docs: https://www.texttoquant.com/docs/api/mcp
Verify the download
ttq-mcp.mjs.sha256 holds the SHA-256 of the bundle in this repo; the same bundle is served at https://www.texttoquant.com/api/v1/mcp-server.mjs.
Links
Website https://www.texttoquant.com · Docs https://www.texttoquant.com/docs/api/mcp · Privacy https://www.texttoquant.com/privacy · Terms https://www.texttoquant.com/terms · Support https://www.texttoquant.com/security