Every time you start a new session with Claude Code, Cursor, or any AI coding agent, it starts from scratch. It does not remember:
- Who you are or what you prefer
- What decisions were made yesterday
- What corrections you already gave it
- Where external resources live
I built memorybank to fix this.
What is memorybank?
An MCP server that gives any AI agent persistent, cross-session memory. Zero dependencies, file-based, works with Claude Code, Cursor, Windsurf, and any MCP-compatible tool.
npx @ura-dev/memorybank --help
8 MCP Tools
| Tool | What it does |
|---|---|
memory_store |
Save a memory (user, project, feedback, reference, custom) |
memory_recall |
Retrieve most relevant memories for a query |
memory_list |
List all memories, filter by type or tag |
memory_get |
Get a specific memory by ID |
memory_update |
Update an existing memory |
memory_delete |
Delete a memory |
memory_search |
Full-text search across all memories |
memory_stats |
Counts, types, storage size |
How it works
- Your agent encounters something worth remembering
- It calls
memory_storewith a type, name, and content - memorybank saves it as a markdown file with YAML frontmatter
- Next session, the agent calls
memory_recallto load relevant context - The agent now knows what happened before
Memories are stored locally in ~/.memorybank/, organized by namespace (one per project). No cloud, no database, no API keys.
Setup in 30 seconds
Add to your Claude Code config (~/.claude/settings.json):
{
"mcpServers": {
"memorybank": {
"command": "npx",
"args": ["-y", "@ura-dev/memorybank", "memorybank-mcp"]
}
}
}
Or Cursor (.cursor/mcp.json):
{
"mcpServers": {
"memorybank": {
"command": "npx",
"args": ["-y", "@ura-dev/memorybank", "memorybank-mcp"]
}
}
}
That is it. Your agent now has persistent memory.
Five memory types
- user — About you: role, preferences, expertise level
- project — About the work: goals, architecture decisions, deadlines
- feedback — Corrections you gave: what to avoid, what worked
- reference — External pointers: URLs, docs locations, API endpoints
- custom — Anything else
Why not just use CLAUDE.md?
CLAUDE.md is great for static project instructions. memorybank is for dynamic knowledge that evolves during work:
- User corrections that should persist
- Architecture decisions made mid-project
- References discovered during research
- Project status that changes daily
memorybank complements CLAUDE.md. One for rules, the other for learned knowledge.
CLI too
memorybank store user team-lead "User is the team lead for backend services"
memorybank search "TypeScript preferences"
memorybank list --type=feedback
memorybank store project api-rewrite "Migrating REST to GraphQL" --namespace=myproject
Also: agentrace
If you want to see what your AI agent is doing (not just what it remembers), check out agentrace. Structured observability for AI agents. Same philosophy: MCP server, zero deps, file-based.
Links:
- npm: @ura-dev/memorybank
- GitHub: ura-tools/memorybank
- Landing page: ura-tools.github.io/memorybank
Built with zero dependencies. MIT licensed. Works today.
Top comments (0)