Neural API Reference
Documentation for the rlx-search engine and MCP orchestration.
Model Context Protocol
The MCP Server acts as a semantic gateway, exposing the full ai_patterns analysis surface to remote AI agents and internal swarm orchestration.
Transport Protocols
Best for local development and direct integration with VS Code or Claude Desktop.
Production-grade endpoint for distributed agentic swarms via Nginx reverse-proxy.
Live Tool Registry
General
pattern_searchmcpSearch for similar historical price patterns in the RLX database.
search_by_sketchmcpSearch for historical patterns similar to a custom 'sketched' price trajectory (Sketch-to-Search). Useful when you want to find matches for a hypothetical or hand-drawn pattern.
get_pattern_metricsmcpRetrieve advanced statistical metrics and forecast distributions for a pattern search result.
get_grid_statsmcpCalculate optimal grid trading levels, confidence, and risk profiles based on pattern analysis.
get_trading_decisionmcpReturn a compact trader decision card for a symbol/interval: TRADEABLE, WATCH, or SKIP with direction, confidence, evidence, risk, reasons, and caveats.
get_index_healthmcpOperator tool: inspect ANN index progress, lag, vector counts, and coverage for a symbol/interval/q.
rebuild_pattern_indexmcpOperator tool: rebuild the ANN pattern index for a symbol/interval/q so search quality can recover after stale or expanded history.
warm_symbol_contextmcpOperator tool: refresh series and prewarm ANN indexes for multiple q values before a live trading session.
append_private_memory_rowsmcpAppend or upsert candle rows into an existing private memory dataset so agents can keep memory fresh without full re-import.
search_private_memorymcpRun analog search and forecast against a private memory dataset instead of the shared public symbol universe. Use this when an agent or trader uploads their own candles and wants historical context before deciding whether to validate the idea in RLXBT.
forecast_private_memorymcpRun a dataset-scoped private-memory search and return a compact forecast card with direction, execution posture, evidence, and top analogues. This is the memory/intelligence step before a fast RLXBT proof run on the same thesis.
forecast_private_memory_from_datamcpCreate or reuse a private dataset, import candle data, and return a compact forecast card in one call. Ideal for users who want to upload exchange or ML-derived candle history, inspect analogues immediately, and only then decide whether to run RLXBT.
get_rlxbt_statusmcpInspect whether the external RLXBT daemon is reachable and return its health payload. This wraps the daemon health contract (typically GET /api/health) and is the first call an agent should make before requesting proof backtests.
get_training_episodesmcpRetrieve historical RL episodes for training context or audit.
get_bar_momentummcpCurrent intrabar statistics for BTCUSDT. Shows how much % the price moved from open to now, and compares it with expected volatility.
intrabar_momentum_probmcpCalculate an intrabar-adjusted probability for Polymarket 5m/15m markets. Incorporates the current bar's momentum to improve prediction accuracy when time-to-close is short.
resolve_live_trade_outcomemcpResolve a previously logged live Polymarket market after expiry so calibration stats can measure real decision quality.
compare_current_to_past_casemcpCompare the current Polymarket setup against a selected historical analogue case. Returns the full live probability snapshot plus one chosen precedent and a structured comparison summary.
explain_pattern_matchmcpExplain why the current Polymarket setup matches or differs from a selected historical analogue. Returns structured `whyMatched` and `whyDifferent` explanations alongside the selected case.
get_calibration_statsmcpRetrieve calibration statistics for VBRL Polymarket probability predictions: Brier score, log loss, calibration buckets (predicted vs realized frequency), YES signal win rate. Use to validate model accuracy over time.
get_api_guidemcpReturns the full documentation and workflow guide for this MCP server. Call this first to understand all available tools, their use cases, and how to combine them. Includes: tool catalog, recommended workflows for Polymarket research, historical analog analysis, and example calls.
find_market_analogsmcpFind historical price patterns similar to the current (or specified) market state. Returns a list of past dates when the same pattern occurred, the price outcome after each analog, and aggregate statistics (win rate, median return, percentile range). Use cases: (1) pre-news analysis — filter by timeOfDayUTC to find analogs that happened near a specific event time (e.g., FOMC at 14:00 UTC); (2) regime research — understand historically what happens after this pattern; (3) Polymarket context — combine with get_polymarket_probabilities to validate signal with historical evidence. Returns a plain-English summary suitable for agent reasoning.
research_time_conditioned_analogsmcpResearch historical analogues under specific UTC time conditions: hour ranges, weekdays, and market sessions. Use this for hypotheses like FOMC hour, New York open, Monday morning, weekly close, or time-of-day behavior.
research_market_structuremcpResearch the current Rust marketStructure label against historical analogues. Returns current structure, filtered analog outcomes, continuation/reversal stats, warnings, next research questions, and a research verdict.
get_market_playbookmcpTurn the current Rust marketStructure, trading decision, failure analogues, and historical structure research into an agent-ready market playbook with status, bias, confirmations, invalidations, and execution notes.
explain_live_skipmcpReturn the most recent skipped live selector tick with per-scale details and skip reasons.
get_scale_agreement_historymcpSummarize how often multi-scale consensus reaches a required agreement threshold by UTC hour and weekday.
get_execution_feedback_loopmcpAnalyze live execution outcomes, selector signal frequency, and calibration stats to recommend adaptive signal-quality thresholds for strategy consumers.
get_confidence_calibration_guidancemcpReturn BTCUSDT 15m confidence calibration and threshold guidance for live trading, including calibrated-probability bands and drift notes.
get_btc15m_risk_profilesmcpReturn ready-to-use BTCUSDT 15m risk profiles for integrators, including conservative, balanced, and aggressive selector settings.
get_mcp_compatibility_manifestmcpReturn the versioned MCP compatibility manifest, including canonical tools, aliases, and JSON argument schemas for remote clients.
Backtesting
backtest_strategymcpPerform a full strategy backtest over a historical period (Walk-forward analysis). Use this for testing general rules or long-term performance.
backtest_patternmcpForensic Backtest: verify a specific pattern occurrence with historical simulation to inspect PnL, drawdowns, and trajectories.
run_rlxbt_backtestmcpSend a preset-expanded or custom RLXBT strategy payload to the external daemon backtest contract (typically POST /api/run-backtest) and return the raw result. Supports presets rsi_mean_reversion, ema_trend_follow, breakout_confirmation, or custom fields like entry_long/exit_long/entry_short/exit_short, entry_rules/exit_rules, strategy, stop_loss_pct, take_profit_pct, max_hold_bars, position_size, initial_capital, commission, and slippage. Use it as a fast hosted validation layer after pattern discovery or private-memory research, so traders do not need to maintain separate backtesting infrastructure. Paid access is Manus token-based rather than period-based: expect payment_required with price_sol, token_id, and access_contract, then retry after payment with the same token. Do not mix preset with custom rule fields in the same request.
Data Management
get_dataset_statusmcpGet summary of available bars and time ranges for a symbol and interval.
get_dataset_statsmcpGet detailed statistics about dataset size, pairs, gaps, and freshness.
get_data_healthmcpOperator tool: inspect freshness, gap status, cache state, and ANN readiness for a symbol/interval.
expand_datasetmcpTrigger background fetching of historical data to extend a dataset on the Rust server.
list_private_memory_datasetsmcpList private datasets available to a human owner or a specific agent so MCP clients can discover dataset IDs before import and search operations.
get_private_memory_dataset_statusmcpGet status, row counts, timestamps, and last import/error state for one private dataset.
create_private_memory_datasetmcpCreate a new private memory dataset for an owned agent or for the calling agent itself.
import_private_memory_datasetmcpImport candle-style JSON/CSV text or normalized rows into an existing private memory dataset and make it RLX-searchable.
delete_private_memory_datasetmcpDelete a private dataset and remove its backing RLX candle memory.
update_private_memory_dataset_metadatamcpUpdate private dataset display metadata such as name and description without changing its RLX backing identity.
Operations
refresh_market_datamcpOperator tool: force-refresh stored candle history for a symbol/interval from the Rust data plane.
RL & Regimes
detect_market_regimemcpClassify current market state into one of the known market regimes.
get_rl_training_batchmcpFetch a tensor-ready batch of trajectories for RL agent refinement.
detect_market_regime_latestmcpDetect the most recent market regime for a specific pair.
get_rl_simple_samplesmcpFetch simple one-decision RL episodes for training or analysis.
Signals
get_live_signalsmcpRetrieve recently generated live trading signals across all pairs.
get_live_trade_logmcpInspect recent live trade decision packets and execution recommendations for calibration and audit.
get_live_trade_statsmcpSummarize realized live-trade performance, including win rate and average edge by decision mode.
get_signal_audit_logmcpInspect recent live selector decisions, including skipped ticks and normalized skip reasons.
get_signal_frequency_statsmcpMeasure how often strong live selector signals occur for a confidence and edge threshold.
get_live_edge_distributionmcpShow the current model-vs-market YES edge distribution across cached Polymarket background watches.
get_live_provider_observabilitymcpReturn provider heartbeat telemetry, consumer readiness, and refresh health for live strategy consumers using cached background watches.
Polymarket
polymarket_multi_scale_probmcpCalculate Polymarket probabilities by scanning multiple window lengths (q=12, 24, 48, 96) and weighting them by analogue density and similarity.
get_polymarket_probabilitiesmcpCompute TTC-aware 5m/15m Polymarket probabilities using the ai_patterns historical analog engine.
get_live_polymarket_trade_decisionmcpAuto-discover the active BTC Up/Down 15m Polymarket market, combine live Polymarket pricing with pattern memory and intrabar momentum, and return BUY_YES, BUY_NO, or SKIP with entry guardrails.
get_polymarket_background_statusmcpInspect background Polymarket watches and cached server-side probability snapshots.
upsert_polymarket_background_watchmcpCreate or update a server-side Polymarket background watch so remote agents can consume hot cached probabilities.
refresh_polymarket_backgroundmcpForce an immediate refresh cycle for all configured Polymarket background watches.
polymarket_backtestmcpRun a calibrated walk-forward Polymarket profitability backtest on historical candles. Splits data into train (calibration) and test (out-of-sample evaluation) sets. Returns winRate, ROI, Sharpe ratio, Brier score, equity curve, and performance by confidence bucket. Use this to validate whether the VBRL pattern engine has a profitable edge for a given symbol/horizon.
polymarket_horizon_scanmcpScan multiple forecast horizons (f=1..10 bars) in parallel to find the optimal prediction window for a symbol. Returns a ranked table of {f, winRate, ROI, Sharpe} and a plain-English recommendation. Use this before betting to determine which horizon the model is most accurate at. Example: for BTCUSDT/15m the optimal horizon may be f=3 (45 minutes) rather than f=1.
polymarket_model_healthmcpQuick health check for the VBRL Polymarket model on a specific symbol. Runs a fast horizon scan (f=1,3,5) and returns: best horizon, calibration bias (raw upProb vs actual win rate), whether the model is profitable, and a concise recommendation for the agent. Use this as a first step before calling polymarket_backtest or get_polymarket_probabilities.
backtest_polymarket_selectormcpBacktest the hardened Polymarket BTC 15m selector used by trading agents. Builds multi-q analogue consensus, calibrates probabilities on an in-sample window, then evaluates out-of-sample with realistic binary-share execution: effective ask includes spread, slippage, and fee bps. Returns calibratedProbability/EV, skip counts, win rate, ROI, Sharpe, Brier scores, and optional trades.
optimize_polymarket_selectormcpRun reproducible walk-forward optimization for the Polymarket selector. Scans minAgree, minAvgSimilarity, and minEdge grids while reusing the same historical backtest data, rejects sparse parameter sets, and returns a ranked leaderboard plus recommended selector parameters.
explain_polymarket_signalmcpExplain one live Polymarket BTC Up/Down signal before execution. Scans q=[24,40,48,72,96] style analogues, reports scale agreement, calibratedProbability, effective ask, edge, EV, Kelly fraction, and explicit skip reasons such as TTC outside 35-55m, weak similarity, insufficient consensus, or edge below threshold.
sweep_polymarket_selectormcpRun a parameter sweep across q × f × sim × minEdge combinations for the Polymarket selector. Fetches RLX backtest data once per (q, f) pair and applies all sim/minEdge combos in-memory. Returns all rows sorted by Sharpe with pre-formatted gbrainText and gbrainReward fields ready for brain-trading gbrain_learn calls. Use this to build the GBRAIN pattern-discovery loop.
resolve_polymarket_outcomemcpFeed back a resolved Polymarket market outcome to update calibration tracking. Call after a market closes: outcome=1 (YES won) or outcome=0 (NO won). This improves model validation over time.
polymarket_vbrl_signalmcpVBRL (Vector-Based RL) signal for a Polymarket BTC Up/Down market. Finds the k most similar historical BTC patterns using the HNSW analogue engine, maps each to a binary YES/NO vote (would BTC have cleared the strike after f bars?), and aggregates via similarity-weighted kernel (VBRL formula) to produce a calibrated probability. Returns individual analogue votes with their weights, VBRL reasoning trace, a BUY_YES / BUY_NO / SKIP recommendation with edge vs market price, and a plain-English summary. Use this when you need the RL agent's reasoning — not just a probability number — before placing a bet.
Polymarket TTC Workflow
Advanced Probability Engine
Integrate Time-To-Close aware probabilities directly into trading agents. The MCP layer provides background watchers that maintain hot caches of pattern metrics specifically filtered for active prediction markets.
Quick Start (Claude / Desktop)
mcp-config.json{
"mcpServers": {
"ai_patterns_neural_link": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/dist/index.js"],
"env": {
"RLX_SEARCH_BASE_URL": "$BASE_URL",
"SUPABASE_URL": "YOUR_URL"
}
}
}
}