npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dompruner-mcp

v0.5.2

Published

MCP server that reduces web page token cost by 90%+ via DOM AST extraction — no API key required

Readme

dompruner-mcp

한국어 | English

DOM Tree Pruning for DomPruner

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) |

> [DomPruner] docs.python.org
> | Raw HTML  | 44,316 tokens |
> | DomPruner |  1,328 tokens |
> | Reduction |        97.0%  |
> Fetch: 194ms · Parse: 11.2ms

93.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-mcp

Claude 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()

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 | CLAUDE.md (project) or ~/.claude/CLAUDE.md (global) | | Cursor | .cursorrules | | Windsurf | .windsurfrules | | Cline | .clinerules | | GitHub Copilot | .github/copilot-instructions.md |


Tools

| 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. |

Full tool reference


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, DomPrunerFetchTool for LangChain. pip install dompruner.
  • LangChain integrations — dompruner-py listed as a third-party web loader.

Glama Score

dompruner-mcp MCP server


License

MIT