DEV Community

ura-tools
ura-tools

Posted on

Your AI Agent Forgets Everything Between Sessions. I Fixed That.

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
Enter fullscreen mode Exit fullscreen mode

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

  1. Your agent encounters something worth remembering
  2. It calls memory_store with a type, name, and content
  3. memorybank saves it as a markdown file with YAML frontmatter
  4. Next session, the agent calls memory_recall to load relevant context
  5. 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"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Or Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "memorybank": {
      "command": "npx",
      "args": ["-y", "@ura-dev/memorybank", "memorybank-mcp"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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:

Built with zero dependencies. MIT licensed. Works today.

Top comments (0)