Every time you start a new session with AI coding agents like Claude Code or Cursor, do they start from scratch, forgetting everything that happened previously? This includes:
- Who you are or your preferences
- Decisions made yesterday
- Corrections you've already provided
- Locations of external resources
Memorybank was built to address this fundamental limitation.
What is Memorybank?
Memorybank is an MCP (Microservice Communication Protocol) server that provides any AI agent with persistent, cross-session memory. It boasts zero dependencies, is file-based, and works seamlessly with Claude Code, Cursor, Windsurf, and any other MCP-compatible tool. You can explore its features by running `npx @ura-dev/memorybank --help`.
8 MCP Tools
| Tool | Description |
|---|---|
memory_store | Save a memory (user, project, feedback, reference, custom) |
memory_recall | Retrieve the most relevant memories for a given query |
memory_list | List all memories, with optional filtering by type or tag |
memory_get | Get a specific memory by its ID |
memory_update | Update an existing memory |
memory_delete | Delete a memory |
memory_search | Perform full-text search across all stored memories |
memory_stats | Provide counts, types, and storage size statistics |
How it Works
The operational mechanism of memorybank is straightforward:
- Your AI agent encounters something worth remembering.
- It calls `memory_store` with a specified type, name, and content.
- Memorybank saves this information as a markdown file with YAML frontmatter.
- In the next session, the agent calls `memory_recall` to load relevant context.
- Consequently, the agent now has knowledge of past interactions and data.
Memories are stored locally in `~/.memorybank/`, organized by namespace (one per project). This design means no reliance on cloud services, databases, or API keys, ensuring local data control.
Setup in 30 Seconds
Integrating memorybank into your AI agent's configuration is quick and simple. For Claude Code, add the following to your config file (`~/.claude/settings.json`):
{
"mcpServers": {
"memorybank": {
"command": "npx",
"args": ["-y", "@ura-dev/memorybank", "memorybank-mcp"]
}
}
}Alternatively, for Cursor, modify your `.cursor/mcp.json` file as follows:
{
"mcpServers": {
"memorybank": {
"command": "npx",
"args": ["-y", "@ura-dev/memorybank", "memorybank-mcp"]
}
}
}
Once configured, your AI agent will have persistent memory capabilities.
Five Memory Types
Memorybank supports five distinct memory types, each serving a specific purpose:
- User — Information about you: role, preferences, expertise level.
- Project — Details about the work: goals, architecture decisions, deadlines.
- Feedback — Corrections you provided: what to avoid, what worked well.
- Reference — External pointers: URLs, documentation locations, API endpoints.
- Custom — Any other information you deem important to remember.
Why Not Just Use CLAUDE.md?
While `CLAUDE.md` is excellent for static project instructions, memorybank is designed for dynamic knowledge that evolves throughout a project's lifecycle. This includes:
- User corrections that demand persistence.
- Architectural decisions made mid-project.
- References discovered during research.
- Daily changing project statuses.
Memorybank complements `CLAUDE.md`, with one focusing on rules and the other on learned, evolving knowledge.
CLI Support Included
Memorybank also offers command-line interface capabilities for direct interaction.