MCP stdio server that manages local memory.md with dedupe/merge/cleanup.
Project description
memmd-mcp
A memory layer for AI agents — local memory.md with automatic deduplication, contradiction resolution, and stale cleanup.
[!TIP] Why memmd?
- Zero external dependencies beyond
mcp— no embeddings, no API keys, fully offline- Deterministic, rule-based — no LLM calls for memory management
- Human-readable
memory.md— inspect and edit anytime- Works with Claude Desktop, Cursor, Claude Code, and any MCP client
Features
- Deduplication — fingerprint + Jaccard similarity merges near-identical entries
- Contradiction resolution — detects conflicting facts, keeps latest, archives old
- Structured categories — Work Context · Projects · Personal Preferences · Archive
- Section-aware recall — filter by category, keyword search with scoring
- Stale cleanup — auto-archives old, unused entries on
summarize() - Korean support — category aliases, fact patterns (
~는 ~), stopwords
Quick Start
Install and run
uvx memmd-mcp
Add to your MCP client
{
"mcpServers": {
"memmd": {
"command": "uvx",
"args": ["memmd-mcp"],
"env": {
"MEMMD_MEMORY_PATH": "/absolute/path/to/memory.md"
}
}
}
}
[!NOTE] Config location by client:
- Claude Desktop —
~/Library/Application Support/Claude/claude_desktop_config.json- Claude Code —
.claude/settings.jsonor user settings- Cursor — Cursor MCP settings
Tools
| Tool | Description |
|---|---|
remember(content, category?) |
Store with auto-dedupe and contradiction merge |
recall(query) |
Search with keyword scoring and category filters |
forget(id) |
Delete by ID |
summarize() |
Category overview + stale entry cleanup |
How It Works
remember
- Dedupes by SHA-1 fingerprint and Jaccard similarity (>0.82)
- Extracts facts from
key: value,key = value,key is value,key는 value - On conflict: latest value wins, old entry archived with history
recall
- Keyword search with token-overlap scoring
- Filters:
category:Projects API token,section:"Work Context" deploy - Korean aliases accepted (
category:프로젝트)
summarize
- Per-category summary of recent entries
- Archives stale entries (default: >120 days, <3 accesses, no recent recall)
memory.md Format
# memory.md
<!-- memmd:version=1 -->
## Work Context
<!-- memmd-entry {...json...} -->
Memory content
## Projects
...
## Personal Preferences
...
## Archive
...
Environment Variables
| Variable | Default | Description |
|---|---|---|
MEMMD_MEMORY_PATH |
./memory.md |
Path to memory file |
MEMMD_STALE_DAYS |
120 |
Days before stale cleanup (min: 7) |
Development
uv sync
uv run memmd-mcp # run locally
uv build && uv publish # publish to PyPI
License
MIT
Language docs: 한국어
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
memmd_mcp-0.1.0.tar.gz
(11.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
memmd_mcp-0.1.0-py3-none-any.whl
(12.4 kB
view details)
File details
Details for the file memmd_mcp-0.1.0.tar.gz.
File metadata
- Download URL: memmd_mcp-0.1.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62879feebf6c2670607b6ba6948db499054d2b287689d684f7636bdef50fc4ee
|
|
| MD5 |
9d5de358a6888a4e7c1dab09127aea0d
|
|
| BLAKE2b-256 |
2235ddbaf3fe3f436d2ec96e7b799ae3c25e1fdb30c3ef1ce7de7fd75d75be9c
|
File details
Details for the file memmd_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: memmd_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
744a8f038c5742e7ef2aab13ff2d0060bc517c56f6d3864249e4db79857aa3e1
|
|
| MD5 |
f035cdc44674958cafb8208cad03fa29
|
|
| BLAKE2b-256 |
b842a1ef21af14b728adccf26653523bc59f110befc559fcf22088bf10bdfc0a
|