Skip to main content

High-performance MCP memory server powered by Redis Stack and LangGraph

Project description

Spark Memory ✨

High-performance MCP (Model Context Protocol) memory server powered by Redis Stack and LangGraph.

Features

  • Lightning Fast: Redis Stack-based with millisecond response times
  • 🧠 Intelligent Memory: Vector search and semantic consolidation
  • 🔒 Enterprise Security: Field-level encryption, RBAC, audit logging
  • 📈 Scalable: Distributed environment support
  • 🎯 Easy Deployment: One-line execution via uvx

Installation

Requirements

  • Python 3.11+
  • Redis Stack 7.2.0+ (with JSON, Search, TimeSeries modules)

Install via pip

pip install spark-memory

Install Redis Stack

macOS:

brew tap redis-stack/redis-stack
brew install redis-stack
brew services start redis-stack

Ubuntu/Debian:

curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis-stack

Docker:

docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest

Quick Start

1. Run as MCP Server

# Using uvx (recommended)
uvx spark-memory

# Or with Python
python -m spark_memory

2. Configure with Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "spark-memory": {
      "command": "uvx",
      "args": ["spark-memory"]
    }
  }
}

3. Use in Claude

Once configured, you can use these commands in Claude:

  • m_memory: Save, search, and manage memories
  • m_state: Checkpoint and state management
  • m_admin: System administration
  • m_assistant: Natural language memory commands

Architecture

Spark Memory uses a layered architecture:

  1. MCP Server Layer: FastMCP server exposing tools via Model Context Protocol
  2. Memory Engine Layer: Core business logic for memory operations
  3. Redis Client Layer: Redis Stack wrapper with connection pooling
  4. Security Layer: Encryption, access control, and audit logging

Memory Operations

Save Memory

# In Claude, you can say:
# "Save this conversation about Python optimization"
# "Remember that the meeting is at 3pm tomorrow"

Search Memory

# "What did we discuss about Redis?"
# "Find all memories from last week"

State Management

# "Create a checkpoint for the current project"
# "Restore the previous state"

Configuration

Environment variables:

  • REDIS_HOST: Redis server host (default: localhost)
  • REDIS_PORT: Redis server port (default: 6379)
  • REDIS_PASSWORD: Redis password (optional)
  • LOG_LEVEL: Logging level (default: INFO)

Development

# Clone the repository
git clone https://github.com/Jaesun23/spark-memory
cd spark-memory

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Run with debug logging
LOG_LEVEL=DEBUG python -m spark_memory

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support


Made with ❤️ by Jason and 1호

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spark_memory-0.1.2.tar.gz (148.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spark_memory-0.1.2-py3-none-any.whl (181.9 kB view details)

Uploaded Python 3

File details

Details for the file spark_memory-0.1.2.tar.gz.

File metadata

  • Download URL: spark_memory-0.1.2.tar.gz
  • Upload date:
  • Size: 148.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for spark_memory-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2650a47a87220b455bc730d937569e7d849d7594aa310f899f3c86d8ab7b57c9
MD5 3007899475b1704ca91e95d547eafc6d
BLAKE2b-256 86079216e5c399e4bfa8b8e54a72d8ab77b2cb507446c2171b10d0e0873804a6

See more details on using hashes here.

File details

Details for the file spark_memory-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: spark_memory-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 181.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for spark_memory-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a2be49467c31237ba8941462f51f03ec7014daa10368e559bb6da1ec3ca996f7
MD5 48e79a44bfbce31f02ef4be0f161ea6a
BLAKE2b-256 5484e109da8a0abe2910f173df841ec98e69e4350b2242775c4a7fc663ed4dd5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page