Get the FREE Ultimate OpenClaw Setup Guide →

mcp-memory

MCP server from rbownes/mcp-memory-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio rbownes-mcp-memory-server cargo run \
  --env MCP_MEMORY_LOG_LEVEL="info" \
  --env MCP_MEMORY_CHROMA_URL="" \
  --env MCP_MEMORY_CHROMA_PATH="/path/to/chroma" \
  --env MCP_MEMORY_EMBEDDING_SIZE="384" \
  --env MCP_MEMORY_EMBEDDING_MODEL="dummy" \
  --env MCP_MEMORY_STORAGE_BACKEND="inmemory" \
  --env MCP_MEMORY_CHROMA_COLLECTION="memory_collection" \
  --env MCP_MEMORY_EMBEDDING_MODEL_PATH=""

How to use

This MCP server provides a Rust-based memory service that stores, retrieves, and manages memory items for MCP clients. It exposes tools via the MCP protocol, including store_memory to save content with tags and metadata, retrieve_memory to fetch semantically similar memories, search_by_tag to filter memories by tags, and delete_memory to remove memories by their hash. The server communicates over stdio, making it straightforward to connect to MCP clients or testers that launch the server and interact through JSON-RPC on stdin. After starting the server, you can query the available tools, then call them with appropriate arguments to manage memory data and embeddings using either the in-memory or Chromadb-backed storage, and with embedding models such as dummy or ONNX depending on configuration.

How to install

Prerequisites:

  • Rust and Cargo (1.75.0 or later)
  • Node.js and npm (for testing with the MCP inspector)
  • Optional: ChromaDB server (for production use)

Steps:

  1. Install Rust/Cargo if you don’t have them installed.

  2. Clone the repository containing the MCP Memory Service (Rust implementation).

  3. Build the project: cargo build

  4. Run a release build (optional): cargo build --release

  5. (Optional) Run with environment-based configuration as shown in the example: MCP_MEMORY_STORAGE_BACKEND=chromadb
    MCP_MEMORY_CHROMA_PATH=/path/to/chroma
    MCP_MEMORY_EMBEDDING_MODEL=onnx
    cargo run

  6. Test the server using the included Node.js test script or npm test: npm install npm test

Additional notes

Environment variables control the behavior of the memory service. Common variables include:

  • MCP_MEMORY_STORAGE_BACKEND: inmemory or chromadb
  • MCP_MEMORY_CHROMA_PATH: path to ChromaDB data
  • MCP_MEMORY_CHROMA_URL: optional ChromaDB server URL
  • MCP_MEMORY_CHROMA_COLLECTION: collection name in ChromaDB
  • MCP_MEMORY_EMBEDDING_MODEL: dummy or onnx
  • MCP_MEMORY_EMBEDDING_MODEL_PATH: path to ONNX model file
  • MCP_MEMORY_EMBEDDING_SIZE: embedding vector size
  • MCP_MEMORY_LOG_LEVEL: logging level (e.g., info, debug) If using Chromadb, ensure the Chromadb server is running and accessible at the configured URL. The default configuration uses in-memory storage which is suitable for testing and development. When using ONNX embeddings, ensure the ONNX model and optional tokenizer are available at the configured paths.

Common issues:

  • Mismatched environment variable names or missing model files can cause startup failures. Double-check all MCP_MEMORY_* variables.
  • If building locally, ensure you have Rust toolchain installed and your PATH includes cargo.
  • For testing with MCP clients, you may want to run tests that exercise all four tools: store_memory, retrieve_memory, search_by_tag, and delete_memory to confirm end-to-end behavior.

Related MCP Servers

Sponsor this space

Reach thousands of developers