Session Cache
БесплатноДавно не обновлялся (191д)In-memory file cache for Claude Code subagents that eliminates redundant file reads across parallel tasks.
Описание
In-memory file cache for Claude Code subagents that eliminates redundant file reads across parallel tasks.
README
A session-scoped MCP server that eliminates redundant file reads across Claude Code subagents.
When Claude Code delegates tasks to multiple subagents, each subagent independently reads the same files -- measured at 66.2% redundancy. This MCP server provides a shared in-memory cache where subagents check before reading and record after reading, turning redundant file reads into cheap cache lookups.
How It Works
Subagent needs file → check_cache → Hit? Use summary. Miss? Read file → record_read
Three tools:
| Tool | Purpose |
|---|---|
check_cache(file_path) |
Check if a file has been cached. Returns summary on hit, miss indicator otherwise. Detects stale entries via mtime. |
record_read(file_path, summary, symbols?) |
Record a file read with a concise summary. Stores the file's mtime for staleness detection. |
get_session_map() |
Get all cached file summaries. Useful for planning at the start of a task. |
The cache lives in-memory and dies with the session -- no persistence, no database, no cleanup needed.
Installation
With npx (recommended)
# Project-level
claude mcp add session-cache -- npx -y session-cache-mcp
# User-level (shared across projects)
claude mcp add session-cache -s user -- npx -y session-cache-mcp
Global install
npm install -g session-cache-mcp
claude mcp add session-cache -s user -- session-cache-mcp
Setup
As a Claude Code plugin (recommended)
- Open Claude Code
- Open Manage Plugins (
/pluginsor via the menu) - In the Marketplaces tab, enter the GitHub URL:
https://github.com/Kuroakira/session-cache-mcp - Switch to the Plugins tab and install it
When installed as a plugin, the MCP server, usage protocol (skill), and SubagentStart hook are all automatically available — no manual CLAUDE.md or settings.json configuration needed.
Other plugins (e.g., claude-praxis) can invoke the session-cache:session-cache-protocol skill to inject the cache protocol into their workflows.
As an npm MCP server (manual setup)
If using via npx or global install without the plugin system, add the following to your project's CLAUDE.md:
Before reading any file, call `check_cache` from the session-cache server with the file path.
If the cache returns a hit, use the summary instead of re-reading the file unless you need
details not covered by the summary.
After reading a file, call `record_read` from the session-cache server with the file path
and a concise summary (2-4 sentences covering the file's purpose, key exports, and important details).
At the start of a complex task, call `get_session_map` to see what files have already been
read in this session.
Tool API
check_cache
Input: { file_path: string }
Output: { status: "hit", summary: string, symbols?: string[], recordedAt: number }
| { status: "miss", reason: "not_cached" | "stale" | "file_not_found" }
record_read
Input: { file_path: string, summary: string, symbols?: string[] }
Output: { status: "recorded", file_path: string }
get_session_map
Input: {}
Output: { file_count: number, files: Record<string, { summary, symbols?, recordedAt }> }
Development
git clone <repo-url>
cd session-cache-mcp
npm install
npm test # Run all tests (34 tests)
npm run build # Compile TypeScript
npm run typecheck # Type check without emitting
License
MIT
Установить Session Cache в Claude Desktop, Claude Code, Cursor
unyly install session-cacheСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add session-cache -- npx -y session-cache-mcpПошаговые гайды: как установить Session Cache
FAQ
Session Cache MCP бесплатный?
Да, Session Cache MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Session Cache?
Нет, Session Cache работает без API-ключей и переменных окружения.
Session Cache — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Session Cache в Claude Desktop, Claude Code или Cursor?
Открой Session Cache на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Изменения
Версии и запрашиваемые доступы со временем.
- Новая версия опубликована
- Новая версия опубликована
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectAmap Maps Mcp Server
MCP server for using the AMap Maps API
автор: duxiaohuiSupabase
Database, auth and storage
автор: SupabaseEverything
Reference / test server with prompts, resources, and tools.
Git
Tools to read, search, and manipulate Git repositories.
Sequential Thinking
Dynamic and reflective problem-solving through thought sequences.
Time
Time and timezone conversion capabilities.
Compare Session Cache with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
