dompruner-mcp
This MCP server, dompruner-mcp (astrag-mcp), provides tools to fetch and analyze web pages with advanced DOM pruning for efficient LLM context retrieval. It delivers clean, compact Markdown with 90%+ token reduction (average 93.5% fewer tokens) without summarization.
Fetch web pages (
dompruner_fetch): Retrieves a URL and returns DOM-pruned Markdown. Supports optionalqueryfor BM25-based section filtering to surface relevant content within a ~1,200-token budget. Omitting URL and providing only a query triggers host LLM URL resolution via MCP sampling.Analyze token reduction (
dompruner_analyze): Returns a detailed audit including render type (SSR/SSG/CSR), raw vs. refined token counts, reduction percentage, and semantic anchors (headings/meta).SSG optimization: Special handling for Next.js/Nuxt/Gatsby sites via RSC tree walking.
Resilient fetching: Tiered escalation through native fetch, User-Agent rotation, and Playwright headless browser to handle blocks and JS-gated content.
Enables web search for URL discovery in dompruner_fetch, using the Brave Search API when a BRAVE_API_KEY is configured.
Provides fallback web search via HTML scraping for URL discovery when the Brave API key is not set.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dompruner-mcpfetch https://fastapi.tiangolo.com/tutorial/ and give me the gist"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dompruner-mcp
한국어 | 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 |
| Strips layout noise → returns full extracted content |
| Strips layout noise → BM25 filters to relevant sections (falls back to full content if no match) |
> [DomPruner] docs.python.org
> | Raw HTML | 44,316 tokens |
> | DomPruner | 1,328 tokens |
> | Reduction | 97.0% |
> Fetch: 194ms · Parse: 11.2ms93.5% fewer context tokens than WebFetch on average. 45% faster end-to-end. → Full benchmark
Quick Start
No installation, no API key:
npx -y dompruner-mcpClaude Code
{
"mcpServers": {
"dompruner": {
"type": "stdio",
"command": "npx",
"args": ["-y", "dompruner-mcp"]
}
}
}Add to .mcp.json in your project root, or ~/.claude/.mcp.json for global. Run /mcp to verify.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"dompruner": {
"command": "npx",
"args": ["-y", "dompruner-mcp"]
}
}
}Cursor / Windsurf / other MCP clients
{
"mcpServers": {
"dompruner": {
"type": "stdio",
"command": "npx",
"args": ["-y", "dompruner-mcp"]
}
}
}Remote HTTP (no install, always up to date)
For clients that support HTTP transport — no Node.js install required, always runs the latest version:
{
"mcpServers": {
"dompruner": {
"url": "https://dompruner-mcp.vercel.app/api/mcp"
}
}
}LangChain / LangGraph
langchain-mcp-adapters wraps any MCP stdio server as LangChain tools automatically:
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"dompruner": {
"command": "npx",
"args": ["-y", "dompruner-mcp"],
"transport": "stdio",
}
})
tools = await client.get_tools()Related MCP server: Scrapi MCP Server
Ensuring Your AI Always Uses DomPruner
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:
When retrieving a URL, always use dompruner_fetch instead of WebFetch.
- URL known → dompruner_fetch(url, query?)
- URL unknown → search for the URL first, then dompruner_fetch(url)Client | Instruction file |
Claude Code |
|
Cursor |
|
Windsurf |
|
Cline |
|
GitHub Copilot |
|
Tools
Tool | Description |
| Fetch a URL → DOM-refined Markdown. Optional |
| Fetch all pages in a sitemap.xml → one refined Document per page. |
| Token-reduction report for a URL without full content. |
Benchmark Summary
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
Related
dompruner-py — Python port.
DomPrunerLoader,DomPrunerSitemapLoader,DomPrunerFetchToolfor LangChain.pip install dompruner.LangChain integrations — dompruner-py listed as a third-party web loader.
Glama Score
License
MIT
Maintenance
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that fetches web pages and extracts clean, AI-friendly Markdown content using Mozilla Readability. It provides secure web access for LLMs with built-in SSRF protection and automated content cleaning for improved context retrieval and summarization.1314MIT
- AlicenseAqualityCmaintenanceMCP server that converts URLs to clean Markdown/Text for LLM agents.5875MIT
- AlicenseAqualityDmaintenanceMCP server that converts URLs into token-minimized clean text for LLMs, providing a receipt of token and cost savings.163MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that fetches web pages, extracts clean markdown (reducing token count), caches results, and provides searchable reading history.MIT
Related MCP Connectors
Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.
Jina AI Reader/Search MCP — turn any URL into clean LLM-ready markdown, plus web search.
Web tools for agents: fetch URL as markdown (free MCP) + x402 scrape, links, AI JSON, snapshot.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dong7812/dompruner-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server