Inspect and operate Next.js Redis caches: health, tag state, SWR simulation, safe invalidation.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
v1.0.0β install withnpm install @leejpsd/nextjs-cache-handler, or wire everything withnpx nextjs-cache-handler init --yes. Production-validated against AWS ECS Fargate with multi-instance Redis (24h live-traffic soak and a live Redis-reboot drill with zero 5xx β seedocs/staging-verification-2026-08-01.md), and exercised end-to-end against Next.js 16.3 (both cache interfaces).v0.4 adds: build-output cache seeding (first request after deploy is a HIT), pub/sub tag propagation (~3ms cross-instance), Redis Cluster e2e in CI, a CLI (
init/doctor/seed), and agent-native assets (skill, rules, MCP server). 1.0 freezes the public API under semver β the eight entry points, theCacheHandlerOptionssurface, the Redis key shapes and tag-marker format, and the metric event names. Upgrading from 0.4.x needs no changes.
Working with Claude Code / Codex / Cursor? Give your agent this URL and it will install and wire everything (version detection, wrapper files, next.config patch, verification):
An agent skill with decision tables, invalidation semantics, and a
troubleshooting playbook ships in the package (AGENTS.md,
skills/nextjs-redis-cache/SKILL.md) and via
npx skills add leejpsd/nextjs-cache-handler.
For cache operations from your agent (health, tag state, safe invalidation),
the companion MCP server is on the official registry as
io.github.leejpsd/nextjs-cache-handler-mcp β or one command:
npx nextjs-cache-handler init --yes wires handlers, rules, and .mcp.json together.
The Redis cache handler for Next.js 15/16 that ships both cacheHandler
(ISR / Pages Router) and cacheHandlers ('use cache' directive,
cacheComponents: true) β the area where
@fortedigital/nextjs-cache-handler
currently lists "Help needed".
That's it. 'use cache', revalidateTag, updateTag, cacheLife all work.
Next.js 16 split caching into two handler interfaces:
| Option | Used by | Methods |
|---|---|---|
cacheHandler (singular) | Pages Router ISR, on-demand revalidation | get, set, revalidateTag, resetRequestCache |
cacheHandlers (plural) | 'use cache' directive, cacheComponents: true | get, set, refreshTags, getExpiration, updateTags |
As of 2026-05, the leading OSS Redis handler @fortedigital/nextjs-cache-handler@3.2.0
declares peerDependencies.next: ">=16.1.5" but the README marks the new
plural interface as β "Not yet supported - Help needed":
π Compatibility matrix re-verified 2026-07-31 (from each project's published README/registry metadata). The OSS Next.js cache handler ecosystem moves quickly β please verify
@fortedigitalandnextjs-turbo-redis-cachedirectly before relying on this comparison.
| Feature | this (0.4.x) | @fortedigital 3.2.1 | nextjs-turbo-redis-cache 1.15 |
|---|---|---|---|
cacheHandlers config (plural) | β | β Help needed | β since 1.11 |
'use cache' directive | β | β Help needed | β since 1.11 |
'use cache: remote' | β default handler (dedicated multi-tier: roadmap) | β Help needed | partial |
'use cache: private' | n/a (uncustomizable) | n/a | n/a |
cacheComponents: true | β | β Help needed | β |
Build-phase skip (PHASE_PRODUCTION_BUILD) | β | β (singular only) | β |
| Auto deploy isolation | β
BUILD_NAMESPACE env-resolved | manual | β
BUILD_ID since 1.13 |
| Lua-atomic SET+tag | β Lua scripts | partial (MULTI) | partial |
| AbortSignal timeout | β per-op | β Proxy-wrapped | β |
| Redis Cluster | β (cluster adapter, see Production checklist) | β | β |
| ioredis support | β | β | β |
| In-memory fallback (TTL-aware) | β | partial | β L1 + Redis L2 |
| Next 15 support (ISR handler) | β
>=15.0.0 | β (legacy 2.x line) | β
>=15.0.3 |
| Request-scoped GET dedup | β | β | β |
| Built-in value compression | β gzip/brotli option | example only | example only |
| Redis Sentinel | β (local failover drill) | β | β |
| OpenTelemetry | β
built-in /otel emitter + onMetric hook | β | β |
| Reconnect strategy | β exponential backoff | client-level | error-threshold restart |
| Live-traffic dogfood (24h+) | β AWS ECS Fargate | not published | not published |
PR #207 on
@fortedigital (their cacheHandlers attempt) was held up in review over
PHASE_PRODUCTION_BUILD handling β which this package has from the start.
redis and ioredis are optional peer dependencies β install whichever
client you use. Both can be present.
Two CommonJS wrapper files in your project root (Next.js's
require.resolve pattern doesn't accept ESM directly):
Full reference: docs/api.md.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/nextjs-cache-handler-mcp)<a href="https://allmcps.com/mcp/nextjs-cache-handler-mcp"><img src="https://allmcps.com/api/badge/nextjs-cache-handler-mcp?style=directory" alt="Nextjs Cache Handler MCP on AllMCPs" /></a>