AI agents & MCP

Build with your own agent

Trigr exposes one remote MCP server for ChatGPT, Claude, Codex, Claude Code, and other compatible agents. It uses a browser-authorized, revocable credential, works from the canonical capability catalog, and saves drafts and publishes eligible immutable versions from the same account you monitor in Studio.

Pair trade and Basket strategies

Pair trade (mode value spread) trades 2-10 crypto perpetual markets together as one position; a pair has two legs. It opens on the gap between markets that move together (gap reversion, the default) or on a signal: one ordinary TRIGGER plus optional FILTERs read on the first asset (entrySource: signal on the decision node) open and close the whole pair, with the hedge sizing the owner chose (beta-neutral, dollar-neutral 1:1 or custom weights; there is no default). modeContracts lists both entry sources. Basket ranks those markets by one score, buys one end of the ranking and optionally shorts the other. Which end is long depends on the score: the highest for momentum, roc, macd, ma_dist, oi_change, cvd and taker_delta; the lowest for rsi (most oversold), volatility (calmest), funding (carry), lsr (least crowded long) and liq_imbalance. Use mode spread or basket, ordered assets and a 1H, 4H or 1D timeframe. Search modeContracts for node parameters and trigr_get_recipes for spread and basket examples. Validate, create, edit and backtest use the same graph contract as Studio.

trigr_get_data_coverage accepts assets instead of asset and returns each leg plus common OHLCV windows; an unknown intersection is null. Each backtest costs 50 + 10 * (assets - 2) credits. Results count group trades and identify individual legs separately. Iterate labelled experiments on the same mode, asset set and timeframe. Pair trade and Basket publication, condition diagnosis, ML optimization and Agent mixes are unavailable on this version; walk-forward runs on them like on a single-asset strategy. Each deploys as its own solo Agent once enabled.

A Pair trade that opens on a signal deploys the same way. Its agent reads the entry signal on the first asset at the same bar closes as its backtest, keeps the hedge sizing it opened with, and closes every leg on any pair exit. Each entry node must be one an Agent can run live; otherwise trigr_create_agent refuses it with MULTI_ASSET_SOLO, reason signalEntryNotLive, which says why; a check that could not run answers EXECUTION_CAPABILITIES_UNREACHABLE: retry.

Connect

Point your client at https://trigr.xyz/mcp, then authorize it in your browser with your Trigr account. The browser flow creates a revocable MCP credential automatically; you do not need to copy an API key. MCP access is available on every plan; saved-strategy and credit limits still apply. The guided setup page is available under /connect-agent. During authorization, choose whether the connection should ask before each consequential action or run autonomously. You can change that per connection later at /settings/agent-access/permissions.

Codex
codex mcp add trigr --url https://trigr.xyz/mcp
codex mcp login trigr
codex mcp get trigr --json
Claude Code
claude mcp add --transport http --scope user trigr https://trigr.xyz/mcp
claude
# Inside Claude Code: /mcp → Trigr → Authenticate
ChatGPT
ChatGPT web → Settings → Security and login → Developer mode (on)
ChatGPT Plugins → + → create a developer-mode app
Paste https://trigr.xyz/mcp → OAuth

OpenAI documents developer mode for Pro, Plus, Business, Enterprise and Education accounts on the web; workspace plans may also need an admin to allow it. Menus change often, so follow OpenAI's developer mode guide if these steps differ.

Claude
Claude → Customize → Connectors → + → Add custom connector
Paste https://trigr.xyz/mcp → Add → Connect

Claude supports remote custom connectors on Free, Pro, Max, Team, and Enterprise. Free accounts are limited to one custom connector; Team and Enterprise owners add Trigr for their organization before members connect.

MCP clients load Trigr's tool list when they connect and keep it. After a Trigr update, reconnect or refresh the Trigr MCP server in your client to load new tools and schema changes (in Claude Code: /mcp → Trigr → Reconnect; elsewhere, reconnect the connector or restart the app). Every tool result carries mcpCatalog, the tool catalog the server serves now, and a connection opened before an update is told to reconnect in mcpNotice.

Start with account context

In ChatGPT, Claude, or Codex, ask: Use Trigr to build a strategy. In Claude Code, the server's reusable prompts are exposed as commands, including /mcp__trigr__build_strategy, /mcp__trigr__improve_strategy, and /mcp__trigr__research_marketplace.

Each workflow starts by checking the authenticated owner's plan, credits, strategy quota, saved strategies, trading-agent summaries, and linked strategy slots. It then searches the catalog before proposing work.

What the agent can do

  • Search exact assets, timeframes, node families, graph stages, indicator ids, API data-source ids, AI Sim configuration, Smart Money nodes, parameter schemas, and availability. Search is ranked keyword search with synonyms ("moving average cross", "MA", "OI", "bollinger bands"), and each indicator or data source comes back with its allowed condition values and a ready-to-insert example node.
  • Start from a recipe: trigr_get_recipes returns 22 validated, executable strategy graphs (MA cross, Donchian breakout with ATR trail, RSI and Bollinger mean reversion, funding contrarian, liquidation reversal, multi-timeframe, cross-asset, time-of-day, regime overlay, score confluence, macro filter and more), each with notes on what to vary as experiments. A recipe is a structure to adapt and backtest, not a validated edge.
  • Validate a graph for free before saving or backtesting it. trigr_validate_graph runs the same checks as an MCP save and the checks an MCP backtest applies before charging, without saving, running, or asking for approval. It returns every error with its node or field and a suggested fix, a plain-English reading of the graph, whether it can run as a backtest, a paper track, or an agent, and an indicator warm-up estimate. The engine still validates the graph during the backtest; a refused run is not charged.
  • Find out why a strategy trades too little, for free. trigr_diagnose_strategy is Studio's pass-rate diagnostic: each condition's pass rate, the single condition that blocks the most entries, and one proposed relaxation to test as an experiment. It covers crypto markets with indicator conditions.
  • Search marketplace metadata and verified statistics. Marketplace recipes remain private.
  • Read owner-scoped subscription status, credits, points, plan quotas, existing strategies, and trading-agent summaries. API secrets, exchange credentials, signing keys, and private risk configuration are never returned.
  • Run credit-metered point-in-time backtests and asynchronous ML optimization, then poll the result. Read any ML optimization you ran, including ones started in Studio's Optimize with ML panel: list a strategy's optimizations, then read the held-out test, robustness checks, and suggestion cards (graph changes vs research notes) without screenshots. Pass the matching owned strategy id to keep completed runs in that strategy's Studio history. Backtests are gross (fees only) unless the agent adds the same execution costs as Studio's Results → Frictions panel: a flat slippage in basis points per side, and perp funding (real historical funding, or a flat rate per 8 hours). The costs are part of the approved action, and the result reports what they cost.
  • Re-read stored runs for free, including runs you made in Studio: each listed run shows the settings it used (risk, builder fee, slippage and funding), and any run's full trade list (entry and exit times, prices, side, size, return, P&L and exit reason) can be paged through without re-running it.
  • Validate and save a new graph draft, list and inspect existing drafts, and rename or replace an owned graph using its current recipe hash so concurrent changes fail safely. Each save, graph edit, and completed backtest says whether the graph can run forward (on the marketplace paper track and in an Agent) and names any backtest-only node and the rule it breaks.
  • Publish or republish an eligible owned strategy as an immutable public marketplace version. The action must include the current recipeHash; ownership, email, paid-plan, graph, venue-provenance, and stored verified full-history backtest gates remain active, and publication never starts hidden compute. A strategy whose final exam is still sealed is published only after trigr_take_final_exam has taken it, once, whatever the verdict.
  • Build agents of up to 52 strategies, one per asset: trigr_suggest_agent_lineup proposes the best Trigr Official strategy for each asset, trigr_run_agent_backtest runs the combined backtest of any mix (the builder preview: combined and per-strategy results, entries skipped for lack of free margin, the Equal / By Sharpe / Inverse vol allocations; 50 credits like a Studio backtest, and the same mix is free again that day; pass propChallenge to replay a Propr challenge on the combined curve), and trigr_create_agent creates it as a PAPER agent in PAUSED state with a fixed $10,000 starting balance: the tool takes no capital, and a capital an older client sends is ignored. Each allocation is the share of equity a strategy may use; an entry's margin is equity × allocation × the strategy's own RISK size, allocations may sum past 100%, and the list order decides which strategy enters first when margin is short. Minimum checks require an existing execution account. Minimum warnings do not block saving. Edit an owned agent's name or safe paused state, or replace a PAPER agent's strategies and allocations, with trigr_edit_agent; start a PAPER agent with trigr_start_agent and pause any owned agent with trigr_pause_agent (each after its own approval); delete an owned strategy. Starting a Hyperliquid or Propr agent, changing a Hyperliquid or Propr agent's strategies, Propr challenge plans, and editing secrets or exchange credentials stay in the Trigr app. Agent slots bind immutable logic: use the current recipeHash from your strategy list for an owned draft, or the pinnedVersionId returned by marketplace search.

Iterate with experiments, not new strategies

An agent can build as many strategies as your plan allows, one per genuinely different idea. Variants of the same idea belong inside that one strategy as versioned experiments, the same way the Studio Copilot works (Experiment 1, 2, 3…), so they stay comparable in one history and do not use up your strategy quota.

  • Create once. Save the idea with trigr_create_strategy and keep its strategyId. If you already have a strategy on the same mode, asset set and timeframe, the tool saves nothing and returns that strategy to iterate on instead (ITERATE_EXISTING); an agent passes newStrategy: true only when you ask for a separate strategy or the idea is genuinely different.
  • Run each variant as an experiment. Call trigr_run_backtest with that strategyId and an experimentLabel such as "Exp 3: ATR trail 2.5x". The variant graph may differ from the saved recipe. Its result is recorded in the strategy's version history in Studio, and it never replaces the saved recipe or its current verified statistics. A different market, timeframe, or signal family is a new idea; changing parameters, filters, exits, or sizing is an experiment.
  • Or run several at once. trigr_run_backtest_batch runs up to 10 labelled experiments of one strategy under a single approval. You approve the exact variant set and a credit cap (maxCredits, 50 credits per completed run); the approval cannot run any other graph, more variants, or a higher cap, and it is used once. Variants run one after another, each stored like a single experiment under <requestId>.<content digest>; failed runs are free, and a variant that would exceed the cap is skipped, not run. Re-send skipped variants under the same requestId: a finished one comes back already_settled and is never charged twice. Variants run one after another, so an assistant whose tool calls time out after about a minute should send 3–4 per call.
  • Sweep parameters with walk-forward. To choose between parameter values (single-asset, Pair trade or Basket), add walkForward: { folds: 3–6, anchored: true, window } to the batch. Each fold picks the variant with the best in-sample Sharpe using only the bars before it, then scores that pick on the next segment; the result stitches those out-of-sample scores and says how often the same variant won (selection stability). It costs one run per variant per fold, shown to the approver; each variant counts as one try for the whole walk-forward (10 variants × 6 folds is 10 tries, not 60), and it counts as one MCP request per variant against the per-minute limit, not one per run. A window that starts before the data, or whose indicator warm-up would use more than a quarter of the first fold, is refused before anything is charged, with the earliest valid start. Judge on the stitched out-of-sample result, never on the best full-history variant. A Pair trade or Basket runs the same folds: each fold run splits at the fold date, the coverage check reads every leg, and its warm-up is its own lookbacks (hedge and z window, beta sizing, rank lookback).
  • Compare. trigr_get_backtest_result lists the strategy's most recent runs (up to 20 per call) with each run's label, experiment flag, settings, and isSavedRecipe; trigr_get_backtest_trades pages through any run's trades. Copilot experiments on the same strategy appear in the same list.
  • Promote the winner. Save it with trigr_edit_strategy (pass the current recipeHash as expectedRecipeHash). That clears stale statistics; if trigr_list_my_strategies then shows none for the new recipe, run one backtest without a label to record them.

On a strategy that trades both sides, directional filters such as funding are mirrored for shorts and, under exit on flip, a failing filter can close a trade. Read how filters behave on two-sided strategies before reading a long-only result as an edge.

Without an experimentLabel, a backtest that names a strategyId must match that strategy's saved recipe exactly (otherwise STRATEGY_GRAPH_STALE); that run is the one that sets its verified statistics. A bounded-window run with a strategyId is stored in version history too, labelled with its window, but never sets the verified statistics.

Read your agents

Four free, read-only tools answer "how is my agent doing" from the agent's real record, not a backtest. They need no approval and read only agents of the connected account: another owner's agent id answers NOT_FOUND, exactly like a missing one. Money values are decimal strings: totals are exact, and amounts on a single position or trade are rounded for display (USD to cents, prices and sizes to 8 significant digits). A section Trigr could not read comes back with status: "unavailable" and a reason, and its counts are null; it is never reported as zero.

  • trigr_get_agent_status (agentId): running or paused, whether execution holds new entries, venue, mode (paper: simulated by Trigr; live: real money on Hyperliquid or a live Propr challenge; propr_beta: Propr's beta environment), the account (Hyperliquid address, Propr challenge, or paper), capital, the portfolio risk guard, each strategy slot with its allocation and resolved TP/SL, leverage and sizing, the health message, and the last decision and last failed decision.
  • trigr_get_agent_performance (agentId, window: 7d, 30d (default) or all): realized P&L of trades closed in the window, net of trading, builder and funding fees; win rate and trade count; unrealized P&L and exposure of positions open now; return and max drawdown of the agent's equity curve over the window; and the same figures per strategy slot. Strategy rows include removed slots and an "unattributed" row, so they add up exactly to the agent totals. Return and drawdown answer capital_changed rather than a figure when they would rest on equity points recorded before the agent's current capital.
  • trigr_get_agent_positions (agentId): each open position's market, side, size, entry and mark price, unrealized P&L, notional, leverage, liquidation price and its strategy slot, as arrays in the order of positions.columns. Take-profit and stop-loss prices appear when set; null means none is set, which is normal.
  • trigr_get_agent_trades (agentId, optional cursor, limit up to 50 (default 20), slotId, strategyId, market): closed trades, newest first, with entry and exit price, net realized P&L, return on margin and close reason. Pass page.nextCursor back as cursor. A cursor stays on the history snapshot of its first page, so trades that close while you page do not shift later pages; start again without a cursor to see them. A close recorded late, with an earlier close time, can still appear on a later page or be skipped. A filtered page can hold fewer rows while hasMore is true: keep paging.
Example: which strategy is losing this week?
→ trigr_get_agent_performance { "agentId": "cm9…", "window": "7d" }
← {
  "mode": "live", "venue": "HL", "status": "RUNNING",
  "realized": { "status": "ok", "realizedPnlUsd": "-42.18", "closedTrades": 31,
                "wins": 14, "winRatePct": "45.16", "unknownNetTrades": 0 },
  "open": { "status": "ok", "unrealizedPnlUsd": "12.5", "openPositions": 3,
            "exposureUsd": "2450.75" },
  "totalPnlUsd": "-29.68",
  "equity": { "status": "ok", "returnPct": "-1.21", "maxDrawdownPct": "2.04", … },
  "strategies": [
    { "slotId": "cs1…", "strategyName": "ETH breakout", "market": "ETH",
      "realizedPnlUsd": "-61.02", "closedTrades": 12, "winRatePct": "25.00",
      "unrealizedPnlUsd": "4.1", "totalPnlUsd": "-56.92", … },
    …
  ],
  "attribution": { "reconciles": true, "truncated": false }
}
→ trigr_get_agent_trades { "agentId": "cm9…", "slotId": "cs1…", "limit": 20 }

Research without spending the holdout

The reusable research prompt follows a selection-then-validation protocol. Before inspecting candidates, define the market, costs, maximum trial count, ranking metric, minimum evidence, and the boundary between research data and a later holdout.

  • Research first. Compare and tune candidates only on the earlier research period. Rank risk-adjusted evidence such as DSR, drawdown, trade count, stability, and diversification, not the highest return alone.
  • Freeze one winner. Record the exact graph or immutable marketplace version and its cost assumptions before looking at the holdout. Do not replace it with the runner-up after seeing the result.
  • Evaluate once. Run that unchanged winner on the untouched later period and report research and holdout results side-by-side, including degradation and the pre-registered pass/fail criteria.
  • Do not recycle a failed holdout. A failure rejects the candidate. Do not retune against the same period; that turns it into research data. Another honest test needs new future data or a newly reserved holdout.
  • Report the tries. Every backtest of an owned strategy returns tries, the number of distinct variants tested so far across all your strategies on the same assets and timeframe (from Studio, Copilot, MCP, the API and ML optimization), with triesIsLowerBound when part of that count is missing (older history was pruned, or not read yet). The more variants tried, the more likely the best one is luck: quote the count with any winner.
  • Report the overfit risk. Every backtest result carries robustness.overfitRisk (low, medium or high) with plain-words reasons, the Sharpe luck alone could reach after that many tries (luckSharpe) and the chance the edge is real (deflatedSharpeProb), the same badge Studio shows. Never recommend a high-risk variant, and give the level and its top reason with any result you report. A variant whose overfit risk is high is never the winner, whatever its full-history figures. Change the strategy, never the measurement: do not move, shrink or disable the out-of-sample split, drop the strategy id, or open a new strategy to reset tries (one on the same assets and timeframe keeps the count); every variant aimed at the badge is one more try. Low means no red flags were found, not that the strategy works.
  • Judge after costs. A strategy result may carry net: the same run after default slippage by liquidity tier and real funding of the traded venue. When its status is ok, or partial with every partialReasons[].retryable false, compare and report variants on net.returnPct and net.sharpe (“+11.4% after costs, +12.9% before”) and name any cost listed in partialReasons; otherwise use the headline and say costs are not settled yet. Older runs have no net: say slippage and funding may be missing from their figures.
  • Respect the final exam. A strategy created since the final exam was introduced keeps its most recent months sealed for one final exam: every result of it carries finalExam, and while its status is sealed each backtest stops at finalExam.sealFrom. Iterate up to the seal, report figures as “up to” that date, and never backtest the recipe without its strategyId to look past it. Call trigr_take_final_exam once, only when the owner says the recipe is final and finalExam.status is sealed with inProgress false, and quote its verdict as it is. A failed exam makes every recipe of the strategy High; a passed one lowers Medium to Low only for the exact recipe that took it (exam.matchesRecipe: true).

Stress tests

Stress-test a saved backtest with trigr_quote_stress_test. Show its total credit quote, then approve trigr_run_stress_test with that exact test ID and maximum (maxCredits equal to creditsQuoted). trigr_get_stress_test reads progress; advance: true continues the already approved plan, and cancel: true stops unstarted checks. Monte Carlo is free; random entries and each comparison run cost at most 50 credits. Failed or skipped checks cost nothing. Results cover trade-order risk, higher costs, nearby settings, random entries and correlated markets. Checks respect the final-exam seal and never replace verified statistics. Comparison runs are robustness checks, not tries: they never add to tries or the luck-adjusted Sharpe. A stopped test can be quoted again for the same backtest. A pass means no red flags were found, not that a strategy works.

Refusals: STRESS_UNAVAILABLE: read message; “cannot be reached right now” is temporary, retry in a minute; otherwise the backtester does not offer stress tests yet and nothing runs. STRESS_REQUOTE: fees or permissions changed, quote again. STRESS_EXAM_SEALED: pick a run from before finalExam.sealFrom. STRESS_BUSY: another request is quoting or stopping the test, retry shortly. STRESS_CONFIRM_PRICE: maxCredits is not the quote, or a quoted test was advanced before it was started. INSUFFICIENT_CREDITS (402, with needed and balance): add credits. These are checked before the run's approval is created and again before it is used. STRESS_SERVICE_RETRY, STRESS_VARIANT_RETRY and STRESS_RETRY (503): the started test is saved; continue it with advance: true shortly, and no completed check is charged twice. STRESS_SETTLEMENT_PENDING: a check is dispatched or unsettled, so advance it before cancel: true.

Saved-strategy limits

The cap applies to the whole account across Studio, REST, and MCP. Existing strategies are never deleted when a plan changes; new creation pauses until the account is below its cap.

PlanSaved strategies
Free10
Trader100
Pro500

Backtests and ML optimization keep their normal credit and concurrency controls even when the model itself runs in your own agent.

Authority & safety

  • Explicit publication. MCP can save drafts, create paused PAPER agents, publish eligible immutable strategy versions, and delist owned strategies without deleting version history. Publish and unpublish use a single-use authorization bound to the exact strategy id and current recipe hash. MCP can start a PAPER agent (simulated money) after its own approval; it cannot start a Hyperliquid or Propr agent, place a live trade, or withdraw funds.
  • Owner siloing. A key can read and write only its owner's private strategies and optimization jobs, and can read only that owner's account and agent summaries.
  • Server validation. Graph limits, semantic checks, disabled sources, billing, and plan quotas are enforced server-side.