context-bridge
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@context-bridgeSearch the context bridge for our database schema discussion."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Context Bridge — operating doc
See PLAN.md for the original design rationale. This file is the practical
"how do I actually run this" companion.
Installation
bash install.shThe wizard creates a .venv, installs dependencies, registers the MCP server
with Claude Code (global by default, so it's available in every session), and
writes a .env file for local config.
Configuration — .env (created by the wizard, gitignored) supports:
Variable | Default | Purpose |
|
| Where the database lives |
Edit .env directly to change these after initial setup. See .env.example for
the template.
Related MCP server: claude-kb
Getting your Claude.ai export
There is no API for this — the export is pull-only, triggered manually:
Go to Claude.ai → Settings → Account → Export Data
Anthropic emails you a
.dmsfile attachment (has been a few minutes in my exp)Run
./build_all.sh path/to/export.dms— it handles the rename, unpack, and rebuild
Abstract overview
Claude.ai export (.zip) ~/.claude/projects/**/*.jsonl
│ unzip │ ingest_code_sessions.py
▼ │ (incremental, walk parentUuid tree)
data/inspect/ │
│ ingest.py + embed.py │
│ (full rebuild via build_db.py) │
└──────────────────┬────────────────────┘
▼
chat_memory.db (SQLite — chunks + sessions + meta)
│ source: 'claude_ai' | 'claude_code'
│ server.py: search_chat_history, get_conversation
▼
Claude Code session, via "context-bridge" MCPbuild_db.py always parses the entire data/inspect/ export and re-embeds
everything, but before the atomic replace it merges back any claude_ai
chunks from the previous DB whose conversation/project UUID is absent from the
new export. This means a partial export (e.g. 90-day-only) is safe — older
history that isn't in the new export is preserved from the old DB.
One exception: if the embedding model changes between builds, the merge is
skipped (mixing vectors from two models would corrupt search). In that case run
build_db.py with a full export to get a clean rebuild.
Command cheat sheet
Refresh the DB from a new export (standard workflow — run this whenever you pull a new Claude.ai export):
cd context_bridge
./build_all.sh data/chat-archive-<date>.dmsPass the export file (.dms or .zip) and build_all.sh handles the unpack
step automatically. Omit the argument if data/inspect/ is already populated.
Run the MCP server manually (for a quick smoke check outside Claude Code):
cd context_bridge
./run_server.sh(This is also what install.sh registers as the context-bridge MCP server —
no separate setup needed once the venv/deps exist.)
Sanity-check ingest/parsing only (no embedding, no DB write — just see what the export produces):
cd context_bridge
python3 ingest.py # defaults to ./data/inspectRun the retrieval/smoke tests:
cd context_bridge
python3 smoke_test.py
python3 retrieval_smoke_test.py
python3 mcp_smoke_test.pyRefresh the DB from new Claude Code sessions (incremental — safe to re-run any time; skips already-ingested sessions):
cd context_bridge
python3 ingest_code_sessions.pyHow the MCP server is actually used
The server registers two tools with Claude at session start: search_chat_history
and get_conversation. Their schemas cost ~100–200 tokens each for the lifetime
of the session, whether or not they're ever called.
What triggers a search: the tool description drives autonomous behavior.
The current description is reactive — Claude calls search_chat_history when
it notices it's about to re-derive something it suspects has been covered before.
In a narrow coding task it may never fire; in a design or planning conversation
it may fire more.
The most reliable pattern: ask explicitly.
"Search the context bridge for [topic]."
This produces a direct, well-formed tool call rather than leaving query construction to Claude's autonomous judgment. Semantic search rewards descriptive phrases over single keywords — "what did we decide about chunking strategy" retrieves better than "chunking".
Current retrieval limitation: search_chat_history has no locality signal.
A query from a sol_reason session ranks sol_reason sessions no higher than
sessions from synesthesia, djmgmt, or any other project. This is the Phase 3
gap (current_project parameter — see PLAN.md). Until Phase 3 is implemented,
cross-project noise is a known retrieval quality ceiling.
Notes / known constraints
Export is manual, pull-only (Claude.ai Settings → Account → Export Data) — no API/webhook trigger.
build_db.pywrites to a.tmpfile andos.replaces it into place, so a crash mid-rebuild never leaves a half-writtenchat_memory.dblive.chat_memory.dbanddata/are gitignored — they're local build artifacts and data files, not committed.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zachvp/context_bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server