
Store and retrieve entities, relations and observations in a persistent local knowledge graph.

An MCP server that gives agents versioned file storage, append-only logs, line diffs, and cached summaries in a local SQLite database.
scratchpad-mcp: persistent scratchpad MCP server for AI agents is cataloged as an MCP server attributed to mikepressure. An MCP server that gives agents versioned file storage, append-only logs, line diffs, and cached summaries in a local SQLite database. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for scratchpad-mcp: persistent scratchpad MCP server for AI agents are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
An Anthropic API key is only needed to call summarize_file; the other seven tools work without it.
No. agent_id is a plaintext parameter with no authentication, so a multi-tenant process sharing one SQLite file is not safe; run one process per tenant instead.
Writes are capped at 1 MB per file and 64 KB per log entry, and each read_log page returns 100 entries.
README.md · 8fef32c360ab · 采集于 2026-11-13 11:13:08 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
Persistent, token-efficient storage for AI agents. An MCP server that stops your agents from re-reading the same files and re-loading the same context every turn.
agent: "what changed in this file since I last read it?"
server: { diff: [...], current_version: 14 } ← not the whole file
Agents waste tokens. They re-read files they've already seen, re-summarize documents they've already processed, and re-discover state they've already computed. This server gives them a place to put that work and pick it up later in a way the model can reason about cheaply.
Concretely:
All tools take agent_id as their first argument. Operations are scoped to
that agent — agents cannot read each other's files or logs.
| Tool | What it does |
|---|---|
write_file(agent_id, path, content) | Store content at a path. Auto-versions on every write. Keeps the 10 most recent versions. |
read_file(agent_id, path, since_version?) | Read full content, or a JSON line-diff against a prior version. If since_version has been pruned, returns full content with version_too_old: true. |
append_log(agent_id, path, entry) | Append one entry to an append-only log. Returns the new entry ID. |
read_log(agent_id, path, since_entry?) | Read log entries with cursor pagination. 100 entries per page, has_more flag plus last_entry_id cursor. |
list_files(agent_id, prefix?) | List files (metadata only) optionally filtered by path prefix. |
delete_file(agent_id, path) | Delete a file and all its versions and any cached summary. |
summarize_file(agent_id, path) | LLM-summarize a long file (>8000 chars). Cached per version, so repeat calls on an unchanged file cost nothing. |
get_usage_stats(agent_id) | Return total bytes, file count, log count, and total operations for an agent. |
read_file with since_version returns a JSON array of chunks:
{
"diff": [
{ "op": "equal", "lines": ["line that didn't change"] },
{ "op": "remove", "lines": ["line that was deleted"] },
{ "op": "add", "lines": ["line that was added"] }
]
}
Line-level diffing is intentional — it's the format agents handle most reliably, and it lets the agent reason about what changed rather than re-processing the whole file.
Paths must match [a-zA-Z0-9/_.-]+, max 255 chars, no leading /, no ..
sequences. Errors name the violated rule.
read_log pageRequires Node 20+ and an Anthropic API key (only for summarize_file).
git clone <this repo>
cd scratchpad-mcp
npm install
npm run build
That produces dist/index.js, the runnable server.
Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or
~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"scratchpad": {
"command": "node",
"args": ["C:\\path\\to\\scratchpad-mcp\\dist\\index.js"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
ANTHROPIC_API_KEY is only required if you intend to call summarize_file.
The other seven tools work without it.
Optional: set SCRATCHPAD_DB_PATH to override the SQLite location. Defaults
to scratchpad.db in the project root.
Restart Claude Desktop. The server should appear in the MCP servers list with 8 tools.
agent_id is a plaintext tool parameter. There is no authentication: a
caller can claim to be any agent_id, and the server will trust it. This is
deliberate for V1 and works fine for the intended deployment shape, which is:
It is not safe for:
agent_id and read or overwrite their data.If you want multi-tenant, derive agent_id from the caller's API key in a
wrapper layer (this is the V2 plan) or run one process per tenant.
.., leading /, spaces, and any character
outside [a-zA-Z0-9/_.-].list_files prefix matching uses SUBSTR equality (not LIKE) so the SQL
wildcards _ and % never apply, and matching is case-sensitive.err.message — no stack traces, no SQLite paths, no
API keys.summarize_file?The caller. Always.
ANTHROPIC_API_KEY in their config. Their machine, their key,
their bill.anthropicApiKey from its per-run
input. A .actor/entrypoint.sh launcher maps that into the env before
starting the server. Each caller pays Anthropic for their own summaries;
the Actor publisher only collects Apify's per-call fee.If you fork this and intend to host it, do not hardcode an API key into the Dockerfile, the Apify Actor environment, or any config that gets shipped publicly. The other seven tools work without a key, so leaving it unset is a safe default.
This matters — different ways to run the server have different persistence guarantees. Pick the shape that matches your workload.
| Deployment | Persistence | Lost when |
|---|---|---|
| Claude Desktop / Smithery local / direct stdio | Fully persistent on local disk. SQLite file lives at scratchpad.db next to the project. State survives reboots, crashes, anything short of you deleting the file. | You delete the file. |
| Apify hosted (standby mode) | Session-scoped. State persists across requests within a hot Actor instance. Lost on cold start. | Actor instance recycles: idle for >Idle timeout seconds, hits Max requests per run budget, or you redeploy. |
| Smithery hosted (planned) | TBD — pending Smithery's persistent volume support. |
The Apify shape is great for single-task agent sessions (agent runs for a few minutes, makes dozens of tool calls, scratchpad persists across all of them). It's not the right fit for long-term cross-session memory (agent wants to read back something it wrote yesterday). For that, use the local install today, or wait for v0.2.0 — the roadmap below tracks that work.
A single SQLite file holds everything:
files — one row per (agent_id, path), tracks the current version.file_versions — full content per version, capped at 10 most recent per
file. Pruning happens on every write_file.log_entries — append-only entries, never modified.summaries — per-file summary cache, invalidated by version mismatch.agent_usage — per-agent operation counter for get_usage_stats.Versioning stores full content per version (not deltas) because writes need to be fast and reads need to be unambiguous. Diffs are computed on read by running the two versions through line-level diffing — the cost is paid by the caller asking for the diff, not by every writer.
agent_id from API key instead of taking it as a parameter.MIT — see LICENSE.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for scratchpad-mcp: persistent scratchpad MCP server for AI agents from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/scratchpad-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

Organize problem solving into revisable, branching thought steps through an MCP tool.

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.