Skip to main content

A persistent, portable memory tool for Claude Code and MCP clients.

Project description

mcp-backpack 🎒

A persistent, portable memory layer for Claude Code.

Website: mcpbackpack.com

mcp-backpack gives your AI agent a "hard drive." It creates a project-scoped database in your working directory, allowing Claude to remember context, architectural decisions, and to-do lists even after you clear the context window or restart your terminal.

Unlike other memory tools, Backpack is designed for travel. You can "pack" your memory into a JSON file, commit it to Git, and "unpack" it on a different machine.

Features

  • 💾 Persist Context: Save generic thoughts, summaries, and state to a local SQLite database (.backpack_memory).
  • 📂 Project Scoped: Automatically detects which project you are working in and creates a separate memory silo for it.
  • ✈️ Git Syncing: Export your database to backpack.json to share context with your team or sync between your work laptop and home PC.
  • ⚡ Zero Config: Built on diskcache and mcp. No running servers or Docker containers required.

Installation

Option 1: Install via PyPI (Recommended)

You can add this tool directly to Claude Code using uvx.

claude mcp add backpack -- uvx mcp-backpack

Option 2: Run from Source (Local Development)

If you have cloned this repository and want to run it locally:

# Assuming you are in the repo root
claude mcp add backpack -- uvx --from . mcp-backpack

Configuration

To prevent committing your local binary database to Git, you must update your .gitignore.

Run this command in your project root:

echo ".backpack_memory/" >> .gitignore

Note: Do NOT ignore backpack.json if you intend to use the syncing feature!

usage

Once installed, simply talk to Claude. The tool exposes the following capabilities:

1. Daily Workflow

  • Save a thought: "Put the current API schema in the backpack as schema:auth."
  • Retrieve a thought: "Check the backpack for schema:auth."
  • Search: "Rummage through the backpack for anything related to 'database'."
  • List all: "List contents of the backpack."

2. The "Context Compaction" Protocol

When Claude's context window fills up, use the backpack to save your state before clearing:

"Before we compact context, please save our current task:next_steps and session:summary to the backpack."

3. Syncing Across Machines (Travel Mode) ✈️

Moving from your work computer to your personal laptop?

  1. At Work: "Pack for travel." (Creates backpack.json)
  2. Git: git add backpack.json && git commit -m "sync memory" && git push
  3. At Home: git pull
  4. Claude: "Unpack from travel."

Tools API

The server exposes the following tools to the LLM:

Tool Description
put_in_backpack Saves a key-value pair to the local .backpack_memory database.
check_backpack Retrieves a specific value by key.
rummage_backpack fuzzy searches for keys containing a specific string.
list_contents Lists all keys currently stored in the project's backpack.
toss_out Permanently deletes a key from memory.
pack_for_travel Exports the binary database to a human-readable backpack.json.
unpack_from_travel Imports backpack.json into the active memory.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_backpack-0.1.1.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_backpack-0.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_backpack-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_backpack-0.1.1.tar.gz
  • Upload date:
  • Size: 49.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_backpack-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e7766a6e718d8263c9007443cbc2831d5fdcf5620dd5cbc16c6f8e9a561b9c5a
MD5 b1fb3e187e8f060dc248c3f33f375d58
BLAKE2b-256 b260f54b0e7bd1d5e5f78b0efb7c7805031b3f77d85c48b083e58866183fb901

See more details on using hashes here.

File details

Details for the file mcp_backpack-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mcp_backpack-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_backpack-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2d23abc7ba96c74bbe1bd3787829e7e258eb2f4b84a7e2e41bd516e7595f6ce
MD5 d54852675997e04f2511261ea0f45301
BLAKE2b-256 72110a557ceaf5f3278beedab70dad9e1146a406525b44936ddebb5923181475

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page