MCP Memory Service logo

MCP Memory Service

by rbownes

This is a Rust implementation of the Model Context Protocol (MCP) Memory Service. It provides memory storage and retrieval functionality over stdio for easy integration with MCP clients.

View on GitHub

Last updated: N/A

What is MCP Memory Service?

The MCP Memory Service is a Rust implementation of an MCP server that provides memory storage and retrieval functionality. It allows MCP clients to store, retrieve, search, and delete memories using various storage backends and embedding models.

How to use MCP Memory Service?

To use the server, build it using cargo build. Then, run it using cargo run, optionally configuring it with environment variables. Send JSON-RPC requests to its stdin to interact with the memory storage and retrieval tools. You can also register it with an MCP client by adding it to the client's MCP configuration.

Key features of MCP Memory Service

  • Implements an MCP server for memory storage and retrieval

  • Communicates over stdio for easy integration with MCP clients

  • Supports store, retrieve, search, and delete operations

  • Supports in-memory and ChromaDB storage backends

  • Supports dummy and ONNX embedding models

Use cases of MCP Memory Service

  • Storing and retrieving memories for AI models

  • Semantic search of memories based on content

  • Tag-based search of memories

  • Integration with MCP clients like Claude

  • Testing and development of MCP memory services

FAQ from MCP Memory Service

What are the prerequisites for running the server?

Rust and Cargo (1.75.0 or later), Node.js and npm (for testing), and optionally a ChromaDB server (for production use).

How do I configure the server?

The server is configured using environment variables. See the README for a list of available variables and their descriptions.

How do I use the ONNX embedding model?

Export a transformer model to ONNX format, save the tokenizer as a tokenizer.json file, and set the environment variables MCP_MEMORY_EMBEDDING_MODEL to onnx and MCP_MEMORY_EMBEDDING_MODEL_PATH to the path of the ONNX model.

How do I register this server with an MCP client?

Add the server's configuration to the MCP client's configuration file, specifying the command, arguments, and environment variables for the server.

What storage backends are supported?

The server supports in-memory storage (for testing) and ChromaDB storage (for production).