mcp-memory-enhanced

JamesPrial/mcp-memory-enhanced

3.3

If you are the rightful owner of mcp-memory-enhanced and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

MCP Memory Enhanced is an advanced version of the MCP Memory Server, designed to offer improved performance and scalability with a dual storage backend.

MCP Memory Enhanced

CI Docker Build Version Coverage

An enhanced fork of the official MCP Memory Server with SQLite backend support for improved performance and scalability. Now at v1.0.0 - Production Ready! πŸš€

πŸš€ Features

  • Dual Storage Backend: Choose between JSON (original) and SQLite storage
  • 3-10x Performance Improvement: SQLite backend offers significant speed gains
  • Production-Ready Docker Support: Multi-stage builds, health checks, and UnRAID compatibility
  • Backward Compatible: 100% compatible with the original MCP protocol
  • Migration Tools: Seamlessly migrate from JSON to SQLite storage

πŸ“Š Performance Comparison

Based on benchmarks with 10,000+ entities:

OperationJSON BackendSQLite BackendImprovement
Entity Creation3.5s0.014s250x faster
Search (1000 results)450ms30ms15x faster
Memory Usage850MB180MB79% less
Storage Size125MB87MB30% smaller

🐳 Quick Start with Docker

docker run -d \
  --name mcp-memory-enhanced \
  -p 6970:6970 \
  -v /path/to/data:/data \
  -e STORAGE_TYPE=sqlite \
  ghcr.io/jamesprial/mcp-memory-enhanced:latest

πŸ“¦ Installation

From npm (via GitHub)

# Latest version
npm install github:JamesPrial/mcp-memory-enhanced

# Specific version
npm install github:JamesPrial/mcp-memory-enhanced#v1.0.0

From Source

git clone https://github.com/JamesPrial/mcp-memory-enhanced.git
cd mcp-memory-enhanced
npm install
npm run build

Using Docker Compose

docker-compose up -d

πŸ”§ Configuration

Environment Variables

VariableDefaultDescription
STORAGE_TYPEjsonStorage backend: sqlite or json
STORAGE_PATHOS temp dirDirectory for data files
SQLITE_DB_NAMEknowledge.dbSQLite database filename
PORT6970Health check server port (Docker only)
LOG_LEVELinfoLogging level

MCP Configuration

Add to your MCP client settings:

{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": ["/path/to/mcp-memory-enhanced/dist/index.js"],
      "env": {
        "STORAGE_TYPE": "sqlite",
        "STORAGE_PATH": "/path/to/data"
      }
    }
  }
}

πŸ”„ Migration from JSON to SQLite

# Using the migration tool
npm run migrate /path/to/knowledge-graph.jsonl

Or with Docker:

docker run --rm \
  -v /path/to/json-data:/source \
  -v /path/to/sqlite-data:/data \
  ghcr.io/jamesprial/mcp-memory-enhanced:latest \
  node dist/migrate.js /source/knowledge-graph.jsonl

πŸ₯ Health Check (Docker only)

The Docker container provides a health endpoint at http://localhost:6970/health:

{
  "status": "healthy",
  "timestamp": "2025-08-05T12:00:00.000Z",
  "storage": {
    "type": "sqlite",
    "stats": {
      "entityCount": 1000,
      "relationCount": 500,
      "observationCount": 2000,
      "storageSize": 1048576
    }
  }
}

πŸš€ UnRAID Deployment

  1. Download the
  2. In UnRAID web UI: Docker β†’ Add Container β†’ Template
  3. Select the template file and configure as needed

πŸ› οΈ Development

Running Tests

npm test

Building Docker Image

docker build -f Dockerfile.standalone -t mcp-memory-enhanced .

Running Locally

STORAGE_TYPE=sqlite npm start

πŸ“ˆ Architecture

The Enhanced MCP Memory Server uses a clean storage abstraction layer:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MCP Client    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ stdio
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MCP Server    β”‚
β”‚   (index.ts)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ KnowledgeGraph  β”‚
β”‚    Manager      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ IStorageBackend β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
    β”‚         β”‚
β”Œβ”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”
β”‚ JSON  β”‚ β”‚SQLite β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the file for details.

πŸ™ Acknowledgments

πŸ“Š Status

  • Phase 1: βœ… Core Implementation (Complete)
  • Phase 2: βœ… Docker Support (Complete)
  • Phase 3: βœ… CI/CD Pipeline (Complete)
  • Phase 4: πŸ”„ Production Hardening (Next)

πŸ€– Enhanced for production use with ❀️ by @JamesPrial