Skip to main content
Glama

Claude Memory Server

by xiy

Claude Memory Server

An MCP (Model Context Protocol) server that provides long-term memory capabilities for Claude, allowing persistent storage and retrieval of context across conversations.

Features

  • Persistent Memory Storage: Store important context, facts, and preferences
  • Full-Text Search: Search through memories using natural language queries
  • Organized Categories: Categorize memories for better organization
  • CRUD Operations: Create, read, update, and delete memory entries
  • SQLite Database: Fast, reliable local storage with FTS5 search capabilities

Memory Categories

  • facts - Important facts and information
  • preferences - User preferences and settings
  • conversations - Conversation context and history
  • projects - Project-related information
  • learning - Things learned during interactions
  • goals - User goals and objectives
  • context - General context information
  • reminders - Things to remember

Available Tools

  1. store_memory - Store a new memory entry
  2. search_memory - Search memories using full-text search
  3. get_memory - Retrieve a specific memory by ID
  4. update_memory - Update an existing memory
  5. delete_memory - Delete a memory by ID
  6. list_memories - List memories by category or recent
  7. get_memory_stats - Get memory statistics and categories

Installation

  1. Clone or download this project
  2. Install dependencies:
    bun install
  3. Build the project:
    bun run build

Configuration

Claude Desktop Integration

To integrate with Claude Desktop, you need to update your Claude Desktop configuration:

  1. Find your Claude Desktop config directory:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add the memory server configuration:
    { "mcpServers": { "claude-memory": { "command": "node", "args": ["/path/to/claude-memory-server/dist/index.js"], "env": {} } } }
  3. Update the path in the args array to point to your actual installation directory.
  4. Restart Claude Desktop for the changes to take effect.

Manual Testing

You can also run the server directly for testing:

# Development mode bun run dev # Production mode bun run start

The server uses stdio transport and will communicate via standard input/output.

Usage Examples

Once integrated with Claude Desktop, you can use the memory tools in your conversations:

Storing Memories

Please store this as a memory: I prefer using TypeScript over JavaScript for all projects. Category: preferences

Searching Memories

Search my memories for anything about TypeScript preferences.

Getting Statistics

Show me my memory statistics - how many memories I have by category.

Database

The server uses SQLite for storage with the following features:

  • FTS5 Full-Text Search for natural language queries
  • Automatic indexing on categories, dates, and relevance scores
  • JSON metadata storage for flexible data
  • Triggers to keep search index synchronized

The database file (memory.db) will be created in the project directory on first run.

Development

Project Structure

src/ ├── index.ts # Main MCP server implementation ├── memory-service.ts # Memory business logic └── database.ts # SQLite database operations

Scripts

  • bun run build - Build TypeScript to JavaScript
  • bun run start - Start the compiled server
  • bun run dev - Development mode with file watching

Future Enhancements

  • Vector Embeddings: Semantic search using OpenAI embeddings
  • Memory Expiration: Automatic cleanup of old memories
  • Export/Import: Backup and restore memory data
  • Memory Relationships: Link related memories together
  • HTTP Transport: Web-based interface for memory management

License

ISC License

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Provides long-term memory capabilities for Claude through persistent storage and full-text search of context across conversations. Enables storing, searching, and managing memories organized by categories like facts, preferences, projects, and goals.

  1. Features
    1. Memory Categories
      1. Available Tools
        1. Installation
          1. Configuration
            1. Claude Desktop Integration
            2. Manual Testing
          2. Usage Examples
            1. Storing Memories
            2. Searching Memories
            3. Getting Statistics
          3. Database
            1. Development
              1. Project Structure
              2. Scripts
            2. Future Enhancements
              1. License

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  An improved implementation of persistent memory using a local knowledge graph with a customizable --memory-path. This lets Claude remember information about the user across chats.
                  Last updated -
                  9
                  373
                  629
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  Provides semantic memory and persistent storage for Claude, leveraging ChromaDB and sentence transformers for enhanced search and retrieval capabilities.
                  Last updated -
                  3
                  677
                  Apache 2.0
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  A persistent memory implementation using a local knowledge graph that lets Claude remember information about users across conversations.
                  Last updated -
                  6
                  MIT License
                • A
                  security
                  A
                  license
                  A
                  quality
                  An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.
                  Last updated -
                  11
                  318
                  54
                  JavaScript
                  MIT License
                  • Apple

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiy/claude-memory-server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server