DEV Community

gentic news
gentic news

Posted on • Originally published at gentic.news

Webify MCP: Cut Web Research Token Costs by 97% in Claude Code

Webify MCP slashes web research token usage by 97% in Claude Code using DOM graph + BM25 retrieval. Install with one pip command and let Claude auto-route web queries through it.

Key Takeaways

  • Webify MCP slashes web research token usage by 97% in Claude Code using DOM graph + BM25 retrieval.
  • Install with one pip command and let Claude auto-route web queries through it.

What Changed — The Specific Update

Claude Code Just Cut MCP Context Bloat by 46.9% — 51K Tokens ...

Webify MCP is an open-source MCP server that fundamentally changes how Claude Code handles web research. Instead of fetching entire webpages (3,000–15,000 tokens per URL), Webify builds a DOM structural graph, scores nodes against your query using BM25, and returns only the relevant subtree — 80–300 tokens.

In blind A/B tests against Claude's built-in Deep Research across 15 unseen queries, Webify found correct information every time. The only gap was completeness on exhaustive multi-source queries, which you solve by calling web_find() multiple times with focused sub-queries.

Install it now:

pip install webify-mcp
claude mcp add webify -- webify-mcp
Enter fullscreen mode Exit fullscreen mode

That's it. Claude Code auto-discovers the MCP server and starts routing web research through it.

What It Means For You — Concrete Impact on Daily Claude Code Usage

Token Economics

Every time Claude Code fetches a webpage for context (documentation, API specs, Stack Overflow, GitHub issues), it burns through your context window. A typical API doc page costs 5,000–10,000 tokens. Webify reduces that to 80–300 tokens — a 94–97% reduction.

For a session where Claude fetches 10 pages, you go from 50,000–100,000 tokens down to 800–3,000. That's the difference between hitting your context limit halfway through a task and having room for actual code.

Accuracy

Webify doesn't just truncate pages. It builds a structural graph of the DOM, scores each node against your specific query, and returns the most relevant subtree. The Haiku synthesis step then compresses that into a concise answer.

In the A/B test, Webify found the correct answer on every query. The completeness gap only appeared on queries requiring synthesis across 6+ sources — and you handle that by calling web_find() multiple times with narrower sub-queries.

Automatic Routing

Once installed, Claude Code automatically uses Webify for web research instead of its built-in tools. No configuration, no prompt changes. The preference policy is embedded in the package itself.

Try It Now — Commands, Config, and Workflow

Claude Code Token Optimization: Full System Guide (2026 ...

Quick Setup

# Install
pip install webify-mcp

# Add to Claude Code
claude mcp add webify -- webify-mcp

# Or add manually to your MCP config
# ~/.claude/mcp.json
{
  "mcpServers": {
    "webify": {
      "command": "webify-mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

How It Works in Practice

Webify exposes two tools:

  • web_find(query) — Searches the web (Brave API or DuckDuckGo fallback), fetches top 3–6 pages, builds graphs, retrieves relevant subtrees, synthesizes into ~800 tokens.
  • web_lookup(url, query) — Fetches a specific page, returns only the 80–300 tokens relevant to your query.

Claude Code automatically calls these when it needs web context. Example prompts that trigger it:

"What are the tradeoffs between Raft and Paxos consensus?"
→ Claude calls web_find() — searches, builds graphs, synthesizes answer

"Look up rate limits in the GitHub API docs"
→ Claude calls web_lookup() — fetches that page, returns relevant sections only

Pro Tips

  1. Use focused sub-queries for deep research. Instead of one broad query, break it into 3–5 specific questions and call web_find() for each. Webify's architecture scales to 6+ sources per call, but multiple calls give you exhaustive coverage.

  2. No Brave API key needed. Webify falls back to DuckDuckGo Lite (free, no key) if you don't set a Brave API key. Search quality is similar for most queries.

  3. Works in every MCP client. If you switch between Claude Code, Cursor, Windsurf, VS Code, or Zed, the same config works everywhere. Install once, benefit everywhere.

  4. Upgrade regularly. Webify is actively developed. pip install --upgrade webify-mcp keeps you on the latest version.

The Bottom Line

Webify MCP is the single most impactful token optimization you can make for Claude Code's web research today. It's free, open-source, installs in 10 seconds, and cuts your web fetch token costs by 97% while maintaining accuracy. If you use Claude Code for anything that involves reading documentation, APIs, or web content, this is a no-brainer.

One caveat: For exhaustive multi-source research where you need every detail from 10+ pages, you'll need multiple web_find() calls. But for the 90% use case — looking up a specific API parameter, understanding a concept, finding a code example — Webify delivers Deep Research quality at 5% the cost.


Source: github.com


Originally published on gentic.news

Top comments (0)