Token-minimized URL-to-clean-text reader for LLMs, with a token-savings receipt.
Turn any URL into token-minimized clean text for LLMs, with a token-savings receipt on every call. MCP server + library.
LLMs 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.
231,276 → 15,735 tokens (93% saved · 14.7× vs raw HTML · ~$0.54 on gpt-4o) · cleaned by lean reader
Add to your client's MCP config (Claude Desktop/Code, Cursor, …):
{
"mcpServers": {
"lean-reader": { "command": "npx", "args": ["-y", "lean-reader"] }
}
}
Then the lean_read(url, format?) tool returns clean text plus the receipt.
import { leanRead } from 'lean-reader/lib/core.js';
const r = await leanRead('https://example.com/article', { format: 'markdown' });
console.log(r.content); // token-minimized text
console.log(r.receipt); // { beforeTokens, afterTokens, savedPct, ratio, estCostSavedUsd, ... }
Measured, not marketed — the open benchmark ships the corpus, the tokenizer, and every raw output, and flags the cases where Lean Reader loses:
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.The 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.
partial instead of emitting empty text. Jina/Firecrawl render JS and will beat us there.o200k_base; Claude/Gemini tokenize differently.The extraction + token-minimization core (lib/) and the MCP server (src/) are MIT. Hosted service, sharing UI, and metering are separate.
MIT © 2026
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y lean-readerMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-aimento-lean-reader": {
"command": "npx",
"args": [
"-y",
"lean-reader"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencelean-readernpmio.github.AIMento/lean-reader works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.