AI & Machine Learning

Why CLAUDE.md Files Aren't Enough - Building Vector Memory for Claude Code

Ali NematiAli Nemati6 hours ago57 sec read11 views

A new solution called "claude-memory-mcp" has been introduced to enhance the capabilities of Claude Code sessions beyond traditional CLAUDE.md files. This system leverages PostgreSQL with pgvector for semantic memory storage, enabling more efficient and relevant recall of past project decisions, bug fixes, and patterns.

Key features include:

  • Semantic Search: Utilizes vector similarity search rather than full context loading.
  • Cross-project Memory Sharing: Memories can be shared across different projects by omitting the project ID filter.
  • Cost-effective Setup: Requires Docker, Supabase (free tier), and an OpenAI API key. Estimated monthly cost is around $0.50 at moderate usage levels.

Setup involves:

  1. Cloning the GitHub repository: git clone https://github.com/glivera/claude-memory-mcp
  2. Configuring environment variables in .env file.
  3. Running Docker Compose to start the server.
  4. Adding the server details to ~/.claude/mcp.json.

The system supports multiple Claude Code sessions sharing the same memory server, ensuring real-time availability of stored memories.

Compared to CLAUDE.md, which holds static rules and conventions, vector memory is designed for dynamic project

Read the full article at DEV Community


Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.

11
Comments
Ali Nemati
Ali NematiWritten by Ali
View all posts

Related Articles