Claude Webcache logo

Claude Webcache

Caches Claude Code WebFetch and WebSearch results in local SQLite across sessions, with MCP tools for lookup and management.

Install Claude Webcache

Run the project’s own setup commands, in order.

Setup steps from the project

claude-webcache installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    claude plugin marketplace add theYahia/claude-webcache && claude plugin install claude-webcache@theyahia
    

Overview

The claude-webcache MCP server stores Claude Code WebFetch and WebSearch results in a local SQLite database for reuse across sessions. Hooks can read the cache before network calls and automatically store results after fetching, while MCP tools support manual lookups and cache administration. Use it when repeated URLs or search queries should avoid unnecessary network requests. Cache scope, expiration, size limits, compression, and URL redaction are configurable through environment variables.

Use cases

  • Reuse fetched documentation across Claude Code sessions
  • Avoid repeated WebSearch requests for the same query
  • Separate cached results by project namespace
  • Inspect and remove stale or unwanted cache entries

Key features

  • Persistent SQLite cache across sessions
  • Automatic WebFetch and WebSearch hooks
  • MCP tools for lookup, warming, refresh, and deletion
  • Configurable TTL, namespaces, compression, and size limits
  • CLI and local web dashboard for cache inspection

Tools9

What Claude Webcache lets your agent do. Expand a tool for its parameters.

Self-reported~160 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/15 checks healthy over the last 82d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit3mo agoMost recent push to the default branch.
Tools exposed9Callable tools this server registers over MCP.

How Claude Webcache works

What claude-webcache MCP server does

The claude-webcache MCP server provides a persistent cache for Claude Code web retrievals. It stores fetched output with the requested URL and prompt, allowing later sessions to reuse matching results instead of fetching the same content again. WebSearch results use a separate namespace and a shorter default lifetime than ordinary fetch entries.

The cache is stored locally at ~/.webcache/cache.db. Entries can be inspected, invalidated, refreshed, or removed through MCP tools and the package CLI. Projects can use separate namespaces so entries from one project are not returned to another.

How it works

A pre-tool hook checks the cache before WebFetch and WebSearch. On a matching entry, the cached content is returned and the network operation is skipped. On a miss, the normal operation runs, and a post-tool hook stores its output for future sessions. Automatic reads can be disabled with WEBCACHE_AUTOREAD=0.

Manual calls are also available. cached_fetch and cached_search return cached content when present, or a [CACHE_MISS] marker when no matching entry exists. cache_warm checks multiple URLs or URL-and-prompt pairs in one operation, while cache_refresh invalidates an entry and signals that it should be fetched again.

Setup and configuration

The plugin can be installed through the Claude marketplace, loaded from a local clone, or installed globally from npm. The npm installation requires Node.js 22.5 or newer and uses the built-in node:sqlite, so it does not require native dependencies.

The claude-webcache MCP server supports Claude Code CLI, Claude Desktop on Mac and Windows, the VS Code extension, and the JetBrains plugin. The package also includes a command-line binary and a local dashboard available through claude-webcache dashboard.

Useful settings include WEBCACHE_TTL_DAYS for a global expiration period, WEBCACHE_DOMAIN_TTL for domain-specific expiration, and WEBCACHE_NAMESPACE for project isolation. WEBCACHE_MAX_SIZE_MB enables size-based eviction, while WEBCACHE_MAX_OUTPUT_MB skips responses above a configured size. Compression, debug output, quiet hooks, and search-specific expiration are also configurable.

Tools and capabilities

Available MCP tools include:

  • cached_fetch and cached_search for reading cached fetches and searches.
  • cache_store for explicitly saving output.
  • cache_stats and cache_list for usage statistics and recent URLs.
  • cache_invalidate for deleting entries for one URL.
  • cache_clear for age-based deletion or a confirmed full wipe.
  • cache_warm for bulk cache checks.
  • cache_refresh for invalidating a URL and requesting a new fetch.

The CLI adds namespace inspection, metadata export, per-domain statistics, pagination, log cleanup, and dashboard access.

Limitations and notes

Stored URLs are redacted for display by default when they contain obvious credentials or sensitive query parameter names, but the cache key still uses the original URL. WEBCACHE_STRICT_REDACT=1 makes the key use the redacted URL; this can cause different token values to share one entry and is unsafe for personalized endpoints. Header-based authentication is preferred, and the local database should not be committed to source control.

Cache misses still require the normal WebFetch or WebSearch operation, and entries may be skipped when they exceed the configured output limit.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Claude Webcache

claude-webcache is an MCP server that connects Claude Code's WebFetch and WebSearch workflows to a persistent local SQLite cache. Its main tools include cached_fetch, cached_search, cache_store, cache_stats, cache_list, cache_warm, cache_refresh, cache_invalidate, and cache_clear for reading and managing cached results.

Install it with `claude plugin marketplace add theYahia/claude-webcache && claude plugin install claude-webcache@theyahia`. You can also install the npm package globally or load the plugin from a cloned repository. The npm route requires Node.js 22.5 or newer.

Set `WEBCACHE_NAMESPACE` to a project-specific value before starting Claude Code. Reads and writes in different namespaces do not overlap. The CLI also accepts `--namespace` for inspecting or managing a particular namespace.

It documents Claude Code CLI, Claude Desktop on Mac and Windows, the VS Code extension, and the JetBrains plugin.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewClaude Webcache AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/claude-webcache?style=directory)](https://allmcps.com/mcp/claude-webcache)
HTML Embed
<a href="https://allmcps.com/mcp/claude-webcache"><img src="https://allmcps.com/api/badge/claude-webcache?style=directory" alt="Claude Webcache on AllMCPs" /></a>