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:
claude mcp add --transport http --scope user texttoquant https://www.texttoquant.com/api/mcpThen 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):
grok mcp add --transport http texttoquant https://www.texttoquant.com/api/mcpGemini CLI installs the TextToQuant extension, which wraps the same server plus a briefing the agent reads:
gemini extensions install https://github.com/Youssef2784/texttoquant-gemini-extensionThen 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):
claude plugin marketplace add Youssef2784/texttoquant-claude-plugins
claude plugin install texttoquant@texttoquantChatGPT 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.
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).
- Settings → Connectors (Apps), open Advanced, and turn on Developer mode.
- 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. - Connect, sign in with your TextToQuant account, and approve.
- 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#
- Cursor Settings → MCP → Add new MCP server (or edit
~/.cursor/mcp.jsonfor a global server, or.cursor/mcp.jsoninside one project). - Add the remote server:
{
"mcpServers": {
"texttoquant": {
"url": "https://www.texttoquant.com/api/mcp"
}
}
}- 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.
- Go to grok.com/connectors and click New Connector, then Custom.
- Enter
https://www.texttoquant.com/api/mcpand complete the sign in.
Mistral Le Chat#
Available on every plan, including free.
- Side panel → Intelligence → Connectors → + Add Connector.
- 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#
- Official MCP Registry:
com.texttoquant/texttoquantat registry.modelcontextprotocol.io, which feeds the GitHub MCP registry, VS Code and other catalogs. - Gemini CLI extensions gallery: texttoquant-gemini-extension.
- Claude Code plugin marketplace: texttoquant-claude-plugins.
- Cursor plugin: texttoquant-cursor-plugin (server plus skill).
- Public server repo: texttoquant-mcp (downloadable server,
llms-install.md).
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#
| Tool | What it does |
|---|---|
describe_capabilities | The platform's vocabulary (assets, timeframes, indicators, operators, exits, sizing) so the agent writes strategies that actually run |
workspace_summary | A one-call "where was I" briefing: credits, recent runs with grades, indicators, live alerts |
parse_strategy | English → structured query |
explain_parse | The parsed strategy read back in plain English, confirm intent before spending a credit |
rephrase_strategy | Rewrite a vague idea into clearer, parser-friendly phrasing (no invented parameters) |
list_examples | Browse the strategy gallery for a proven starting point (each card carries its author) |
Run & read#
| Tool | What it does |
|---|---|
run_backtest | Run a strategy, bills 1, idempotency supported |
edit_backtest | Fork a run with one change and re-run, keeping the iteration lineage, bills 1 |
cancel_backtest | Stop a queued run and refund its credit, if it hasn't started computing |
list_backtests | Find runs server-side: filter by asset, timeframe, tag or text, sort by any metric |
get_backtest | One run in full, by id |
explain_grade | Why the grade: the four scored pillars, weights and warnings, and what to improve |
get_backtest_data | Equity, trades, candles, Monte Carlo, plus the entry/exit condition logs (why a signal fired, or never did) |
compare_backtests | Compare 2-4 runs side by side as one chart |
get_iterations | The edit history of a strategy session, run by run |
diff_iterations | Compare two runs: exactly which parsed-strategy fields changed and the metric deltas, "what did I change and did it help?" |
organize_history | Tag runs, rename iterations and sessions, keep history tidy |
manage_webhooks | Push instead of poll: signed HTTPS callbacks when runs finish |
Refine by market regime#
| Tool | What it does |
|---|---|
refine_context | Re-bucket a run's trades along different regime dimensions, no re-run, no credit |
filter_by_context | Re-run entering only inside a chosen regime, to prove an edge is real, bills 1 |
get_context_trades | The individual trades behind a regime, as evidence |
Validate & stress-test#
| Tool | What it does |
|---|---|
start_analysis | Sweep, grid, walk forward, multi asset, variants (generate + rank strategy twists), bills 1+ |
get_analysis | Poll a job, or read the market-regime context insights |
show_analysis | Render sweep / heatmap / walk-forward / variants views |
analyze_conditions | Forward-outcome base rates for one entry condition, a filter probe, not a backtest |
get_overfit_verdict | The Deflated Sharpe + PBO overfitting verdict for a run |
get_regime_edge | The 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.
| Tool | What it does |
|---|---|
list_indicators | Your saved custom indicators |
get_indicator | One indicator in full, including its source |
validate_indicator | Compile-check a Pine script before saving |
lint_indicator | Offline Pine diagnostics (quota-free) |
preview_indicator, get_indicator_preview | Compile and run a Pine indicator against real data, then poll the result |
save_pine_indicator | Compile and save a Pine script |
validate_js_indicator | Check a JavaScript indicator's shape (INPUTS/PLOTS/calc) without running it, no bars loaded, instant and free |
preview_js_indicator | Compile and run a JavaScript indicator against real bars and return the plotted series directly, saves nothing |
save_js_indicator | Author an indicator in JavaScript and save it; run against real bars before anything is stored |
validate_py_indicator | Check a Python indicator's shape without running it, no bars loaded, instant and free |
preview_py_indicator | Compile and run a Python indicator against real bars and return the plotted series directly, saves nothing |
save_py_indicator | Author an indicator in Python and save it; same capability as save_js_indicator, numerically identical |
save_csv_indicator | Save an indicator from precomputed values supplied as CSV text, for a series the platform can't compute itself |
delete_indicator | Remove 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#
| Tool | What it does |
|---|---|
export_pine | Turn 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)#
| Tool | What it does |
|---|---|
scan_market | The tradable universe with per-token strength scores and the top movers right now |
market_regime | The market's risk-on / mixed / risk-off verdict per timeframe |
token_stats | Per-token forward-outcome base rates for a signal |
market_sectors | Which crypto sectors are leading or lagging |
rsps_matrix | Pairwise dominance for the top tokens (advanced) |
saved_scans | Save, 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_benchmark | Correlation and beta of the universe vs a benchmark you choose |
token_multitf | One token's recent OHLCV + multi-timeframe screener rows |
get_candles, list_markets | Raw OHLCV for any symbol/timeframe, and the tradable market universe |
run_profiler, get_profiler | Perfect Token Profiler: what the top movers looked like before they ran |
Portfolios#
| Tool | What it does |
|---|---|
parse_portfolio | Split a multi-asset prompt into per-asset strategies |
run_portfolio | Run a shared-capital multi-asset portfolio, bills one per asset |
list_portfolios | Your saved book runs, newest first, find one you ran earlier (the durable run id) |
get_portfolio | Poll a portfolio run |
show_portfolio | Render a completed book's report in chat: metric strip, equity + drawdown vs an equal-weight basket, per-asset attribution |
get_portfolio_analysis | A completed book's analysis: grade, per-asset attribution, benchmark, Monte Carlo, walk-forward & out-of-sample |
run_portfolio_sweep, get_portfolio_sweep | Re-run a book across 2-5 values of one knob to test robustness, bills K×N (K values × N assets), idempotency supported |
cancel_portfolio_sweep | Stop a running sweep, every not-yet-run book is refunded |
share_portfolio | Mint / revoke a portfolio run's share link |
Present & share#
| Tool | What it does |
|---|---|
show_backtest | Render a run's report in chat |
show_context | Render the market-regime dashboard |
share_backtest | Mint / revoke a share link |
publish_to_gallery | List (or unlist) one of your shared runs in the public showcase gallery list_examples reads from |
get_usage | Plan tier and credits left |
get_plans | Tiers, current pricing, feature/limit deltas and the upgrade URL, what the next tier costs and unlocks when you hit a wall |
get_notification_channels | Which channels (Telegram/email) will deliver alerts, plus the setup link to connect one |
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.
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:
| URI | What 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_backteststream reconnects withLast-Event-IDand replays the events it missed, then keeps following the run on any server instance. - Argument completion:
completion/completeautocompletes backtest ids and indicator names as you type. - Resource subscriptions & list-changed notifications, and logging (
logging/setLevel→notifications/message), for clients that implement them. - Least-privilege scopes: the server enforces coarse
mcp:read/mcp:run/mcp:writescopes 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 onlyopenid email.
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).
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{
"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.