The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Dompruner MCP listing page.
한국어 | English

DOM AST middleware for LLM web pipelines — strips layout noise (nav, scripts, sidebars) and passes original text directly. Add a query to filter to relevant sections with BM25.
When an LLM uses the built-in WebFetch, a smaller model pre-processes the HTML and hands back a summarized result — adding latency, cost, and interpretation you didn't ask for. DomPruner skips that entirely: DOM AST parsing strips noise and passes the original content directly to the model.
| Call | Behavior |
|---|---|
dompruner_fetch(url) | Strips layout noise → returns full extracted content |
dompruner_fetch(url, query) | Strips layout noise → BM25 filters to relevant sections (falls back to full content if no match) |
93.5% fewer context tokens than WebFetch on average. 45% faster end-to-end. → Full benchmark
No installation, no API key:
Add to .mcp.json in your project root, or ~/.claude/.mcp.json for global. Run /mcp to verify.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
For clients that support HTTP transport — no Node.js install required, always runs the latest version:
langchain-mcp-adapters wraps any MCP stdio server as LangChain tools automatically:
DomPruner's tool description already tells clients to prefer dompruner_fetch over WebFetch. If your client still falls back, add this to its instruction file:
| Client | Instruction file |
|---|---|
| Claude Code | CLAUDE.md (project) or ~/.claude/CLAUDE.md (global) |
| Cursor | .cursorrules |
| Windsurf | .windsurfrules |
| Cline | .clinerules |
| GitHub Copilot | .github/copilot-instructions.md |
| Tool | Description |
|---|---|
dompruner_fetch | Fetch a URL → DOM-refined Markdown. Optional query enables BM25+ section filtering. |
dompruner_sitemap | Fetch all pages in a sitemap.xml → one refined Document per page. |
dompruner_analyze | Token-reduction report for a URL without full content. |
| Metric | WebFetch | DomPruner |
|---|---|---|
| Avg context tokens | ~15,735 | ~1,019 (93.5% less) |
| Answer quality (10 queries) | 9 / 10 | 8 / 10 |
| Avg response time | 5,811 ms | 3,168 ms (45% faster) |
| Content fidelity | Summarized by small model | Original text preserved |
| Extra API key / infra | No | No |
→ Full benchmark · Architecture
DomPrunerLoader, DomPrunerSitemapLoader, DomPrunerFetchTool for LangChain. pip install dompruner.MIT