Claude Code Buddy
MeMesh Plugin โ Searchable project memory plugin for Claude Code.
Installation
npx claude-code-buddyAsk AI about Claude Code Buddy
Powered by Claude ยท Grounded in docs
I know everything about Claude Code Buddy. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
๐ English | ็น้ซไธญๆ | ็ฎไฝไธญๆ | ๆฅๆฌ่ช | ํ๊ตญ์ด | Portuguรชs | Franรงais | Deutsch | Tiแบฟng Viแปt | Espaรฑol | เธ เธฒเธฉเธฒเนเธเธข
MeMesh LLM Memory
Local memory for Claude Code and MCP coding agents.
One SQLite file. No Docker. No cloud required.
The Problem
Your coding agent forgets what happened between sessions. Every architecture decision, bug fix, failed test, and hard-won lesson has to be re-explained. Claude Code starts fresh, re-discovers old constraints, and burns context on things it should already know.
MeMesh gives coding agents persistent, searchable, evolving local memory.
This package is the local memory layer of the MeMesh product family. It is intentionally small and open-source: install it with npm, keep your memory in ~/.memesh/knowledge-graph.db, and connect it to Claude Code or any MCP-compatible client. Hosted workspace and enterprise operating-system products should stay separate from this package's README and roadmap.
Proof โ 95.40% R@5 on LongMemEval-S
MeMesh's retrieval engine is FTS5 alone (no LLM, no embeddings on the hot path), measured against the public LongMemEval-S benchmark (500 questions, MIT-licensed):
| System | R@5 | Source |
|---|---|---|
| MeMesh (Mode A, FTS5) | 95.40% | benchmarks/longmemeval/RESULTS.md |
| MemPalace | 96.6% | Vendor self-report |
| Supermemory | ~82% | Vendor estimate |
| Zep | 63.8% | LongMemEval paper |
| Mem0 | 49.0% | LongMemEval paper |
Reproduction commands, dataset SHA256, raw per-question results, and known-failure analysis are all in benchmarks/longmemeval/. Re-runnable in ~10 seconds.
Get Started in 60 Seconds
Step 1: Install
npm install -g @pcircle/memesh
First-install notes (one-time):
- Native modules โ
better-sqlite3andsqlite-vecinstall via prebuilt binaries on macOS (arm64/x64), Linux (x64/arm64), and Windows x64. On uncommon platforms or when prebuilds fail, you'll need a working C/C++ toolchain.- Embedding model โ the first call that triggers a local embedding (e.g.
recallwith semantic mode) downloadsXenova/all-MiniLM-L6-v2(~80 MB) into~/.memesh/models/. Subsequent calls are instant. The default retrieval path (FTS5) does not require this download.
Step 2: Store a decision
memesh remember "Use OAuth 2.0 with PKCE for the new auth"
Or use the explicit form when you want a stable name and type for later filtering:
memesh remember --name "auth-decision" --type "decision" --obs "Use OAuth 2.0 with PKCE"
Step 3: Recall it later
memesh recall "login security"
# โ Finds "OAuth 2.0 with PKCE" even though you searched different words
That's it. MeMesh is now remembering and recalling across sessions.
If you want to verify the install and local wiring end to end:
memesh doctor
Open the dashboard to explore your memory:
memesh
Who Is This For?
| If you are... | MeMesh helps you... |
|---|---|
| A developer using Claude Code | Auto-recall project decisions, file-specific lessons, and past failures as you work |
| A coding-agent power user | Share one local memory layer across MCP-compatible tools |
| A team experimenting with AI coding workflows | Export/import project knowledge without introducing hosted infrastructure |
| An agent developer | Add local memory through MCP, HTTP, CLI, or the Python SDK |
Designed For Coding Agents First
|
Claude Code / Desktop
MCP tools + Claude Code hooks |
Any HTTP Client
|
Any LLM (OpenAI format)
Paste tools into any API call |
Why Not OpenMemory, Cursor Memories, Mem0, Or Zep?
| MeMesh | OpenMemory | Cursor Memories | Mem0 | Zep / Graphiti | |
|---|---|---|---|---|---|
| Best fit | Local memory for coding agents | Local/cross-client MCP memory | Cursor-native project memory | Managed app/agent memory | Temporal knowledge graphs |
| Install shape | npm install -g @pcircle/memesh | Local app/server flow | Built into Cursor | Cloud API / SDK / MCP | Service/framework setup |
| Storage | One local SQLite file | Local memory stack | Cursor-managed rules/memories | Hosted or self-hosted stack | Graph database |
| Cloud required | No | No for local mode | Depends on Cursor account/settings | Yes for platform | Usually yes/self-hosted |
| Claude Code hooks | First-class | MCP tools | No | MCP tools | Not Claude Code-specific |
| Dashboard | Built in | Built in | Cursor settings | Platform dashboard | Platform/graph tooling |
| Tradeoff | Simple local wedge, not enterprise scale | Broader local app footprint | Locked to Cursor | Strong managed platform, less local-first | Strong graph model, heavier setup |
MeMesh trades enterprise-scale managed infrastructure for instant local setup, inspectable storage, and coding-agent workflow hooks.
What Happens Automatically In Claude Code
You don't need to manually remember everything. MeMesh has 6 hooks that capture and inject knowledge while you work:
| When | What MeMesh does |
|---|---|
| Every session start | Loads your most relevant memories + proactive warnings from past lessons |
| Before editing files | Recalls memories tied to the file or project before Claude writes code |
| Before bash commands | (Opt-in) Nudges Claude to dispatch high-verifiability commands (test, build, lint, migrate, deploy, benchmark) as background agents |
After every git commit | Records what you changed, with diff stats |
| When Claude stops | Captures files edited, errors fixed, and auto-generates structured lessons from failures |
| Before context compaction | Saves knowledge before it's lost to context limits |
Opt out anytime:
export MEMESH_AUTO_CAPTURE=false
Configuration
All configuration is via environment variables. Defaults are local-only and zero-network โ you don't need to set anything to get a working system.
| Variable | Default | What it does |
|---|---|---|
MEMESH_DB_PATH | ~/.memesh/knowledge-graph.db | Override the SQLite database location. |
MEMESH_AUTO_CAPTURE | true | Disable the auto-capture hooks (Stop, PreCompact) entirely. |
MEMESH_AUTO_DETECT_LLM | unset | Set to 1 to let memesh auto-detect a provider from your shell env (OPENAI_API_KEY etc.) and switch to BYOK embeddings. Default fresh-install is local ONNX (384-dim) only โ opt in if you want cloud embeddings. Without this flag set, an OPENAI_API_KEY lying around in your shell is ignored. |
MEMESH_ENABLE_AGENTIC_ORCHESTRATION | unset | Set to 1 to enable an experimental working-model protocol (CTO / Orchestrator / Agents framing). Adds a session-start banner, a Bash command nudge, and verify_agent_work telemetry. The protocol's effectiveness is being instrumented, not yet proven โ opt in if you want to participate. Default is OFF: the core memory features work without this flag. |
MEMESH_AUTO_UPDATE | off | Auto-update policy. off (default) never auto-updates; patch allows X.Y.Z โ X.Y.Z+N; minor adds X.Y.Z โ X.Y+1.0; major allows any bump. When permitted, a detached npm install -g fires at session end (Stop hook) so it never blocks your work โ outcomes land in ~/.memesh/auto-update.log. Also settable as autoUpdate in ~/.memesh/config.json (env wins). When the installed version is deprecated by maintainers (security advisory), patch is force-allowed even on off โ minor / major bumps still stay manual to avoid silent behaviour drift. |
OPENAI_API_KEY | unset | Your OpenAI key. Only used when MEMESH_AUTO_DETECT_LLM=1 or you explicitly configure the provider. |
OLLAMA_HOST | http://localhost:11434 | Override the Ollama endpoint when using a local Ollama provider. |
memesh doctor prints the resolved configuration so you can see what's active.
When npm flags an installed version as deprecated (typically a security advisory), the next session-start prepends a strong โ ๏ธ MeMesh <ver> is DEPRECATED banner and memesh update-status surfaces the same line until you upgrade. The check is cached at ~/.memesh/update-check.<version>.json so a transient network failure can't dim the warning.
Dashboard
7 tabs, 11 languages, zero external dependencies. Access at http://localhost:3737/dashboard when the server is running.
| Tab | What you see |
|---|---|
| Search | Full-text + vector similarity search across all memories |
| Browse | Paginated list of all entities with archive/restore |
| Analytics | Memory Health Score (0-100), 30-day timeline, value metrics, knowledge coverage, cleanup suggestions, your work patterns |
| Graph | Interactive force-directed knowledge graph with type filters, search, ego mode, recency heatmap |
| Lessons | Structured lessons from past failures (error, root cause, fix, prevention) |
| Manage | Archive and restore entities |
| Settings | LLM provider config, instant language selector |
Smart Features
๐ง Smart Search โ Search "login security" and find memories about "OAuth PKCE". MeMesh expands queries with related terms using your configured LLM.
๐ Scored Ranking โ Results ranked by relevance (30%) + recency (25%) + frequency (15%) + confidence (15%) + recall impact (10%) + temporal validity (5%).
๐ Knowledge Evolution โ Decisions change. forget archives old memories (never deletes). supersedes relations link old โ new. Your AI always sees the latest version.
โ ๏ธ Conflict Detection โ If you have two memories that contradict each other, MeMesh warns you.
๐ฆ Team Sharing โ memesh export > team-knowledge.json โ share with your team โ memesh import team-knowledge.json
Imported bundles stay searchable, but MeMesh does not auto-inject imported memories into Claude hooks until you review or re-store them locally.
Example Usage
"MeMesh remembered that we chose PKCE over implicit flow three weeks ago. When I asked Claude about auth again, it already knew โ no re-explaining needed." โ Solo developer, building a SaaS
"We export our team's memory every Friday and import it Monday. Everyone's Claude starts the week knowing what the team learned last week." โ 3-person startup, shared knowledge base
"The dashboard showed me that 90% of my memories were auto-generated session logs. I started using
rememberdeliberately for architecture decisions. Game changer." โ Developer who discovered the Analytics tab
Unlock Smart Mode (Optional)
MeMesh works offline by default. Add an LLM API key only if you want query expansion, smarter extraction, and compression:
memesh config set llm.provider anthropic
memesh config set llm.api-key sk-ant-...
Or use the dashboard Settings tab (visual setup):
memesh # opens dashboard โ Settings tab
| Level 0 (default) | Level 1 (Smart Mode) | |
|---|---|---|
| Search | FTS5 keyword matching | + LLM query expansion (~97% recall) |
| Auto-capture | Rule-based patterns | + LLM extracts decisions & lessons |
| Compression | Not available | consolidate compresses verbose memories |
| Cost | Free, no API key | ~$0.0001 per search (Haiku) |
All 9 Memory Tools
| Tool | What it does |
|---|---|
remember | Store knowledge with observations, relations, and tags |
recall | Smart search with multi-factor scoring and LLM query expansion |
forget | Soft-archive (never deletes) or remove specific observations |
consolidate | LLM-powered compression of verbose memories |
export | Share memories as JSON between projects or team members |
import | Import memories with merge strategies (skip / overwrite / append) |
learn | Record structured lessons from mistakes (error, root cause, fix, prevention) |
user_patterns | Analyze your work patterns โ schedule, tools, strengths, learning areas |
verify_agent_work | Persist a verification report for background-agent work; reality-checks claimed file changes against git diff |
Architecture
โโโโโโโโโโโโโโโโโโโ
โ Core Engine โ
โ (8 operations) โ
โโโโโโโโโโฌโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ
โ โ โ
CLI (memesh) HTTP API (serve) MCP (memesh-mcp)
โ โ โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ
โ
SQLite + FTS5 + sqlite-vec
(~/.memesh/knowledge-graph.db)
Core is framework-agnostic. Same logic runs from terminal, HTTP, or MCP.
Contributing
git clone https://github.com/PCIRCLE-AI/memesh-llm-memory
cd memesh-llm-memory && npm install && npm run build
npm test # 630 tests
npm run test:e2e-dashboard
Dashboard: cd dashboard && npm install && npm run dev
MIT โ Made by PCIRCLE AI
