# zzhang82/Agent-Memory-Bridge [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/zzhang82/Agent-Memory-Bridge  
**GitHub Stars:** 7  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/zzhang82-agent-memory-bridge

## Description
MCP-native, local-first memory for coding agents that turns coding sessions into reusable engineering memory: decisions, gotchas, and domain knowledge.

## Tools
Capabilities this server exposes over MCP:

- **store** — Store one entry in the bridge for later retrieval or coordination.

    Use this tool when you want to persist a compact memory record or write a signal
    that another workflow can poll later. Write durable knowledge as `kind="memory"`
    and transient coordination events as `kind="signal"`.

    Returns the stored entry identifier, timestamp, and duplicate information. Repeated
    `memory` writes may deduplicate; `signal` writes are intended to remain append-like.
    
- **recall** — Recall matching entries or poll for new signals from the bridge.

    Use this tool to search durable memory, filter by metadata, or poll for fresh
    coordination signals. For issue-like work, prefer project and domain recall before
    external search. For workflow polling, pass `since`, an empty query, and `kind="signal"`.

    Empty-query Signal recall returns a `next_since` cursor for the next polling cycle;
    other recall modes return `next_since=null`. The cursor tracks later insertions,
    not status changes to older Signals.
    
- **browse** — Browse recent items when you do not yet know what to search for.

    Use this tool to inspect a namespace by filters alone. It is useful when you want
    to see recent memory, scan a domain bucket, or confirm that signals are flowing
    before writing a more specific recall query.
    
- **stats** — Return a quick health summary for one namespace.

    Use this tool when you want to inspect what is in the bridge without opening SQLite
    directly. It returns total item count, a kind breakdown, top domains, and the
    oldest and newest entry timestamps for the namespace.
    
- **forget** — Delete one stored entry by id.

    Use this tool to remove a bad memory, an accidental write, or a signal that should
    no longer exist. The response tells you whether anything was deleted and returns the
    removed item metadata when a match is found.
    
- **feedback** — Record structured retrieval feedback for one recalled memory result.

    Evidence is append-only/shadow-only. Provenance is caller-declared and not
    authenticated. This tool does not mutate memory records, recall results, or
    ranking behavior.
    
- **promote** — Manually promote one stored memory to a stronger durable record type.

    Use this tool when you know a record should be treated as a learn, gotcha, or
    domain note even if the reflex layer has not promoted it yet. Promotion keeps the
    same id and updates the stored title, tags, and structured content in place.
    
- **annotate** — Explicitly enrich one durable memory without pretending the write was a new fact.

    Use this after `store` reports `duplicate_with_new_metadata`. The original content
    remains unchanged; title/tag changes and additional provenance are written to an
    auditable annotation record.
    
- **revise** — Create a new durable memory that explicitly supersedes an older record.

    The predecessor remains available for audit. The bridge adds an exact `supersedes`
    edge and records the revision receipt instead of silently mutating content in place.
    
- **export** — Export bridge content into a readable or portable format.

    Use this tool when you want to inspect a namespace outside the MCP client, create
    a human-readable snapshot, or move memory into another system without opening the
    database directly.
    
- **begin_run** — Start one explicit, stateless run and return server-minted run/work-item IDs.

    The bridge does not retain an implicit current run. Callers must pass the returned
    handles to later event, read, and completion calls. Idempotent retries return the
    same handles and reject conflicting payloads.
    
- **record_run_event** — Append one structured event to a run's durable authority ledger.

    Sequence allocation, event persistence, child work-item creation, and projection
    updates occur in one transaction. This tool never sets an implicit current run.
    
- **get_run** — Read current run/work-item projections plus append-only events for reconnect or compaction recovery.
- **complete_run** — Append or correct a run outcome without changing memory ranking or policy.

    On new runs, `verified_success` requires a matching current server-minted governed receipt.
    Outcome corrections form an append-only supersession chain.
    
- **claim_signal** — Claim one signal with a short lease for lightweight work coordination.

    Use this when a worker should take ownership of a pending signal before it acts.
    If `signal_id` is omitted, the bridge claims the next eligible signal in the
    namespace that matches the optional filters, with a small fairness bias inside
    the oldest pending window so one polling consumer does not keep winning by accident.
    
- **extend_signal_lease** — Extend the active lease on one claimed signal.

    Use this when a worker still owns a signal but needs more time before another
    consumer can reclaim it. Expired leases cannot be extended; those signals must
    be reclaimed instead. Hard signal expiry still takes precedence over lease renewal.
    
- **ack_signal** — Acknowledge one claimed or pending signal so downstream polling can stop treating it as active work.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "agent-memory-bridge": {
    "command": "uvx",
    "args": ["agent-memory-bridge"],
    "env": {
      "AGENT_MEMORY_BRIDGE_HOME": ""
    }
  }
}
```

**Requires environment variables:** `AGENT_MEMORY_BRIDGE_HOME` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What zzhang82/Agent-Memory-Bridge does

zzhang82/Agent-Memory-Bridge provides local, MCP-native memory for coding workflows. It keeps project decisions, their reasons, constraints, gotchas, and domain knowledge available beyond the session that created them. A later agent can retrieve those records from the same bridge rather than reconstructing context from an earlier conversation.

The bridge also handles short-lived coordination. Signals can represent work that another process should poll, claim, lease, and acknowledge. Durable memories and transient signals use separate semantics: repeated memory writes may be deduplicated, while signals are intended to remain append-like.

Records can be corrected without erasing history. A revised memory supersedes its predecessor, annotations add metadata without presenting the operation as a new fact, and promotion changes a record into a stronger durable type while retaining its identifier.

## How it works

The server uses namespaces to separate project or workflow data. Project initialization detects a Git repository and proposes a namespace such as `project:my-app`; `project resolve` can later return the namespace for use by clients. Multiple processes can share a home directory, allowing one process to store a decision and another fresh process to recall it.

Memory retrieval is explicit. Connecting an MCP client does not automatically cause an agent to learn or recall records. A workflow should call `recall` at startup or before changing code, using the relevant project and domain filters. `browse` is useful when the search terms are not yet known, while `stats` provides a compact view of counts, kinds, domains, and time boundaries.

Run tracking is stateless from the caller’s perspective. A caller starts a run, passes the returned run and work-item handles to later event, read, and completion operations, and can use `get_run` for recovery after reconnects or compaction. Run outcomes and corrections are recorded without changing memory ranking.

## Setup and configuration

AMB requires Python 3.11 or newer and Git. A typical setup creates a virtual environment, installs the `agent-memory-bridge` package, initializes the project, and runs the diagnostic command:

```bash
python3 -m venv .amb-venv
.amb-venv/bin/python -m pip install agent-memory-bridge
.amb-venv/bin/python -m agent_mem_bridge project init . --yes
.amb-venv/bin/python -m agent_mem_bridge doctor
```

Run the module with one persistent `AGENT_MEMORY_BRIDGE_HOME` so separate processes use the same bridge. Client configuration can be generated with `connect <client> --yes`, or written manually from the MCP command shape. Supported connection commands include Claude Code, Cursor, Codex, Cline, and VS Code. Trigger reminders can be installed separately for supported workflow moments.

An existing home can be selected by setting `AGENT_MEMORY_BRIDGE_HOME`; this is also useful when moving an older bridge directory to a new location. Project-level token configuration must remain outside version control.

## Tools and capabilities

- `store` writes durable memories or transient signals and reports identifiers, timestamps, and duplicate information.
- `recall` searches memories, filters metadata, or polls signals. Empty-query signal polling returns a cursor for the next cycle.
- `browse` lists recent records by namespace filters, while `stats` reports namespace health and composition.
- `forget` removes a record by ID. `promote`, `annotate`, and `revise` support controlled changes with provenance or predecessor history.
- `feedback` records append-only retrieval feedback without changing stored memories, results, or ranking.
- `export` produces readable or portable output for inspection or migration.
- `begin_run`, `record_run_event`, `get_run`, and `complete_run` provide explicit run and work-item tracking.
- `claim_signal`, `extend_signal_lease`, and `ack_signal` coordinate workers around pending signals with short leases.

## Limitations and notes

The bridge does not infer memories from chat automatically. Agents must store confirmed knowledge and must recall it intentionally. Free-form `kind="memory"` records can be retrieved, while decision and constraint workflows use declared record types for exploration and inspection.

Signal polling cursors track later insertions, not status changes to older signals. Expired leases cannot be extended and must be reclaimed, and hard signal expiry takes precedence over renewal. Feedback provenance is caller-declared rather than authenticated.

Connection or trigger setup can create untracked project files, which may make the Git worktree appear dirty until those files are committed or ignored.

_Full upstream README: https://allmcps.com/mcp/zzhang82-agent-memory-bridge/readme_

