# canli-validation-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/arhancanli/canlicapital  
**GitHub Stars:** 5  
**npm Downloads (last month):** 4412  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/canli-validation-mcp

## Description
canlicapital.com backtest validation. A verdict is not admission to anything and is not a forecast.

## Tools
Capabilities this server exposes over MCP:

- **get_key** — Issue a free validation key for this session. Rarely needed: the first validation issues one itself unless CANLI_KEY or local mode is set, and the read tools need none. Quotas: 1000 validations per key per UTC day, 5 keys per client per UTC day, 1048576 bytes per validation request, 1024 bytes per key revocation request, 20000 observations per series, 200 variants per matrix.
- **validate_deflated_sharpe** — Deflated Sharpe ratio: the probability (0 to 1) that the selected strategy's Sharpe beats the best that luck gives across the variants tried, with the probabilistic Sharpe and that luck benchmark. Send the seven statistics or a return series. With every variant's returns use validate_overfitting; luck as a trial count, validate_luck_trials; a multiple-testing haircut, validate_haircut_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
- **validate_overfitting** — Probability of backtest overfitting (0 to 1) by CSCV: how often the in-sample best variant falls below the out-of-sample median. Needs every variant's returns (periods by variants); with summary statistics only, use validate_deflated_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
- **validate_reality_check** — Data-snooping tests on every variant a search tried: Hansen's SPA p-value that the best beat the benchmark only by luck, White's Reality Check, and the variants Romano-Wolf StepM finds better. Send all variants tried, not only the winners. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
- **validate_paper_evidence** — Checks paper-evidence.v0 structure and disclosures. With CANLI_LOCAL=1, record_file reads an export bundle and journal_file verifies signatures, source hashes and recomputed claims. Without a journal, source facts and signatures are unchecked. Local files are never uploaded. This verdict is about the series exactly as submitted. The service never saw the data source, its costs, survivorship, or any lookahead in how the series was built.
- **validate_breadth** — Book Sharpe ceiling from adding sleeves of this quality and correlation, the Sharpe at a sleeve count, and the sleeves a target needs. For portfolio construction; it validates no single strategy. This verdict is about the series exactly as submitted. The service never saw the data source, its costs, survivorship, or any lookahead in how the series was built.
- **validate_track_record** — Minimum track record length (observations and years) for an observed Sharpe to beat a benchmark at a confidence level; with observations, the record's probabilistic Sharpe so far. For live or paper records; to size a backtest for its trials, use validate_backtest_length. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
- **validate_backtest_length** — Minimum backtest length (years) before the best of N independent trials is not expected to reach a target Sharpe by luck; with backtest_years, the most trials those years allow. For planning a search; once it has a result, use validate_deflated_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
- **validate_haircut_sharpe** — Haircut Sharpe for multiple testing (Harvey and Liu 2015): the Sharpe a single test would have needed, by Bonferroni and independent tests, and with the other tests' Sharpes, Holm and BHY. For the probability the Sharpe is real, use validate_deflated_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
- **validate_luck_trials** — How many skill-less strategies a search would need for its best to reach this Sharpe by luck (Monte Carlo), and with a trial count, the chance it did. States luck as the best of N random tries; for the probability the Sharpe is real, use validate_deflated_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
- **audit_backtest** — One-call audit of a strategy's returns. Headline: one test whose false-positive rate was measured on nine return shapes (White's Reality Check with variants, luck trials with Lo's correction without). Then deflated Sharpe, minimum track record and, with variants, overfitting and out-of-sample decay, each with its receipt, plus fix_next. Send every variant tried (variants_file) so trials are counted; point returns_file at a CSV instead of pasting. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
- **verify_receipt** — Verify a receipt offline: its Ed25519 signature against the bundled canlicapital.com key, its output hash and its id. Send an id to fetch it first, or the receipt itself. The receipt is content-hashed, reproducible from the open-source core it names, and signed with Ed25519 by a key published at https://canlicapital.com/.well-known/canli-receipt-keys.json.
- **service_status** — Whether the validation API is up, with its quotas; check after a timeout before resubmitting. No key. This verdict is about the series exactly as submitted. The service never saw the data source, its costs, survivorship, or any lookahead in how the series was built.
- **backtest_strategy** — Backtest a rule on your prices over a whole parameter grid, then validate the best with the count of variants actually run: deflated Sharpe, overfitting probability, minimum track record, vs buy and hold, after costs. A backtest, deflated or not, is not a forecast and not advice.
- **summarize_series** — A long price or return series in about 100 words plus fields: growth, risk, dated drawdowns, trend, volatility regime, tails, jumps, stale data. Use instead of reading raw bars. Nothing here is a forecast or advice.
- **stress_test** — Stress a strategy's returns: bootstrap histories (how often the drawdown limit breaks or Sharpe turns negative) and named crash, volatility, repeat and stuck-position scenarios, with a fragility share. Frequencies over resampled histories are not forecasts of the future.
- **check_feasibility** — Check a trading plan before it trades: broker order-rate and minimum-order limits, 2026 US day-trading rules, square-root market impact with crowding, and the capital where costs eat the return. Checks the plan as described against published broker limits and a market-impact model; it never contacts a broker or sees an account.
- **check_leakage** — Does a signal look ahead? plan gives cuts; rerun your code on the first cut rows for each, then compare. Rows that changed used later rows; the result names the pattern and horizon. No code is sent. A pass covers only these cuts: the columns are the caller's, and survivorship, vendor revisions or a leak no cut reaches leave no trace.
- **placebo_test** — Does your pipeline find edges in noise? plan writes placebo files (your data's returns in random orders, so nothing is predictable); run the whole pipeline on real.csv and on each, then compare for a p-value that counts every choice it makes. Beating the placebos shows the pipeline finds more in the real order of the returns than in random orders of the same returns; it does not show the edge survives costs, capacity or the future.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "canli-validation-mcp": {
    "command": "npx",
    "args": ["-y","canli-validation-mcp"]
  }
}
```

## Documentation

## What canli-validation-mcp does

canli-validation-mcp exposes Canli Capital's quantitative research checks through the Model Context Protocol. Its tools cover both individual return series and collections of strategy variants. You can calculate deflated Sharpe, CSCV probability of backtest overfitting, Hansen's SPA and White's Reality Check results, multiple-testing haircuts, luck-equivalent trial counts, minimum record lengths, and required backtest lengths.

The server also includes higher-level workflows. `audit_backtest` combines several checks and can read returns from a CSV, while `backtest_strategy` evaluates a parameter grid and validates the best result against the number of variants actually run. Other tools summarize series, stress returns with resampled and named scenarios, check trading-plan feasibility, test for lookahead leakage, and compare a pipeline against randomized-return placebos.

## How it works

A client calls the MCP tools with statistics, return series, variant matrices, plans, or evidence files. Use every variant tried when assessing search-related risks; sending only the winning strategies prevents the trial history from being counted correctly. `validate_deflated_sharpe` accepts either seven summary statistics or a return series, while `validate_overfitting` requires returns for all variants arranged as periods by variants.

The service can issue a free validation key through `get_key`. The first validation normally issues one automatically, and read-oriented tools do not need a key. A key allows up to 1,000 validations per UTC day, with a maximum of five keys per client per UTC day. Individual requests may contain up to 1,048,576 bytes, series may contain up to 20,000 observations, and variant matrices may contain up to 200 variants.

Validation results describe the submitted data and methodology. They do not establish that a strategy will work, account for unobserved data construction problems, or constitute advice. Several tools explicitly warn that their probabilities, thresholds, or resampled frequencies are not forecasts.

## Setup and configuration

Install and register the server with an MCP client using the npm package:

```bash
npx -y canli-validation-mcp
```

For Claude Code, the documented registration command is:

```bash
claude mcp add canli -- npx -y canli-validation-mcp
```

The project also identifies setup paths for Cursor, VS Code, and Claude Desktop. `CANLI_KEY` can supply a validation key, and `CANLI_LOCAL=1` enables local behavior for paper-evidence workflows. In local mode, `record_file` can read an export bundle and `journal_file` can verify signatures, source hashes, and recomputed claims; local files are not uploaded.

## Tools and capabilities

- Assess selection risk with deflated Sharpe, luck trials, haircut Sharpe, and backtest-length calculations.
- Measure overfitting and data snooping across all tested variants.
- Check live or paper track-record requirements and portfolio breadth assumptions.
- Audit, backtest, summarize, and stress-test return series.
- Inspect execution feasibility, lookahead leakage, and placebo performance.
- Verify receipt signatures, output hashes, and receipt identifiers offline.

## Limitations and notes

The service evaluates a series exactly as submitted. It does not see the original data source, trading costs, survivorship handling, or lookahead introduced while constructing that series. Feasibility checks compare the stated plan with published broker limits and a market-impact model; they do not contact a broker or inspect an account. `check_leakage` only covers the cuts specified in the plan, and `placebo_test` does not establish that an edge survives costs, capacity limits, or future conditions.

Receipt verification uses the bundled Canli Capital Ed25519 key, the receipt's output hash, and its identifier. After a timeout, call `service_status` before resubmitting a request.

_Full upstream README: https://allmcps.com/mcp/canli-validation-mcp/readme_

