DomPruner

•
2
•

Reduces web page token consumption for large language models by extracting and refining essential content from complex HTML structures.

DomPruner is an MCP server engineered to dramatically cut web page token costs, achieving 97–99% reduction, by intelligently processing web content. It fetches URLs, parses the DOM as an Abstract Syntax Tree, and prunes noisy elements like navigation, advertisements, scripts, and footers using a sophisticated FQN pathing system. The tool returns clean, compact Markdown, providing immediate token reduction statistics with every response, all without requiring API keys, Vector Databases, or embedding APIs.

主要功能

010 GitHub stars
02Intelligently prunes noise subtrees (navigation, ads, scripts, footers) via DOM AST extraction.
03Provides a tiered fetching mechanism including User-Agent rotation and Playwright for robust content retrieval.
04Operates without requiring API keys, Vector DBs, or embedding APIs.
05Includes a BM25+ Section Filter with heading boost and depth decay for query-aware content ranking.
06Achieves 97-99% HTML token reduction for LLM context.

使用案例

01Streamlining web content for LLM processing to reduce inference costs and improve context relevance.
02Fetching and refining technical documentation or web articles for AI-powered question answering systems.
03Auditing the token reduction potential of web pages before committing to full content retrieval.