Agent Memory MCP logo

Agent Memory MCP

File-based memory and rule enforcement for coding agents, with search, Git sync, companion files, and receipt-gated destructive actions.

Install Agent Memory MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "agent-memory-mcp-3": {
      "command": "npx",
      "args": [
        "-y",
        "@xultrax-web/agent-memory-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio agent-memory-mcp-3 -- npx -y @xultrax-web/agent-memory-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Automated check passed— started and listed 24 tools correctly ().

Overview

agent-memory-mcp stores agent memories as editable Markdown files with YAML frontmatter instead of using a database. It provides tools for saving, searching, retrieving, organizing, verifying, and soft-deleting memories, plus Git-based synchronization across machines. Rule memories can be emitted to AGENTS.md, CLAUDE.md, Cursor rules, and Gemini instructions, while check_action evaluates proposed operations and can issue short-lived compliance receipts. Reach for it when a coding agent needs persistent project context, navigable memory relationships, or enforceable operational rules.

Use cases

  • Persist project decisions and context between coding sessions
  • Search and inject relevant Markdown memories into an agent prompt
  • Define rules that constrain destructive coding-agent actions
  • Synchronize memory files across machines with Git
  • Generate shared instructions for supported coding-agent clients

Key features

  • Markdown files with YAML frontmatter
  • Fuzzy search and full-content relevance retrieval
  • Rule memories with hard and soft enforcement
  • Short-lived, signed compliance receipts
  • Git synchronization across machines
  • Companion files for agent instruction formats

Tools24

What Agent Memory MCP lets your agent do. Expand a tool for its parameters.

Verified live~3.5k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 82d

What it can do

From the 24 tools this server returned when we ran it.

Can delete or modify data · 1Handles credentials · 2Makes network requests · 3Read-only tools · 23
Tool definitions changed on 2026-11-12. Review them if you approved this server earlier.
Network at startup3 connections
Files written at startup1
Install scriptsprepare
npm provenanceNot published
Package age174 days
Maintainers1

Observed 2026-11-12 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · @xultrax-web/agent-memory-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads773Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed24Callable tools this server registers over MCP.
Directory activity10 viewsConfig copies, upvotes, and views on AllMCPs.

How Agent Memory MCP works

What agent-memory-mcp does

agent-memory-mcp provides a file-based memory store for AI coding agents. Each memory is a Markdown file with YAML frontmatter, stored in a resolved memory directory and represented in an index. The files remain directly accessible for reading, editing, searching, and committing with normal developer tools. The project uses Git rather than a database, daemon, or hosted service to preserve and synchronize memory.

The store can hold general context such as decisions, recipes, and project notes, as well as rule memories. Rules describe constraints with fields such as severity, scope, natural-language conditions, matching patterns, enforcement categories, and verification dates. Hard rules are intended to block matching operations; soft rules produce warnings.

How it works

Use save_memory to create or update a Markdown memory, then browse it with search_memories, list_memories, or get_memory. Fuzzy search considers the memory name, description, and body, while relevant_memories returns complete matching documents for model context. find_backlinks and find_related support navigation through [[wiki-link]] references, shared tags, memory types, and content similarity.

Rule enforcement centers on check_action. The server compares a proposed action with rule patterns and enforcement categories. Approved actions receive a short-lived Compliance Receipt; denied actions return hard violations and soft warnings. Destructive deletion of a memory requires a fresh receipt bound to that specific memory and action, and the receipt can only be used once. validate_receipt lets another agent-memory server verify Ed25519 receipts using the issuing server's public key.

The server also includes an optional sampling-based second tier for rules containing natural-language applies_when conditions. Clients that advertise MCP sampling can use that tier; deterministic pattern matching remains available for clients without it.

Setup and configuration

Install the package globally with npm i -g @xultrax-web/agent-memory-mcp, or invoke it through npx -y. Add the server to an MCP client, then run init to install starter guardrails covering examples such as protecting the main branch, avoiding recursive deletion, and flagging secrets. install-hooks connects hard and soft rules to Claude Code's PreToolUse hook so rules can affect the agent's shell and file operations, not only this server's tools.

Set AGENT_MEMORY_AUTO_EMIT_DIR to have rule saves regenerate companion files automatically. AGENT_MEMORY_COMPANION_DIR selects the default output directory for emit_companions; an explicit out_dir takes precedence. The companion targets are AGENTS.md, CLAUDE.md, .cursor/rules/*.mdc, and .gemini/instructions.md. Set CRP_SIGNING_MODE=ed25519 to use Ed25519 signing and publish a public key for cross-server receipt validation.

Tools and capabilities

  • Save, update, retrieve, list, fuzzy-search, and delete memories.
  • Restore soft-deleted files from .trash/ and inspect storage integrity with doctor.
  • Review counts, sizes, audit-log data, and trash contents with stats.
  • Inspect audit events, verify memory signals, and identify stale or questionable content.
  • Save rules, list active rules, audit rule health, and regenerate agent-specific companion files.
  • Check proposed actions and validate receipts from another server.
  • Inspect Git sync state, pull fast-forward updates, and commit and push memory changes.
  • Rotate HMAC or Ed25519 signing keys, invalidating outstanding receipts.

Limitations and notes

Memory deletion is intentionally a two-step operation: call check_action with the exact deletion action, then pass the resulting receipt to delete_memory. Deleted files move to .trash/ and remain recoverable until that directory is emptied.

check_action gates tools exposed by agent-memory-mcp. Enforcing rules on an agent's real shell commands or file writes requires the Claude Code hook installed through install-hooks. The server's keyring is kept under the memory directory and should not be committed or synchronized.

Git synchronization is fast-forward only for pulls, and sync_pull refuses to run when local memory changes are uncommitted. Companion-file generation supports four target formats, with output selection controlled by emit_companions.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agent Memory MCP

agent-memory-mcp is an MCP server that connects AI coding agents to a Git-friendly Markdown memory store. Its main tools save, search, retrieve, relate, verify, and synchronize memories, while rule and receipt tools check proposed actions, block configured violations, and support controlled destructive operations.

Install it globally with `npm i -g @xultrax-web/agent-memory-mcp`, or run it with `npx -y` after adding it to your MCP client. Run `agent-memory init` for starter guardrails and `agent-memory install-hooks` to connect enforcement to Claude Code.

It stores memories as Markdown files with YAML frontmatter in the resolved memory directory. The files are indexed for MCP queries, remain editable with normal command-line tools, and can be committed and synchronized through Git.

Save rules with `save_rule`, then evaluate proposed operations with `check_action`. Hard violations are denied and approved operations receive short-lived receipts. To enforce rules on Claude Code shell and file operations, run `install-hooks` after initializing the starter rules.

Yes. Cursor is supported as an MCP client, and rule memories can be emitted as `.cursor/rules/*.mdc` files. The server also provides a Cursor installation link and can mark hard rules for automatic application in the generated MDC files.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgent Memory MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agent-memory-mcp-3?style=directory)](https://allmcps.com/mcp/agent-memory-mcp-3)
HTML Embed
<a href="https://allmcps.com/mcp/agent-memory-mcp-3"><img src="https://allmcps.com/api/badge/agent-memory-mcp-3?style=directory" alt="Agent Memory MCP on AllMCPs" /></a>