{
  "markdown": "# Lean Reader\n\nTurn any URL into **token-minimized clean text for LLMs**, with a token-savings receipt on every call. MCP server + library.\n\nLLMs don't need your nav bar, your cookie banner, your `<script>` tags, or 200 KB of inlined SVG — but raw page HTML makes them pay for all of it. Lean Reader strips a page down to the article and tells you exactly how many tokens (and dollars) you just saved.\n\n```\n231,276 → 15,735 tokens (93% saved · 14.7× vs raw HTML · ~$0.54 on gpt-4o) · cleaned by lean reader\n```\n\n## Use as an MCP server\n\nAdd to your client's MCP config (Claude Desktop/Code, Cursor, …):\n\n```json\n{\n  \"mcpServers\": {\n    \"lean-reader\": { \"command\": \"npx\", \"args\": [\"-y\", \"lean-reader\"] }\n  }\n}\n```\n\nThen the `lean_read(url, format?)` tool returns clean text plus the receipt.\n\n## Use as a library\n\n```js\nimport { leanRead } from 'lean-reader/lib/core.js';\n\nconst r = await leanRead('https://example.com/article', { format: 'markdown' });\nconsole.log(r.content);   // token-minimized text\nconsole.log(r.receipt);   // { beforeTokens, afterTokens, savedPct, ratio, estCostSavedUsd, ... }\n```\n\n## How much does it save?\n\nMeasured, not marketed — the [open benchmark](https://github.com/AIMento/lean-reader-bench) ships the corpus, the tokenizer, and every raw output, and flags the cases where Lean Reader **loses**:\n\n- **~29% fewer tokens than Mozilla Readability** (the standard extractor) at the median, while keeping ~99% of the body text. Be honest about where that edge comes from: it's the `minimize` post-pass (link/image/footnote/whitespace strip), not smarter extraction — run both through `minimize` and they're roughly par. Lean actually runs Readability as one of its two extractors (see Honest limits), so it doesn't lose to it.\n- Versus **raw page HTML** the multiple is much larger (median ~8.7×, down to ~3.1× on already-clean blog prose, 100×+ on script-heavy docs) — but that's HTML nobody feeds an LLM, so read it as \"don't dump raw pages,\" not as a competitive claim.\n- Versus **Jina Reader** (measured, anonymous tier): ~1.6× fewer tokens on a like-for-like body, ~4.3× if you count the nav and reference dumps Jina also returns. Firecrawl is not yet measured (needs an API key).\n\nThe receipt uses the `o200k_base` tokenizer (GPT-4o/4.1 class); the model and tokenizer are always shown, and counts are vs the raw page HTML so you can check the math.\n\n## Honest limits\n\n- **Static HTML only (v1).** Pages whose body is client-rendered (some SPAs, GitHub repo landing pages) return little — Lean Reader flags `partial` instead of emitting empty text. Jina/Firecrawl render JS and will beat us there.\n- **Two extractors, body-max selection.** Defuddle and Mozilla Readability each silently drop the body on *different* pages (Defuddle on some large Wikipedia articles, Readability on some docs/SPAs). Lean runs both and keeps whichever recovers more body, so neither's blind spot becomes a silent content drop. A ROUGE-L ground-truth pass on a 14-page hand-labeled sample is done: reference-body recall 0.99, equal to Readability on the same ground truth, so the word-count gap is noise removal, not body loss (see the bench repo).\n- Token counts are `o200k_base`; Claude/Gemini tokenize differently.\n\n## Open-core\n\nThe extraction + token-minimization core (`lib/`) and the MCP server (`src/`) are MIT. Hosted service, sharing UI, and metering are separate.\n\nMIT © 2026\n",
  "bytes": 3401,
  "sha": "61b16cd8a5f04347432b5c94e9458e5d86b4a56c599b4803f5a02b5add6348e9",
  "repo_slug": "aimento/lean-reader",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_aimento_lean_reader_2688ce1e/readme"
}