memory service.com
memory service.com logo

Memory Service

Integrates with ChromaDB using sentence transformers for efficient text embedding, enabling semantic search and content...

Created byApr 22, 2025

MCP Memory Service

An MCP server providing semantic memory and persistent storage capabilities for Claude Desktop using ChromaDB and sentence transformers. This service enables long-term memory storage with semantic search capabilities, making it ideal for maintaining context across conversations and instances.

Features

  • Semantic search using sentence transformers
  • Natural language time-based recall (e.g., "last week", "yesterday morning")
  • Tag-based memory retrieval system
  • Persistent storage using ChromaDB
  • Automatic database backups
  • Memory optimization tools
  • Exact match retrieval
  • Debug mode for similarity analysis
  • Database health monitoring
  • Duplicate detection and cleanup
  • Customizable embedding model
  • Cross-platform compatibility (Apple Silicon, Intel, Windows, Linux)
  • Hardware-aware optimizations for different environments
  • Graceful fallbacks for limited hardware resources

Quick Start

For the fastest way to get started:

Docker and Smithery Integration

Docker Usage

The service can be run in a Docker container for better isolation and deployment:
To configure Docker's file sharing on macOS:
  1. Open Docker Desktop
  1. Go to Settings (Preferences)
  1. Navigate to Resources -> File Sharing
  1. Add any additional paths you need to share
  1. Click "Apply & Restart"

Smithery Integration

The service is configured for Smithery integration through smithery.yaml. This configuration enables stdio-based communication with MCP clients like Claude Desktop.
To use with Smithery:
  1. Ensure your claude_desktop_config.json points to the correct paths:
  1. The smithery.yaml configuration handles stdio communication and environment setup automatically.

Testing with Claude Desktop

To verify your Docker-based memory service is working correctly with Claude Desktop:
  1. Build the Docker image with docker build -t mcp-memory-service .
  1. Create the necessary directories for persistent storage:
  1. Update your Claude Desktop configuration file:
  1. Restart Claude Desktop
  1. When Claude starts up, you should see the memory service initialize with a message:
  1. Test the memory feature:
If you experience any issues:
  • Check the Claude Desktop console for error messages
  • Verify Docker has the necessary permissions to access the mounted directories
  • Ensure the Docker container is running with the correct parameters
  • Try running the container manually to see any error output
For detailed installation instructions, platform-specific guides, and troubleshooting, see our documentation:
  • Installation Guide - Comprehensive installation instructions for all platforms
  • Troubleshooting Guide - Solutions for common issues
  • Technical Documentation - Detailed technical procedures and specifications
  • Scripts Documentation - Overview of available scripts and their usage

VPS Deployment Requirements

If you're planning to deploy the Memory Service to a Virtual Private Server (VPS), here are the recommended specifications and configuration guidelines.

Minimum System Requirements

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Key Considerations for VPS Deployment

Memory Usage Breakdown

The memory footprint consists of three main components:
  • Sentence Transformer Model: ~400-600 MB (depends on model)
  • ChromaDB: ~200-500 MB (depends on database size)
  • Python Runtime + Dependencies: ~200-300 MB
  • Working Memory for Embeddings: ~100-500 MB (depends on batch size)
For most deployments, 4 GB RAM is sufficient for basic operation, but 8 GB provides better performance for larger memory stores.

Storage Requirements

  • ChromaDB: Starts at ~100 MB, grows ~1 MB per 100 memories
  • Backups: Plan for 2-3x the DB size for rotation
  • Code + Dependencies: ~300-500 MB
  • OS + Other: Variable based on your setup
A 10 GB SSD is adequate for getting started, but plan for growth if you anticipate storing many thousands of memories.

Recommended Docker Deployment for VPS

For VPS deployment, Docker is strongly recommended to simplify installation and management:
This configuration:
  • Limits the container to 4GB RAM and 2 CPUs
  • Uses a balanced model for good performance/resource usage
  • Mounts persistent volumes for data storage
  • Automatically restarts the service if it crashes or on system reboot

Optimizations for Low-Resource VPS Environments

If running on a constrained VPS with limited resources:
  1. Use a smaller embedding model:
  1. Reduce batch size:
  1. Enable CPU optimization:
For more detailed VPS deployment information, see issue #22.

Configuration

Standard Configuration (Recommended)

Add the following to your claude_desktop_config.json file to use UV (recommended for best performance):

Windows-Specific Configuration (Recommended)

For Windows users, we recommend using the wrapper script to ensure PyTorch is properly installed. See our Windows Setup Guide for detailed instructions.
The wrapper script will:
  1. Check if PyTorch is installed and properly configured
  1. Install PyTorch with the correct index URL if needed
  1. Run the memory server with the appropriate configuration

Hardware Compatibility

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
** Note for macOS 15 (Sequoia) users**: If you're using macOS 15 with Apple Silicon and encounter PyTorch package installation errors when using UV, you might need to:This issue happens because PyTorch wheels for macOS 15 on arm64 are still being updated. See issue #29 for more details.

Memory Operations

The memory service provides the following operations through the MCP server:

Core Memory Operations

  1. store_memory - Store new information with optional tags
  1. retrieve_memory - Perform semantic search for relevant memories
  1. recall_memory - Retrieve memories using natural language time expressions
  1. search_by_tag - Find memories using specific tags
  1. exact_match_retrieve - Find memories with exact content match
  1. debug_retrieve - Retrieve memories with similarity scores
For detailed information about tag storage and management, see our Tag Storage Documentation.

Database Management

  1. create_backup - Create database backup
  1. get_stats - Get memory statistics
  1. optimize_db - Optimize database performance
  1. check_database_health - Get database health metrics
  1. check_embedding_model - Verify model status

Memory Management

  1. delete_memory - Delete specific memory by hash
  1. delete_by_tag - Delete all memories with specific tag
  1. cleanup_duplicates - Remove duplicate entries

Configuration Options

Configure through environment variables:

Getting Help

If you encounter any issues:
  1. Check our Troubleshooting Guide
  1. Review the Installation Guide
  1. For Windows-specific issues, see our Windows Setup Guide
  1. Contact the developer via Telegram: t.me/doobeedoo

Project Structure

Development Guidelines

  • Python 3.10+ with type hints
  • Use dataclasses for models
  • Triple-quoted docstrings for modules and functions
  • Async/await pattern for all I/O operations
  • Follow PEP 8 style guidelines
  • Include tests for new features

License

MIT License - See LICENSE file for details

Acknowledgments

  • ChromaDB team for the vector database
  • Sentence Transformers project for embedding models
  • MCP project for the protocol specification

Contact

Cloudflare Worker Implementation

A serverless implementation of the MCP Memory Service is now available using Cloudflare Workers. This implementation:
  • Uses Cloudflare D1 for storage (serverless SQLite)
  • Uses Workers AI for embeddings generation
  • Communicates via Server-Sent Events (SSE) for MCP protocol
  • Requires no local installation or dependencies
  • Scales automatically with usage

Benefits of the Cloudflare Implementation

  • Zero local installation: No Python, dependencies, or local storage needed
  • Cross-platform compatibility: Works on any device that can connect to the internet
  • Automatic scaling: Handles multiple users without configuration
  • Global distribution: Low latency access from anywhere
  • No maintenance: Updates and maintenance handled automatically

Available Tools in the Cloudflare Implementation

The Cloudflare Worker implementation supports all the same tools as the Python implementation:
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Configuring Claude to Use the Cloudflare Memory Service

Add the following to your Claude configuration to use the Cloudflare-based memory service:
Replace your-worker-subdomain with your actual Cloudflare Worker subdomain.

Deploying Your Own Cloudflare Memory Service

  1. Clone the repository and navigate to the Cloudflare Worker directory:
  1. Install Wrangler (Cloudflare's CLI tool):
  1. Login to your Cloudflare account:
  1. Create a D1 database:
  1. Update the wrangler.toml file with your database ID from the previous step.
  1. Initialize the database schema:Where schema.sql contains:
  1. Deploy the worker:
  1. Update your Claude configuration to use your new worker URL.

Testing Your Cloudflare Memory Service

After deployment, you can test your memory service using curl:
  1. List available tools:
  1. Store a memory:
  1. Retrieve memories:

Limitations

  • Free tier limits on Cloudflare Workers and D1 may apply
  • Workers AI embedding models may differ slightly from the local sentence-transformers models
  • No direct access to the underlying database for manual operations
  • Cloudflare Workers have a maximum execution time of 30 seconds on free plans

MCP Memory Service

An MCP server providing semantic memory and persistent storage capabilities for Claude Desktop using ChromaDB and sentence transformers. This service enables long-term memory storage with semantic search capabilities, making it ideal for maintaining context across conversations and instances.

Features

  • Semantic search using sentence transformers
  • Natural language time-based recall (e.g., "last week", "yesterday morning")
  • Tag-based memory retrieval system
  • Persistent storage using ChromaDB
  • Automatic database backups
  • Memory optimization tools
  • Exact match retrieval
  • Debug mode for similarity analysis
  • Database health monitoring
  • Duplicate detection and cleanup
  • Customizable embedding model
  • Cross-platform compatibility (Apple Silicon, Intel, Windows, Linux)
  • Hardware-aware optimizations for different environments
  • Graceful fallbacks for limited hardware resources

Quick Start

For the fastest way to get started:

Docker and Smithery Integration

Docker Usage

The service can be run in a Docker container for better isolation and deployment:
To configure Docker's file sharing on macOS:
  1. Open Docker Desktop
  1. Go to Settings (Preferences)
  1. Navigate to Resources -> File Sharing
  1. Add any additional paths you need to share
  1. Click "Apply & Restart"

Smithery Integration

The service is configured for Smithery integration through smithery.yaml. This configuration enables stdio-based communication with MCP clients like Claude Desktop.
To use with Smithery:
  1. Ensure your claude_desktop_config.json points to the correct paths:
  1. The smithery.yaml configuration handles stdio communication and environment setup automatically.

Testing with Claude Desktop

To verify your Docker-based memory service is working correctly with Claude Desktop:
  1. Build the Docker image with docker build -t mcp-memory-service .
  1. Create the necessary directories for persistent storage:
  1. Update your Claude Desktop configuration file:
  1. Restart Claude Desktop
  1. When Claude starts up, you should see the memory service initialize with a message:
  1. Test the memory feature:
If you experience any issues:
  • Check the Claude Desktop console for error messages
  • Verify Docker has the necessary permissions to access the mounted directories
  • Ensure the Docker container is running with the correct parameters
  • Try running the container manually to see any error output
For detailed installation instructions, platform-specific guides, and troubleshooting, see our documentation:
  • Installation Guide - Comprehensive installation instructions for all platforms
  • Troubleshooting Guide - Solutions for common issues
  • Technical Documentation - Detailed technical procedures and specifications
  • Scripts Documentation - Overview of available scripts and their usage

VPS Deployment Requirements

If you're planning to deploy the Memory Service to a Virtual Private Server (VPS), here are the recommended specifications and configuration guidelines.

Minimum System Requirements

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Key Considerations for VPS Deployment

Memory Usage Breakdown

The memory footprint consists of three main components:
  • Sentence Transformer Model: ~400-600 MB (depends on model)
  • ChromaDB: ~200-500 MB (depends on database size)
  • Python Runtime + Dependencies: ~200-300 MB
  • Working Memory for Embeddings: ~100-500 MB (depends on batch size)
For most deployments, 4 GB RAM is sufficient for basic operation, but 8 GB provides better performance for larger memory stores.

Storage Requirements

  • ChromaDB: Starts at ~100 MB, grows ~1 MB per 100 memories
  • Backups: Plan for 2-3x the DB size for rotation
  • Code + Dependencies: ~300-500 MB
  • OS + Other: Variable based on your setup
A 10 GB SSD is adequate for getting started, but plan for growth if you anticipate storing many thousands of memories.

Recommended Docker Deployment for VPS

For VPS deployment, Docker is strongly recommended to simplify installation and management:
This configuration:
  • Limits the container to 4GB RAM and 2 CPUs
  • Uses a balanced model for good performance/resource usage
  • Mounts persistent volumes for data storage
  • Automatically restarts the service if it crashes or on system reboot

Optimizations for Low-Resource VPS Environments

If running on a constrained VPS with limited resources:
  1. Use a smaller embedding model:
  1. Reduce batch size:
  1. Enable CPU optimization:
For more detailed VPS deployment information, see issue #22.

Configuration

Standard Configuration (Recommended)

Add the following to your claude_desktop_config.json file to use UV (recommended for best performance):

Windows-Specific Configuration (Recommended)

For Windows users, we recommend using the wrapper script to ensure PyTorch is properly installed. See our Windows Setup Guide for detailed instructions.
The wrapper script will:
  1. Check if PyTorch is installed and properly configured
  1. Install PyTorch with the correct index URL if needed
  1. Run the memory server with the appropriate configuration

Hardware Compatibility

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
** Note for macOS 15 (Sequoia) users**: If you're using macOS 15 with Apple Silicon and encounter PyTorch package installation errors when using UV, you might need to:This issue happens because PyTorch wheels for macOS 15 on arm64 are still being updated. See issue #29 for more details.

Memory Operations

The memory service provides the following operations through the MCP server:

Core Memory Operations

  1. store_memory - Store new information with optional tags
  1. retrieve_memory - Perform semantic search for relevant memories
  1. recall_memory - Retrieve memories using natural language time expressions
  1. search_by_tag - Find memories using specific tags
  1. exact_match_retrieve - Find memories with exact content match
  1. debug_retrieve - Retrieve memories with similarity scores
For detailed information about tag storage and management, see our Tag Storage Documentation.

Database Management

  1. create_backup - Create database backup
  1. get_stats - Get memory statistics
  1. optimize_db - Optimize database performance
  1. check_database_health - Get database health metrics
  1. check_embedding_model - Verify model status

Memory Management

  1. delete_memory - Delete specific memory by hash
  1. delete_by_tag - Delete all memories with specific tag
  1. cleanup_duplicates - Remove duplicate entries

Configuration Options

Configure through environment variables:

Getting Help

If you encounter any issues:
  1. Check our Troubleshooting Guide
  1. Review the Installation Guide
  1. For Windows-specific issues, see our Windows Setup Guide
  1. Contact the developer via Telegram: t.me/doobeedoo

Project Structure

Development Guidelines

  • Python 3.10+ with type hints
  • Use dataclasses for models
  • Triple-quoted docstrings for modules and functions
  • Async/await pattern for all I/O operations
  • Follow PEP 8 style guidelines
  • Include tests for new features

License

MIT License - See LICENSE file for details

Acknowledgments

  • ChromaDB team for the vector database
  • Sentence Transformers project for embedding models
  • MCP project for the protocol specification

Contact

Cloudflare Worker Implementation

A serverless implementation of the MCP Memory Service is now available using Cloudflare Workers. This implementation:
  • Uses Cloudflare D1 for storage (serverless SQLite)
  • Uses Workers AI for embeddings generation
  • Communicates via Server-Sent Events (SSE) for MCP protocol
  • Requires no local installation or dependencies
  • Scales automatically with usage

Benefits of the Cloudflare Implementation

  • Zero local installation: No Python, dependencies, or local storage needed
  • Cross-platform compatibility: Works on any device that can connect to the internet
  • Automatic scaling: Handles multiple users without configuration
  • Global distribution: Low latency access from anywhere
  • No maintenance: Updates and maintenance handled automatically

Available Tools in the Cloudflare Implementation

The Cloudflare Worker implementation supports all the same tools as the Python implementation:
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Configuring Claude to Use the Cloudflare Memory Service

Add the following to your Claude configuration to use the Cloudflare-based memory service:
Replace your-worker-subdomain with your actual Cloudflare Worker subdomain.

Deploying Your Own Cloudflare Memory Service

  1. Clone the repository and navigate to the Cloudflare Worker directory:
  1. Install Wrangler (Cloudflare's CLI tool):
  1. Login to your Cloudflare account:
  1. Create a D1 database:
  1. Update the wrangler.toml file with your database ID from the previous step.
  1. Initialize the database schema:Where schema.sql contains:
  1. Deploy the worker:
  1. Update your Claude configuration to use your new worker URL.

Testing Your Cloudflare Memory Service

After deployment, you can test your memory service using curl:
  1. List available tools:
  1. Store a memory:
  1. Retrieve memories:

Limitations

  • Free tier limits on Cloudflare Workers and D1 may apply
  • Workers AI embedding models may differ slightly from the local sentence-transformers models
  • No direct access to the underlying database for manual operations
  • Cloudflare Workers have a maximum execution time of 30 seconds on free plans