Scan your whole stack
Are you using leanwall?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.1
leanwall was last scanned on 27 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.1 LATEST | 27 Nov 2026 | No rules fired |
| 0.1.0 | 27 Nov 2026 | No rules fired |
Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A local-first firewall and token-compression proxy for MCP. Put it in front of every MCP server you use, and your agent sees three small meta-tools instead of dozens of tool schemas. Oversized results get paged instead of dumped, and secrets get redacted before they leave your machine. Poisoned or silently changed tools are quarantined, and every write waits for a human click.

pip install "leanwall[dense]"
leanwall demo # 6-second scripted session against bundled mock servers
leanwall wrap --from claude # move your Claude Desktop MCP servers behind Leanwall (backed up, reversible)
Connecting several MCP servers costs you on every turn:
get_logs or query_db call can dump 15k+ tokens of raw JSON, sometimes with API keys
or customer PII inside.From leanwall benchmark (49 tools across 4 bundled mock servers, run as real stdio subprocesses; token counts are
tiktoken estimates). The full report is in BENCHMARK.md.
| Metric | Direct MCP | Leanwall |
|---|---|---|
| Schema tokens per turn | 4,644 | 787 (−83.0%) |
| Tokens for 4 oversized results | 42,942 | 4,394 (−89.8%) |
| Tool-routing Recall@3 (BM25 / dense / hybrid) | – | 84% / 86% / 90% |
| Adversarial suite (20 attacks) | – | 0 bypasses |
| Duplicate writes on 4 identical retries | – | 0 |
discover_tools p95, cold / cached |
– | 17 ms / 1.4 ms |
The mock schemas are terse (~95 tokens per tool). Real servers are often several times larger, so schema savings on a real setup are usually higher.
Claude / Cursor ──stdio──▶ Leanwall ──stdio/HTTP──▶ your MCP servers
│
├─ discover_tools(intent) hybrid BM25 + bge-small embeddings, RRF fusion
├─ execute_tool(server, tool, args)
│ ├─ quarantine check leanwall.lock (SHA-256 per schema) + poisoning scanner
│ ├─ policy gate policies.yaml: read_only | write_restricted | blocked
│ ├─ human approval dashboard on 127.0.0.1:8787 or `leanwall approve`
│ ├─ idempotency identical approved writes run once
│ └─ response guard secret/PII redaction, then slicing over 1,500 tokens
└─ slice_result(handle_id, json_path, offset, limit)
Every security decision is deterministic Python outside the model's context. The model holds no credentials and has no tool that can approve anything.
agent → execute_tool(db, drop_table, {table: orders})
Leanwall→ APPROVAL_REQUIRED request_id=req_ac25… approve at http://127.0.0.1:8787/approvals/req_ac25…
human → clicks Approve (or: leanwall approve req_ac25…)
agent → execute_tool(db, drop_table, {table: orders}) → runs once
retry → same call again → original result replayed, nothing re-executed
Each approval is bound by HMAC to the exact tool and arguments. It expires, and it can be spent only once. The dashboard accepts approvals only from itself: it uses a CSRF token, Origin and Host checks, and binds to localhost only.
| Command | What it does |
|---|---|
leanwall wrap --from claude\|cursor\|claude-code\|<path> |
Back up the client config, move its servers into leanwall.yaml, pin leanwall.lock, generate policies.yaml, print the savings |
leanwall unwrap --from … |
Restore the original client config |
leanwall serve [--transport stdio\|http] |
Run the proxy (and the dashboard, if port 8787 is free) |
leanwall lock [--accept server/tool] |
Re-pin schemas; changed tools stay quarantined until you --accept them |
leanwall scan |
Check live tools against the lockfile and the poisoning scanner |
leanwall pending / approve <id> / deny <id> |
Handle write approvals from the terminal |
leanwall dashboard |
Savings and approvals UI on 127.0.0.1:8787 |
leanwall stats |
Token savings, redactions and gate decisions |
leanwall benchmark |
Regenerate BENCHMARK.md |
wrap writes these to ~/.leanwall/ (or the folder you pass to --config):
# leanwall.yaml
servers:
github: {command: npx, args: ["-y", "@modelcontextprotocol/server-github"], env: {GITHUB_TOKEN: "…"}}
internal: {url: "https://mcp.internal.example.com/mcp", headers: {Authorization: "Bearer …"}}
settings:
top_k: 3
slice_threshold_tokens: 1500
dense: auto # auto | on | off
cache_url: null # redis://localhost:6379 to share the discovery cache
redaction:
pii: true
allowlist: ["ops@mycompany\\.com"]
# policies.yaml — generated from tool names and MCP annotations; review the "# review" lines
default: blocked
tools:
github/list_issues: read_only
github/github_merge_pr: write_restricted
db/query_db: read_only # review: may write
discover_tools before acting. With 3 tools and one turn, direct MCP is
faster. With 30+ tools over a multi-turn session, the saved prefill outweighs it.redaction.allowlist,
or set pii: false.top_k or rephrase,
and purely semantic phrasings ("what's paging on-call?") are the hardest.slice_result gets a clear error telling the agent to re-run the original call.
(They are already redacted, but are kept off disk on purpose.)cl100k_base tokenizer as a stand-in for Claude's.wrap leaves them in your client config untouched.uv sync --extra dense
uv run pytest # 76 tests, including end-to-end over real stdio subprocesses
uv run ruff check src tests
MIT licensed. See CONTRIBUTING.md.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.