What is Scratchpad Mcp?
Scratchpad Mcp is an MCP server that provides persistent, token-efficient storage for AI agents. It allows agents to store versioned files, append logs, and retrieve diffs or summaries instead of re-reading entire files, saving tokens and context space.
How to use Scratchpad Mcp?
Install Node.js 20+, clone the repository, run npm install and npm run build. Configure it as an MCP server in Claude Desktop by adding the server definition with the ANTHROPIC_API_KEY environment variable (required only for summarize_file). Invoke the eight tools (write_file, read_file, append_log, read_log, list_files, delete_file, summarize_file, get_usage_stats) with an agent_id parameter.
Key features of Scratchpad Mcp
- Versioned writes with automatic 10‑version retention per file.
- Line‑level diffs returned on read, not full content.
- Append‑only logs with cursor‑based pagination (100 entries per page).
- On‑demand file summarization via Claude Haiku, cached per version.
- Per‑agent namespacing prevents cross‑agent data leaks.
- SQLite backend with size caps and per‑agent quotas.
Use cases of Scratchpad Mcp
- An agent tracks changes to a working document across turns.
- An agent records its own action history and replays it efficiently.
- An agent summarizes a long file once and retrieves the cached summary later.
- Multiple agents share a server instance without reading each other's data.
コメント