theyahia avatar

claude-webcache

theyahia/claude-webcache

Cross-session WebFetch caching via SQLite for Claude Code. Every WebFetch call gets automatically persisted with unlimited TTL by default, turning fresh fetches in subsequent sessions into sub-millisecond cache hits. Exposes `cached_fetch`, `cached_search`, `cache_store`, `cache_invalidate`, and `cache_warm` tools through MCP, plus a CLI for inspection and a local web dashboard. Supports per-project namespaces via `WEBCACHE_NAMESPACE`, domain-specific TTLs, and LRU eviction when you hit size caps. Ships with PreToolUse and PostToolUse hooks that intercept WebFetch transparently. Useful when you're repeatedly hitting the same documentation, API endpoints, or search results across coding sessions and want to skip the network round trip entirely.

GitHub stars
1
tools
9
transport
STDIO
last updated
May 1, 2026

Tools

9 tools

Public tool metadata for what this MCP can expose to an agent.

cached_fetchReturns the cached text for a url and prompt, or [CACHE_MISS] <url> if absent.

Returns the cached text for a url and prompt, or [CACHE_MISS] <url> if absent.

No parameter schema in public metadata yet.

cached_searchReturns cached WebSearch results for a query, or [CACHE_MISS] <query> (websearch namespace, short TTL).

Returns cached WebSearch results for a query, or [CACHE_MISS] <query> (websearch namespace, short TTL).

No parameter schema in public metadata yet.

cache_storeStores a url, prompt and output in the cache and returns stored.

Stores a url, prompt and output in the cache and returns stored.

No parameter schema in public metadata yet.

cache_statsReturns cache statistics such as namespace, totals, hits, misses, hit rate and top URLs.

Returns cache statistics such as namespace, totals, hits, misses, hit rate and top URLs.

No parameter schema in public metadata yet.

cache_listLists recent cached URLs, most recent first.

Lists recent cached URLs, most recent first.

No parameter schema in public metadata yet.

cache_invalidateDrops every cache entry for a given URL in the current namespace and returns the number deleted.

Drops every cache entry for a given URL in the current namespace and returns the number deleted.

No parameter schema in public metadata yet.

cache_clearClears cache entries by age, or fully with confirm set to YES, and returns the number deleted.

Clears cache entries by age, or fully with confirm set to YES, and returns the number deleted.

No parameter schema in public metadata yet.

cache_warmBulk pre-flight check of multiple url and prompt entries in one call, returning hits, misses and invalid counts.

Bulk pre-flight check of multiple url and prompt entries in one call, returning hits, misses and invalid counts.

No parameter schema in public metadata yet.

cache_refreshInvalidates a url and prompt entry and signals a re-fetch.

Invalidates a url and prompt entry and signals a re-fetch.

No parameter schema in public metadata yet.

Sponsors

Readme

claude-webcache

npm npm downloads license tests

Persistent cross-session WebFetch cache for Claude Code. Cached reads in ~0.07ms — orders of magnitude faster than re-fetching.

Claude Code's built-in cache lasts 15 minutes, within one session. Every new session re-fetches from scratch. claude-webcache persists results across sessions in a local SQLite database — instant cache hits, zero network cost.

Session 1  →  WebFetch("docs.example.com")  →  fetched, auto-cached ✓
Session 2  →  cached_fetch("docs.example.com")  →  instant hit, no network call
Session 7  →  cached_fetch("docs.example.com")  →  still instant, unlimited TTL

v0.1.5+: every WebFetch is automatically saved via PostToolUse hook — nothing to configure.


View the full README on GitHub

Details

Repository
github.com/theyahia/claude-webcache
Website
github.com/theYahia/claude-webcache
Category
Databases
Package
@theyahia/claude-webcache
Transport
STDIO
Registry
MCP registry, active

More from theyahia

Related Databases MCP servers

View all
1achreftlili avatarCode Indexachreftlili/code-indexSQLite-backed hybrid (vector + FTS) code search index for Claude Code over MCP.0stars
2ashwanthramkl avatarWhoop Mcpashwanthramkl/whoop-mcpRead-only WHOOP v2 data for MCP clients, with local SQLite cache and CSV/JSONL/Parquet exports.0stars
3icecat avatarIcecatbiz.icecat/mcpRetrieve product specifications and technical details from Icecat's database0stars
4bluetieroperations-create avatarBlackwallbluetieroperations-create/blackwall-mcpAPI-key pre-action risk gate: any irreversible agent action (money, SQL, delete, email).0stars
5dxtra avatardxtra Radio — Frequency Databasecom.dxtra/dxtra-radioRadio frequency database: FM, AM, shortwave, TV, ham, weather, emergency alerts. 15+ countries.0stars
6claix-dev avatarClaixclaix-dev/claix-mcpSecurity layer for AI agents: Retrieve for controlled SQL reads, Guard for allow/deny writes.0stars