{
  "markdown": "# @pastepile/mcp\n\nThe **persistent memory layer for AI coding assistants.** A\n[Model Context Protocol](https://modelcontextprotocol.io) server that lets\nClaude, Cursor, Windsurf, and any MCP client save knowledge to\n[Pastepile](https://pastepile.com) and retrieve it later by a stable URL.\n\nYour assistant saves its own work as it goes, and can find it again next\nsession. Zero dependencies, so it adds no supply-chain surface of its own.\n\n## The one tool that matters\n\n`pastepile_remember` takes a **session** name the assistant chooses and can\nalways reproduce from what it can see: a repository path, a conversation id, a\nbranch name. The first call under a session creates the memory. Every call\nafter updates that same memory and keeps the previous content as a version. A\ncall whose content has not changed does nothing at all.\n\nThat last property is the whole design. Because an unchanged save is free and\nsilent, the assistant can save after every meaningful step without being asked\nand without filling your account with near-identical copies. And because the\nsession is a name rather than a slug, nothing has to survive a compacted\nconversation.\n\n## Tools\n\n### Memory (session-keyed; a subscription is required from September 8, 2026)\n\n| Tool                 | What it does                                                         |\n| -------------------- | -------------------------------------------------------------------- |\n| `pastepile_remember` | Create or update a memory by session. Deduplicates. No slug to keep. |\n| `pastepile_recall`   | Search your own memory by words, tags, and kind.                     |\n| `pastepile_timeline` | One memory's version history plus related memories.                  |\n| `pastepile_restore`  | Put an earlier version back without losing the current one.          |\n\n**Trial memory is being retired on September 8, 2026.** Until then, without\n`PASTEPILE_API_KEY` the memory tools work out of the box: each memory is an\nunlisted paste that expires one month after its last save (a save in its final\nweek renews it for another month, so memory in active use stays alive), the\nsession index lives on this device (`~/.pastepile`, or `PASTEPILE_STATE_DIR`),\nand restore reaches back one save.\n\nThe index is local; the memory is not. Each one is a real paste on Pastepile's\nservers, and because every save pushed the expiry out, an actively used trial\nmemory never expired. That is hosted storage with no subscription behind it,\nand from September 8, 2026 saving memory without a key answers\n`payment_required`.\n\n**Nothing is deleted and reads are unaffected.** Every memory already saved\nstays readable at its link, before and after that date, so it can be exported\nor saved again under a key. Pasting in the browser at pastepile.com stays free\nwith no key and no account. What needs a subscription is writing to Pastepile\nprogrammatically, which covers this server and plain curl alike.\n\n**The tools keep working without a key: local demonstration mode.** From that\ndate, with no `PASTEPILE_API_KEY` set, `pastepile_remember`, `pastepile_recall`,\n`pastepile_timeline` and `pastepile_restore` run against a store on your own\nmachine so you can see the workflow before paying. It is deliberately small and\ndeliberately not cloud storage:\n\n|                       | Local demonstration    | With a Pro API key              |\n| --------------------- | ---------------------- | ------------------------------- |\n| Where it lives        | This machine, one file | Pastepile, your key's namespace |\n| Has a link            | No                     | Yes, a stable URL               |\n| Another machine       | No                     | Yes                             |\n| How many              | 3                      | No fixed limit                  |\n| Size each             | 16 KB                  | Up to your plan's ceiling       |\n| Survives this machine | No                     | Yes                             |\n\nEvery response says so and carries `storage: \"local_demo\"`, so an assistant\ncannot report a demonstration memory as saved. Clear one with\n`pastepile_forget` and its `session` name. This is a demonstration, not a free\nsubscription trial: there is no free trial.\n\nAn API key, issued with [Pastepile Pro](https://www.pastepile.com/pricing),\nmakes memory permanent, searchable from any machine, with full version\nhistory.\n\n### Pastes (slug-keyed, no key required)\n\n| Tool                   | What it does                                                        |\n| ---------------------- | ------------------------------------------------------------------- |\n| `pastepile_save`       | Save text/code and get back a stable `url`, `slug`, and `edit_key`. |\n| `pastepile_checkpoint` | Update one paste and preserve its previous revision in history.     |\n| `pastepile_get`        | Retrieve a paste by slug or full Pastepile URL.                     |\n| `pastepile_search`     | Search your private memory (with an API key) or the public corpus.  |\n| `pastepile_list`       | List your saved pastes (with an API key) or the public feed.        |\n| `pastepile_forget`     | Permanently delete a paste that your API key saved.                 |\n\nSharing a snippet by URL is a different job from keeping memory, so both\nfamilies exist. Reach for the memory tools unless you specifically want a\nlink to hand someone.\n\n**Private memory:** when `PASTEPILE_API_KEY` is set, every paste your\nassistant saves is associated with that key, and `pastepile_search` /\n`pastepile_list` default to that private namespace (including unlisted\npastes), searching titles, filenames, and contents. Pass `scope: \"public\"`\nto reach the public corpus instead. Without a key, both tools cover the\npublic corpus only, and nothing is associated. One key can never see\nanother key's pastes.\n\n**Conversation checkpoints:** `pastepile_checkpoint` updates one paste at the\nsame stable URL and preserves the content it replaces in Pastepile's existing\nversion history. With an API key configured, the same key that saved a paste\ncan checkpoint it in a later session without the one-time `edit_key`. The\nserver instructions tell assistants to checkpoint after significant context\ngrowth, code generation, debugging or architecture work, and before likely\ncontext compaction, so saving does not depend on you remembering.\n\n**Forgetting:** `pastepile_forget` deletes a paste that the same API key\ncreated, from its slug alone. That matters because the `edit_key` is shown\nexactly once, in a transcript that gets compacted away, so it is not the\ncredential a later session still has. A paste saved with no key, or with a\ndifferent key, is untouched by yours; pass its `edit_key` explicitly to delete\nthat one. Deletion is permanent, and the tool is annotated as destructive so\nclients can confirm before running it.\n\nSaved pastes default to **unlisted** (retrievable by URL, never shown in public\nlistings or search) and **never expire**, so stored knowledge persists. Both are\nadjustable per call. End-to-end encrypted, password-protected, and\nburn-after-read pastes cannot be read back through the API and are out of scope\nfor `pastepile_get`.\n\n## Requirements\n\nNode.js 18 or newer (the server uses the built-in global `fetch`). No install\nstep, no build.\n\n## Configuration\n\nThe server is configured entirely by environment variables:\n\n| Variable              | Default                     | Purpose                                                                                                                                                                                                                                                                                   |\n| --------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `PASTEPILE_API`       | `https://www.pastepile.com` | Base URL. Point at a self-hosted or staging deploy.                                                                                                                                                                                                                                       |\n| `PASTEPILE_API_KEY`   | (none)                      | Pastepile API key, sent as `X-API-Key`. Makes memory permanent and portable across machines (without it, memory runs as device-local trial memory) and raises rate limits. Keys are created at <https://www.pastepile.com/keys> and come with a Pastepile Pro subscription. Never logged. |\n| `PASTEPILE_AUTOSAVE`  | `conservative`              | How hard the server asks the assistant to save without being told to. `off` removes every unprompted trigger and leaves the tools available on request. `conservative` saves at moments where losing the work would cost real time. `eager` prefers saving to not saving.                 |\n| `PASTEPILE_STATE_DIR` | `~/.pastepile`              | Where trial memory keeps its device-local session index (a private file holding sessions and their edit keys). Unused once an API key is configured.                                                                                                                                      |\n\n## Setup\n\n### Claude Code\n\n```bash\nclaude mcp add pastepile -- npx -y @pastepile/mcp\n```\n\nOr add it to `.mcp.json` in your project (shared with your team):\n\n```json\n{\n  \"mcpServers\": {\n    \"pastepile\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@pastepile/mcp\"],\n      \"env\": { \"PASTEPILE_API_KEY\": \"your-key-optional\" }\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):\n\n```json\n{\n  \"mcpServers\": {\n    \"pastepile\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@pastepile/mcp\"],\n      \"env\": { \"PASTEPILE_API_KEY\": \"your-key-optional\" }\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"pastepile\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@pastepile/mcp\"],\n      \"env\": { \"PASTEPILE_API_KEY\": \"your-key-optional\" }\n    }\n  }\n}\n```\n\n### Any other MCP client\n\nThe server speaks JSON-RPC 2.0 over stdio. Run it with:\n\n```bash\nnpx -y @pastepile/mcp\n```\n\nPoint your client at that command. The `env` block is optional; without it the\nserver talks to `https://pastepile.com` anonymously.\n\n### Remote endpoint (no local process)\n\nClients that speak MCP's Streamable HTTP transport can skip the local process\nand use the hosted endpoint instead. It runs the same dispatcher as this\npackage, so the tools are identical:\n\n```\nhttps://www.pastepile.com/api/mcp\n```\n\nTool calls on the remote endpoint require an API key\n(https://pastepile.com/keys, issued with Pastepile Pro), sent as\n`Authorization: Bearer <key>` or `X-API-Key: <key>`. Full setup:\nhttps://pastepile.com/docs/mcp/remote\n\n## Example\n\nOnce configured, ask your assistant to use it in plain language:\n\n> \"Save this migration plan to Pastepile so we can pick it up tomorrow.\"\n\n> \"Pull up the paste at pastepile.com/p/abc123 and continue where we left off.\"\n\n> \"Checkpoint our current decisions before the context window fills up.\"\n\n> \"Forget that draft you saved earlier, it is wrong.\"\n\nThe assistant calls `pastepile_save`, `pastepile_checkpoint`, `pastepile_get`,\nor `pastepile_forget` for you and keeps the returned slug in context.\n\n## How it works\n\nThis server is a thin wrapper over the public Pastepile REST API\n(`/api/public/pastes`). With an API key it holds no state of its own: every\ntool call is one HTTPS request, tagged with a `pastepile-mcp/<version>`\nUser-Agent. Trial memory (no key) keeps exactly one small local file, the\nsession index under `PASTEPILE_STATE_DIR`, because without a key there is no\nserver-side namespace to attach sessions to. Your content goes straight to\nPastepile under the same privacy model as the web app and CLI.\nFor end-to-end encryption, create the paste in the web app or CLI (the\nencryption key never leaves the client) and share the resulting link.\n\n## License\n\nMIT. Part of the [Pastepile](https://pastepile.com) project.",
  "bytes": 12256,
  "sha": "5e43e6510691753adfbbaf7d4a2d804d936725ae6135e7c6096180d3792156ee",
  "repo_slug": "asterismos-v1/pastepile",
  "fonte": "npm",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_pastepile_mcp_26deaba2/readme"
}