Agent Memory Bridge MCP server
Commit Nov 14, 2026Provides a persistent local memory layer for coding agents to store and recall project decisions and their underlying reasons across sessions.
Also known as zzhang82/Agent-Memory-Bridge
- Stars
- 7
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 14, 2026
- License
- MIT
What is Agent Memory Bridge MCP?
Agent Memory Bridge provides a persistent local memory layer for coding agents to store and recall project decisions and their underlying reasons across sessions.
Summary generated from the project's README
About Agent Memory Bridge MCP server
Agent-Memory-Bridge provides a persistent local memory layer designed specifically for coding agents to maintain project context across different sessions. Instead of relying on chat history, it allows an agent to store a specific decision and the underlying reason for that decision in a local store. This ensures that when a new session begins, the agent can explicitly recall why certain architectural choices or constraints were made.
The system operates as a local stdio MCP server, requiring Python 3.11 or higher and Git. Users initialize a project using the project init command to establish a namespace, such as project:my-app. Developers can then use the store tool to save confirmed decisions and the recall tool to retrieve them. It is built for privacy and reliability, keeping all data in a local home directory rather than a hosted service. This makes it suitable for developers using clients like Claude, Cursor, or VS Code who need to bridge the gap between what the code shows and why it was written that way.
What you can do with it
- 1Recall project decisionsAn AI agent can retrieve the reasoning behind a specific coding rule at the start of a new session.
- 2Maintain project namespacesOrganize memory by specific applications or domains using the project initialization workflow.
- 3Audit memory contentsUsers can inspect the local memory to understand why specific information was surfaced to the agent.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablezzhang82/agent-memory-bridge is public and reachablegithub.com/zzhang82/agent-memory-bridge ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-13github.com/zzhang82/agent-memory-bridge ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubThe loop
One process stores a decision. A second process, on the same AMB home, recalls the claim and the reason. The recording is that local stdio proof. It is not a filmed coding-agent session, and it is not an adoption measurement.
The source is examples/demo/first-win-demo.cast. The block below is an abridged transcript of that cast. Regenerating it runs the two processes, then writes generated playback: the header time and the line delays are fixed, not a measurement of the run. Command: python ./scripts/build_first_win_cast.py. Rendering a GIF needs agg; this repository does not include that GIF.
# Session A: store one explicit decision
namespace: project:checkout-app
claim: Merge pull requests only after CI is green on the target branch.
reason: Broken main blocked two releases this month.
stored: true
# Session B: a second stdio process, same home, recall at start
query: What is required before we merge a pull request?
claim: Merge pull requests only after CI is green on the target branch.
reason: Broken main blocked two releases this month.
same_record: true
fresh_process: true
Recall at the start
Connecting the server is not enough. The next session has to recall on purpose. This page does not claim that connecting MCP, or leaving a skill where it can be found, makes that happen by itself. There is no automatic learning.
Put this rule where the next session will actually follow it:
Before changing code, recall this project's Agent Memory Bridge decisions and their reasons.
Use the namespace from `project resolve`. Call the public `recall` tool.
Store a decision only after it is confirmed. Do not treat chat history as already stored.
Install, then bind the project
AMB requires Python 3.11+ and Git.
Current package/source version: 0.38.4.
python -m venv .amb-venv
<venv-python> -m pip install agent-memory-bridge==0.38.4
<venv-python> -m agent_mem_bridge project init .
Replace <venv-python> with the Python executable inside .amb-venv. project init detects the Git repository, proposes a namespace such as project:my-app, and waits for confirmation. It does not learn decisions from the tree. After that, project resolve . returns the namespace.
Run <venv-python> -m agent_mem_bridge with one persistent AGENT_MEMORY_BRIDGE_HOME. How a client launches that process stays outside Core. The command shape is in Integrations. Connection is real when the client lists store and recall.
Store one confirmed decision with store. In the next session, use the startup rule above and ask for that decision.
AMB does not discover, write, or certify Codex, Claude, Cursor, OpenCode, Hermes, Cline, VS Code, or Antigravity. Clients configure AMB as a standard MCP stdio server and point shared projects at the same local home.
If an existing bridge lives at ~/.codex/mem-bridge, v0.36 does not open it automatically. Set AGENT_MEMORY_BRIDGE_HOME to that directory, or copy it to ~/.local/share/agent-memory-bridge. The configuration guide has the cutover.
The companion skills are optional help for discovery and everyday use. They do not replace the startup rule above. Install them from Agent-Memory-Skills:
npx skills add zzhang82/Agent-Memory-Skills --skill amb
npx skills add zzhang82/Agent-Memory-Skills --skill amb-connect
amb(raw)amb-connect(raw)
For a source checkout, install with <venv-python> -m pip install -e . instead of the pinned package.
Human-first Explore answers “What does AMB currently know?” Inspect answers “Why did this information surface?” Both are local and read-only. They are not the success check.
<venv-python> -m agent_mem_bridge explore --namespace project:my-app
<venv-python> -m agent_mem_bridge inspect \
--namespace project:my-app \
--query "What is required before we merge a pull request?"
Code tells AMB what the repository contains. A confirmed decision tells it why. Derived repository facts come from a clean Git commit. If HEAD moves or the worktree is dirty, refresh on purpose:
<venv-python> -m agent_mem_bridge bootstrap-repo . --namespace project:my-app
Refreshing repository facts leaves stored decisions unchanged. Explore is CLI-only. It is not an extra MCP tool.
doctor and verify check server prerequisites. They do not prove that a client loaded its MCP config. first-run is optional guided help, not the first-win path. Historical Codex observations from the v0.35 line are in First-win acceptance.
Why the memory stays trustworthy
The useful part is not remembering more. It is knowing where a decision came from, whether it is still current, and how it changed.
| Memory concern | AMB approach |
|---|---|
| Current repository truth | Derived from a clean repository state and refreshed explicitly |
| Human decisions and constraints | Stored explicitly as governed durable memory |
| Changed knowledge | Revised or superseded instead of silently overwritten |
| Why context surfaced | Inspectable through local derived views and evidence paths |
| Cross-session reuse | Shared through the same configured local AMB home |
| Privacy | Local-first; no hosted memory service is required |
Code tells the next session what exists. AMB retains the confirmed reasons the code does not explain.
What AMB is — and is not
AMB is a governed local project-memory layer for coding agents. Durable knowledge, derived repository facts, provenance, and corrections stay distinguishable.
It is not a transcript archive, a promise that an agent will remember everything, or a system that silently converts every conversation into durable truth. There is no automatic learning.
Memory hygiene: Structure over prose
Do not treat memory as a prompt trash can for linter errors, directory conventions, or syntax dos and don'ts. If an agent makes the same mechanical mistake twice, harden the repository environment with linter rules, type guards, or pre-commit checks. Reserve AMB durable memory for the reasons that code cannot convey: architectural decisions, domain invariants, and third-party library gotchas. See the Memory Hygiene Guide for the 3-question ingestion filter.
Want the details?
| Read | For |
|---|---|
| First-win demo | The local two-process recording, and the older coordination demo |
| First-win acceptance | Historical Codex observation from the v0.35 line |
| Architecture | System shape and data flow |
| Authority model | Durable authority, derived views, correction, and audit rules |
| Knowledge Explorer | Human-first read-only project view |
| Memory Hygiene | Anti-pollution rules and the structure-over-prose boundary |
| Production Status | Current implementation facts, evidence, and known limits |
| Integrations | Generic stdio MCP installer contract |
| Install for Agents | Full install-to-first-success workflow |
| Configuration | Complete configuration reference |
| Examples | Sanitized demos and artifacts |
Technical model
Internally, AMB keeps derived_repository data separate from governed durable memory so one cannot silently become the other. For maintainers and reviewers, the current authority flow is:
flowchart LR
A[Durable Memory / WHY] --> C[Lifecycle-aware Recall]
B[Repository Knowledge / WHAT] --> D[Context Compiler]
S[Dynamic State Authority] --> D
C --> E[Governed Task Memory]
E --> D
D --> F[Transient Bounded Context]
F --> G[Metadata-only Context Attestation]
G --> H[Episode and Run Authority]
H --> I[Verification Receipt]
I --> J[Current Verified Outcome]
SQLite/WAL rows are durable authority. Repository snapshots, FTS rows, embedding sidecars, compiled context, reports, and Explorer views are derived. Context bodies are rendered in process and are not durably persisted by the compiler.
Optional HTTP gateway & deployment
AMB runs as a local-first stdio process by default, with an optional official Streamable HTTP transport and Optional HTTP gateway:
- Local stdio: no authentication or gateway configuration; it runs as before for individual agents.
- Optional HTTP gateway: per-client Bearer tokens, 4 roles (
admin,writer,reader,orchestrator), namespace limits (project:*,domain:*), and structured JSONL audit lines. - Audit kept out of SQLite: audit lines go to stdout, stderr or a file, not the database.
For remote server, NAS, or container setup, see Remote Deployment.
Trust and privacy
AMB is local-first. It does not require a hosted memory service. It separates durable memory from coordination Signals and mutable Dynamic State, keeps provenance visible, and rejects raw transcripts, hidden reasoning, and inline artifact bodies from the durable episode path.
Read the Trust Boundary, Authority Contract, and Closed-Loop Episode Authority for the exact boundaries.
MCP Tools
AMB exposes 17 public MCP tools:
store,recall,browse, andstatsforget,feedback,promote,annotate,revise, andexportbegin_run,record_run_event,get_run, andcomplete_runclaim_signal,extend_signal_lease, andack_signal
The public tool surface stays small. Setup, Project Init, Explore, Inspect, context assembly, and review reports remain CLI or internal derived workflows rather than becoming more MCP tools.
The local protocol cache contract is 300000/public for discovery and 0/private for the tool list; see MCP Compatibility for details.
Current maturity
Current package/source version is 0.38.4. Schema remains v12 and the public MCP surface remains exactly 17 tools. There is no automatic learning and no MCP tool #18. project init is the preferred first-project path. Default Explore is a Human-first view over existing repository-derived context and governed project knowledge. Current evidence and non-claims live in Production Status; published artifacts live in GitHub Releases.
Contributing
Read CONTRIBUTING.md for development and public-surface expectations, and SECURITY.md for vulnerability reporting.
Licensed under MIT.
Agent Memory Bridge MCP questions
What is the difference between repository facts and memory?
Code tells the agent what exists, while AMB retains the confirmed reasons why certain decisions were made that the code cannot explain.
Is my data sent to a hosted service?
No, the system is local-first and does not require a hosted memory service.
Can I use this with existing AI coding tools?
Yes, clients can configure AMB as a standard MCP stdio server and point shared projects at the same local home.