Skip to main content

Cross-project memory sharing for Claude Code and Cowork. Namespaces let projects share knowledge without polluting global scope.

Project description

memory-bridge

Cross-project memory sharing for Claude Code and Cowork. Stop teaching Claude the same thing twice.

Claude's memory is project-isolated. Teach it "use pnpm" in project A, repeat yourself in project B. memory-bridge adds a shared layer — namespaces — between global and project scope. Solves #36561 and #39195.

Global      ~/.claude/CLAUDE.md                      (Claude native)
Namespace   ~/.claude/shared-memory/<ns>/*.md         (memory-bridge)
Project     ~/.claude/projects/<proj>/memory/*.md     (Claude native)

Install

Claude Code (one command)

claude mcp add memory-bridge -- uvx claude-memory-bridge

Done. No clone, no config files.

Cowork Desktop

Add to your config file (Settings > Developer > Edit Config):

{
  "mcpServers": {
    "memory-bridge": {
      "command": "uvx",
      "args": ["claude-memory-bridge"]
    }
  }
}

Then restart Cowork.

Manual install (advanced)

git clone https://github.com/LewenW/claude-memory-bridge.git
cd claude-memory-bridge
pip install -e .
python scripts/install.py

Tools

Tool What it does
search_memories Search across all projects and shared namespaces
promote_memory Move a memory from project to shared namespace
sync_memory Copy a memory to specific projects
list_shared_memories Browse namespace contents
manage_namespaces Create, delete, subscribe, unsubscribe
get_memory_health Find duplicates, stale entries, broken indexes

Quick start

In a Claude Code or Cowork session:

# Create a namespace
"Create a shared namespace called 'frontend' for React conventions"

# Share knowledge
"Promote 'Use pnpm, not npm' to the frontend namespace"

# Subscribe a project
"Subscribe my dashboard project to the frontend namespace"

# Search across everything
"Search memories for pnpm"

Client compatibility

Client Auto Manual
Claude Code (CLI) Yes Yes
Cowork — Code mode Yes Yes
Cowork — Cowork mode :( Yes — mention "memory-bridge" or tool name

Cowork mode loads the MCP tools but doesn't inject server instructions, so Claude won't use them unprompted. Workaround: say "use search_memories" or mention "memory-bridge". This will work automatically once Cowork supports MCP instructions.

How it works

  • Reads/writes Claude's native ~/.claude/projects/*/memory/*.md directly — no database
  • Shared memories in ~/.claude/shared-memory/<namespace>/
  • registry.json tracks namespace subscriptions
  • Word-boundary TF-IDF search scoring
  • Trigram Jaccard similarity for duplicate detection (threshold 0.45)

Uninstall

claude mcp remove memory-bridge    # Claude Code

Or remove the memory-bridge entry from your Cowork config file.

Project structure

src/memory_bridge/
├── server.py              MCP server, 6 tools
├── config.py              Paths + constants
├── models.py              Dataclasses
├── store/
│   ├── base.py            MemoryStore interface
│   └── filesystem.py      File I/O + keyword search
└── engine/
    ├── retriever.py       Cross-project search
    ├── promoter.py        Project → namespace promotion
    ├── namespace_manager.py   Namespace CRUD
    └── health_analyzer.py     Dedup + staleness + index audit

License

MIT

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

claude_memory_bridge-0.1.1.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

claude_memory_bridge-0.1.1-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: claude_memory_bridge-0.1.1.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.2 HTTPX/0.28.1

File hashes

Hashes for claude_memory_bridge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3749e36eed20429a918e9daa142c701641e545027888075115cfb7512bd5c7fb
MD5 a8279ec30b1ec5dfc259b50d2e782162
BLAKE2b-256 9acf28d136189b2f61386cc4a88b408a721bd9a4cc85671c1473c6c03815c838

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for claude_memory_bridge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 904e41ac027b1f390a09c853e1ecc36a93c7c3ecf83da5f1a75a85dd8711cf52
MD5 48084f82329526663152e7331a422b02
BLAKE2b-256 736619356dc3a51440000ba9cb43205e8c5f57090f23725488085b0fdbd68f5f

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