MCP.Market

Leakguard MCP server

by doazvjettu·io.github.doazvjettu/leakguard-mcp·v0.1.1

Static analyzer flagging lookahead bias & data leakage in ML/trading code before backtest.

B82/100grade B
What users say
No reviews yet
Be the first
Safety scan
B82/100

full report

Adoption
New

0 stars37 downloads/wk

Reviews

Write one

Nobody has reviewed Leakguard yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Leakguard tools

No tool declarations could be read from the package source. They show once the server is installed.

Public scan report

scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it

no findings
  • Code scan24 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 106 days ago8/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 82/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Leakguard compares

Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
82/100
higher than 63% of 48,255 servers
Downloads a week
37
more than 28% of 12,191 servers with a package

Install Leakguard in Claude Code, Cursor or VS Code

claude mcp add leakguard-mcp -- uvx leakguard-mcp
Add to Cursor

What the publisher says

From the Leakguard repository's README, as published. We do not edit it. Read it on GitHub

<!-- mcp-name: io.github.doazvjettu/leakguard-mcp -->

leakguard-mcp

Squawk for backtests. A local-first MCP server that static-analyzes agent-generated Python code and flags lookahead bias & data leakage before the backtest runs.

Works for any time-series ML code — quant trading (crypto, equities, forex, futures), demand forecasting, energy, weather, IoT sensors — wherever a wrong .shift() or a global normalization silently poisons your results.

  • Pure source analysis (libcst) — your code never leaves the machine, no API calls.
  • Heuristic, not a proof: severity tiers (🔴 error / 🟡 warning), like an aviation squawk.
  • Framework-agnostic: pandas / numpy / polars, any stack.
  • MCP-native (stdio): works directly inside Claude Code, Cursor, and any MCP-compatible agent.
  • All 10 rules ship free — no license, no tiers, no phone-home.

Why this exists

AI agents (Claude Code, Cursor) write feature engineering and strategy code faster than humans can review it. But they introduce lookahead bias at scale — subtle time-boundary errors that backtest perfectly and fail catastrophically in live trading or production:

# Agent writes this — looks fine, is catastrophically wrong
df['momentum'] = df['close'].shift(-5)   # uses FUTURE prices as a feature
df['vol_norm'] = (df['close'] - df['close'].mean()) / df['close'].std()  # leaks future mean

leakguard catches these in the same agent loop — before the backtest runs:

LG001 🔴 line 2: Future shift used as feature — shift(-5) references 5 bars ahead.
  Fix: df['momentum'] = df['close'].shift(5)   (lag, not lead)

LG003 🔴 line 3: Global-fit normalization — mean/std computed over the full series
  before any train/test split, leaking future statistics into the past.
  Fix: df['vol_norm'] = (df['close'] - df['close'].expanding().mean()) / df['close'].expanding().std()

The agent reads the finding + fix snippet and self-corrects in one turn. No human review needed.

Install

Requirements

  • Python 3.11+
  • uv (recommended) or pip

From PyPI

pip install leakguard-mcp

From source

git clone https://github.com/doazvjettu/leakguard-mcp
cd leakguard-mcp
uv sync

Setup with Claude Code

Add to your MCP config (~/.claude/claudedesktopconfig.json or .claude/settings.json in your project):

{
  "mcpServers": {
    "leakguard": {
      "command": "python",
      "args": ["-m", "leakguard.server"]
    }
  }
}

Or if installed via uv:

{
  "mcpServers": {
    "leakguard": {
      "command": "uv",
      "args": ["run", "python", "-m", "leakguard.server"]
    }
  }
}

Restart Claude Code. leakguard's tools are now available to the agent.

Setup with Cursor

Add the same block under mcpServers in your Cursor MCP settings file.

MCP Tools

CLI

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Leakguard: common questions

Is Leakguard MCP server safe?
Mostly: it is graded B (82/100). Read the Leakguard safety report
How do I install Leakguard?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Leakguard need an API key?
Not as far as the registry entry and our scan can tell: no credentials are declared or required.
Is Leakguard maintained?
The last commit was 144 days ago (2026-06-13). The latest release is v0.1.1.
How does Leakguard compare with other MCP servers?
safety score 82/100 (higher than 63% of 48,255 servers); downloads a week 37 (more than 28% of 12,191 servers with a package). Full comparison.