Reference

MCP server

Connect TextToQuant to Claude and other MCP clients.

The Model Context Protocol (MCP) is an open standard, so the TextToQuant MCP server works with any MCP compatible AI agent, not just one. Claude, ChatGPT, Cursor, Cline, VS Code and other MCP hosts all connect to the same server. Ask it, in plain words, to build and test a strategy and it will parse, run, and read back the results. It uses the same billing, plan limits, and account as the app. There are two ways in.

Hosted connector (OAuth)#

The hosted server URL is the same for every client:

https://www.texttoquant.com/api/mcp

You sign in with your TextToQuant account (no API key needed) and approve access on a consent screen. See and revoke every connected agent anytime from Connected apps.

The hosted connector works on every plan. It needs no API key and no separate entitlement. Tools that a plan does not include (Monte Carlo on Pro, say) return a plan_required error at call time rather than being hidden, and runs bill the same credits as the app. API keys, for the REST surface and the downloadable server below, are a separate Enterprise feature.

One click install#

Add the server to your editor in one click, then sign in and approve access:

Claude organization admins can prefill the org-wide dialog instead, which adds the connector for everyone in the workspace: Add for the whole organization.

Claude Code takes one line, with no API key and no config file to edit:

bash
claude mcp add --transport http --scope user texttoquant https://www.texttoquant.com/api/mcp

Then run /mcp inside Claude Code to finish the browser sign in. --scope user registers the server for every project on the machine; drop it to add it to the current directory only.

Grok CLI takes the same shape (no scope flag, it already writes the user-level config):

bash
grok mcp add --transport http texttoquant https://www.texttoquant.com/api/mcp

Gemini CLI installs the TextToQuant extension, which wraps the same server plus a briefing the agent reads:

bash
gemini extensions install https://github.com/Youssef2784/texttoquant-gemini-extension

Then run /mcp auth texttoquant inside Gemini CLI to finish the browser sign in.

Claude Code plugin is the alternative to the one-liner above when you want the server and a TextToQuant skill (how to read a result honestly, when to stress-test, what bills credits):

bash
claude plugin marketplace add Youssef2784/texttoquant-claude-plugins
claude plugin install texttoquant@texttoquant

ChatGPT and other clients add the same URL by hand with the per client steps below.

Claude#

Add to Claude opens the Add custom connector dialog with the name and URL already filled in. Press Add, sign in with your TextToQuant account, and approve access.

To do it by hand instead: Settings → Connectors → Add custom connector, and set the URL to https://www.texttoquant.com/api/mcp.

If Claude asks for an OAuth Client ID

It normally does not. The server publishes a registration_endpoint, so a client registers itself and no ID is typed. If a client will not self-register, open Advanced and set the OAuth Client ID to 61cc842b-17d0-478b-b3c0-01ce58366fa0 (public, the same for every user) with the secret left empty.

ChatGPT#

ChatGPT reads remote MCP servers in developer mode (Plus, Pro, Business, Enterprise and Edu, on the web app).

  1. Settings → Connectors (Apps), open Advanced, and turn on Developer mode.
  2. Back in Connectors, create a connector: give it a name, set the MCP Server URL to https://www.texttoquant.com/api/mcp, and choose OAuth for authentication.
  3. Connect, sign in with your TextToQuant account, and approve.
  4. Start a chat, enable the connector, and ask it to run or show a backtest. In ChatGPT the show_* tools additionally render as an inline, interactive report widget.

Cursor#

  1. Cursor Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json for a global server, or .cursor/mcp.json inside one project).
  2. Add the remote server:
json
{
  "mcpServers": {
    "texttoquant": {
      "url": "https://www.texttoquant.com/api/mcp"
    }
  }
}
  1. The first time you use it, Cursor opens a browser OAuth flow: sign in with your TextToQuant account and approve. Cursor stores the credentials for you.

Grok#

Custom MCP connectors are on the paid plans, across web, iOS and Android.

  1. Go to grok.com/connectors and click New Connector, then Custom.
  2. Enter https://www.texttoquant.com/api/mcp and complete the sign in.

Mistral Le Chat#

Available on every plan, including free.

  1. Side panel → Intelligence → Connectors → + Add Connector.
  2. Open the Custom MCP Connector tab, enter the URL above, and authorize.

Gemini#

Gemini CLI: install the extension (one line, above) and run /mcp auth texttoquant to sign in. It is also listed in the Gemini CLI extensions gallery. The Gemini app has no custom-connector screen today; Gemini Enterprise admins add the server URL above through their connector settings.

Perplexity and Microsoft Copilot#

These have no consumer-facing custom-connector screen today. Perplexity supports MCP on its enterprise plans, and Copilot through Copilot Studio with admin setup. In each case the server URL is the same one above; only the place you paste it differs.

Other clients (Cline, VS Code, Zed and more)#

Add https://www.texttoquant.com/api/mcp as a remote MCP server and complete the OAuth sign in. A client that does not support remote OAuth connectors can use the downloadable server below with an API key: the public repo texttoquant-mcp carries the server file, a README, and an llms-install.md an agent such as Cline can follow on its own.

Where it is listed#

The Claude and ChatGPT directory listings, and the Docker MCP Catalog, are documented here as soon as they are live.

Tools#

The server covers the whole workflow (discover, author, run, read, refine, validate, and export) plus the market screener and portfolios. You never call these by name: ask in plain language and the agent picks the right tool. Everything runs on your plan, billing, and account.

Tools tagged bills 1 spend one backtest credit; everything else is a free read. You don't need to memorize the list, the agent can call describe_capabilities to learn what the platform supports and tools/list to see every tool's schema.

Discover & author#

ToolWhat it does
describe_capabilitiesThe platform's vocabulary (assets, timeframes, indicators, operators, exits, sizing) so the agent writes strategies that actually run
workspace_summaryA one-call "where was I" briefing: credits, recent runs with grades, indicators, live alerts
parse_strategyEnglish → structured query
explain_parseThe parsed strategy read back in plain English, confirm intent before spending a credit
rephrase_strategyRewrite a vague idea into clearer, parser-friendly phrasing (no invented parameters)
list_examplesBrowse the strategy gallery for a proven starting point (each card carries its author)

Run & read#

ToolWhat it does
run_backtestRun a strategy, bills 1, idempotency supported
edit_backtestFork a run with one change and re-run, keeping the iteration lineage, bills 1
cancel_backtestStop a queued run and refund its credit, if it hasn't started computing
list_backtestsFind runs server-side: filter by asset, timeframe, tag or text, sort by any metric
get_backtestOne run in full, by id
explain_gradeWhy the grade: the four scored pillars, weights and warnings, and what to improve
get_backtest_dataEquity, trades, candles, Monte Carlo, plus the entry/exit condition logs (why a signal fired, or never did)
compare_backtestsCompare 2-4 runs side by side as one chart
get_iterationsThe edit history of a strategy session, run by run
diff_iterationsCompare two runs: exactly which parsed-strategy fields changed and the metric deltas, "what did I change and did it help?"
organize_historyTag runs, rename iterations and sessions, keep history tidy
manage_webhooksPush instead of poll: signed HTTPS callbacks when runs finish

Refine by market regime#

ToolWhat it does
refine_contextRe-bucket a run's trades along different regime dimensions, no re-run, no credit
filter_by_contextRe-run entering only inside a chosen regime, to prove an edge is real, bills 1
get_context_tradesThe individual trades behind a regime, as evidence

Validate & stress-test#

ToolWhat it does
start_analysisSweep, grid, walk forward, multi asset, variants (generate + rank strategy twists), bills 1+
get_analysisPoll a job, or read the market-regime context insights
show_analysisRender sweep / heatmap / walk-forward / variants views
analyze_conditionsForward-outcome base rates for one entry condition, a filter probe, not a backtest
get_overfit_verdictThe Deflated Sharpe + PBO overfitting verdict for a run
get_regime_edgeThe Robustness "Edge by regime": per-regime P&L, win rate and a dependence verdict (Trend Up/Down, Quiet Range, Volatile Chop)

Custom indicators (Pine, JavaScript, Python or CSV)#

Indicators can be authored in four ways: a Pine script compiled through TradingView, JavaScript or Python run in an isolated sandbox against real bars, or precomputed values uploaded as CSV. list_indicators and get_indicator cover all of them; delete_indicator removes any saved indicator regardless of language.

ToolWhat it does
list_indicatorsYour saved custom indicators
get_indicatorOne indicator in full, including its source
validate_indicatorCompile-check a Pine script before saving
lint_indicatorOffline Pine diagnostics (quota-free)
preview_indicator, get_indicator_previewCompile and run a Pine indicator against real data, then poll the result
save_pine_indicatorCompile and save a Pine script
validate_js_indicatorCheck a JavaScript indicator's shape (INPUTS/PLOTS/calc) without running it, no bars loaded, instant and free
preview_js_indicatorCompile and run a JavaScript indicator against real bars and return the plotted series directly, saves nothing
save_js_indicatorAuthor an indicator in JavaScript and save it; run against real bars before anything is stored
validate_py_indicatorCheck a Python indicator's shape without running it, no bars loaded, instant and free
preview_py_indicatorCompile and run a Python indicator against real bars and return the plotted series directly, saves nothing
save_py_indicatorAuthor an indicator in Python and save it; same capability as save_js_indicator, numerically identical
save_csv_indicatorSave an indicator from precomputed values supplied as CSV text, for a series the platform can't compute itself
delete_indicatorRemove a saved indicator

A run that uses a saved indicator is stored the way the terminal writes it: the query text carries an @"Name" tag for every indicator the run resolved, and the row records which saved sheet each name bound to. Opening that run from History turns on My Indicators, attaches those sheets, and shows the tags in the query box, so it can be edited and re-run without retyping anything. Pass the names as customIndicatorHints to parse_strategy (or savedIndicatorMapping to run_backtest) and this happens automatically.

Export#

ToolWhat it does
export_pineTurn a strategy, or an existing run by id, into a TradingView Pine v6 script, with anything Pine can't express listed explicitly

Market screener (crypto)#

ToolWhat it does
scan_marketThe tradable universe with per-token strength scores and the top movers right now
market_regimeThe market's risk-on / mixed / risk-off verdict per timeframe
token_statsPer-token forward-outcome base rates for a signal
market_sectorsWhich crypto sectors are leading or lagging
rsps_matrixPairwise dominance for the top tokens (advanced)
saved_scansSave, list and delete your screener filters
list_scan_alerts, create_scan_alert, update_scan_alert, delete_scan_alert"Notify me when tokens match…" alerts: create, pause/resume or re-condition without deleting, and remove; delivered by Telegram or email (paid plans)
custom_benchmarkCorrelation and beta of the universe vs a benchmark you choose
token_multitfOne token's recent OHLCV + multi-timeframe screener rows
get_candles, list_marketsRaw OHLCV for any symbol/timeframe, and the tradable market universe
run_profiler, get_profilerPerfect Token Profiler: what the top movers looked like before they ran

Portfolios#

ToolWhat it does
parse_portfolioSplit a multi-asset prompt into per-asset strategies
run_portfolioRun a shared-capital multi-asset portfolio, bills one per asset
list_portfoliosYour saved book runs, newest first, find one you ran earlier (the durable run id)
get_portfolioPoll a portfolio run
show_portfolioRender a completed book's report in chat: metric strip, equity + drawdown vs an equal-weight basket, per-asset attribution
get_portfolio_analysisA completed book's analysis: grade, per-asset attribution, benchmark, Monte Carlo, walk-forward & out-of-sample
run_portfolio_sweep, get_portfolio_sweepRe-run a book across 2-5 values of one knob to test robustness, bills K×N (K values × N assets), idempotency supported
cancel_portfolio_sweepStop a running sweep, every not-yet-run book is refunded
share_portfolioMint / revoke a portfolio run's share link

Present & share#

ToolWhat it does
show_backtestRender a run's report in chat
show_contextRender the market-regime dashboard
share_backtestMint / revoke a share link
publish_to_galleryList (or unlist) one of your shared runs in the public showcase gallery list_examples reads from
get_usagePlan tier and credits left
get_plansTiers, current pricing, feature/limit deltas and the upgrade URL, what the next tier costs and unlocks when you hit a wall
get_notification_channelsWhich channels (Telegram/email) will deliver alerts, plus the setup link to connect one
Interactive views in the conversation

Tool results are HTML-first: on clients that render inline HTML (ChatGPT today, more as they adopt the MCP Apps standard) the show_* tools and the data tools above return a fully interactive TTQ-dark dashboard: price candles with entry/exit markers, equity & drawdown, Monte Carlo, regime rankings, attribution bars, verdict banners and sortable tables. On clients that don't yet render HTML (Claude's connector today) the same tools automatically fall back to chart images + text, so nothing breaks. The moment a client declares HTML support it gets the interactive views with no change on your side. Ask the agent to “show my last backtest”, then ask for a share link to open the full report in any browser.

Live progress while running

Clients that pass an MCP progressToken (Claude and others) receive real notifications/progress events during run_backtest: stage and percent streamed as the worker executes. Scripted REST callers get the same via wait: false + GET /v1/backtests/:id/status.

New to the portfolio tools? parse_portfolio and run_portfolio drive a shared capital, multi asset book. See the Portfolios reference for how capital, contention and the book report work.

Resources#

Beyond tools, the server exposes your data as MCP resources, so a capable client can pull a run or indicator straight into context (an @ mention, an attach menu) without a tool call:

URIWhat it returns
backtest://{id}A saved run as JSON: summary metrics, grade, effective parameters, honesty flags
indicator://{name}A saved custom indicator: metadata, plot names, and its Pine source
docs://{slug}The platform's interpretation doctrine (metrics, robustness, grading), so the agent reads results TextToQuant's way, honesty rules included

resources/list returns your recent runs and indicators (cursor paginated) and resources/templates/list advertises both URI shapes, so a client can construct a link to any run or indicator you own. Everything is scoped to your account.

Protocol support#

The hosted server is a full MCP resource server over the streamable HTTP transport, so capable clients get the whole protocol surface, not just tool calls:

  • Cancellation: cancel an in-flight tool call; a queued backtest is stopped and its credit refunded.
  • Resumable progress: a dropped run_backtest stream reconnects with Last-Event-ID and replays the events it missed, then keeps following the run on any server instance.
  • Argument completion: completion/complete autocompletes backtest ids and indicator names as you type.
  • Resource subscriptions & list-changed notifications, and logging (logging/setLevelnotifications/message), for clients that implement them.
  • Least-privilege scopes: the server enforces coarse mcp:read / mcp:run / mcp:write scopes per tool when a token carries them, so a connection can grant an agent read-only or no-spend access. The OAuth flow itself requests only openid email.
Confirm before spending

When enabled on the server, clients that support MCP elicitation are asked to confirm the credit spend before a billed tool (run_backtest, edit_backtest, filter_by_context, run_portfolio, start_analysis) actually runs, a human-in-the-loop check on top of your plan limit and the per-agent daily spend cap.

Downloadable server#

Prefer to run the server yourself, or use a local MCP client? Download it and point your agent config at it with your API key. The download is built from the same code as the hosted server, so it carries the full tool surface above (the previous 4-tool build stays at /api/v1/mcp-server-legacy.mjs).

bash
curl -o ttq-mcp.mjs https://www.texttoquant.com/api/v1/mcp-server.mjs
# or clone it, with a README and llms-install.md an agent can follow:
git clone https://github.com/Youssef2784/texttoquant-mcp
json
{
  "mcpServers": {
    "texttoquant": {
      "command": "node",
      "args": ["/path/to/ttq-mcp.mjs"],
      "env": {
        "TTQ_API_KEY": "ttq_...",
        "TTQ_API_BASE": "https://www.texttoquant.com/api"
      }
    }
  }
}

The API keys page has this config ready to copy, prefilled with your key.

Prefer calling the API directly? See the REST endpoints.