Implement a Redis Graph-powered memory system for LLM conversations with search, relationships, and management tools
MCP Memory with Redis Graph is a server implementation that leverages Redis Graph
for storing and retrieving memories related to conversations with language models (LLMs). It integrates seamlessly with various AI applications, enabling them to connect to specific data sources through standardized Model Context Protocol (MCP) methods. This solution ensures efficient memory management and retrieval, which is critical for enhancing the contextual understanding and utility of AI applications in real-world scenarios.
MCP Memory with Redis Graph stores different types of memories such as conversations, projects, tasks, issues, configurations, finance-related information, and to-do items. Each memory type is managed through a comprehensive set of CRUD (Create, Read, Update, Delete) operations facilitated by the MCP protocol.
This server allows for the creation of complex relationships between pieces of information via Redis Graph
. Relationships are crucial for building a knowledge graph that enhances context and enables sophisticated queries across data points. For instance, it can link a project with specific issues or tasks associated with it.
The system supports multiple memory types:
Redis Graph provides high-performance querying capabilities, making it ideal for handling large-scale memory stores. This reliability ensures that the system can scale as more memories are added over time without degrading performance.
MCP Memory with Redis Graph uses Redis
as its primary data storage backend. The RedisGraph
module enables graph-based querying, which is essential for modeling relationships and connections between different memory nodes.
The server provides several APIs and tools for integrating with MCP clients like Claude Desktop, Continue, Cursor, and others. These clients can leverage the MCP protocol to interact with Redis via the provided services, thereby facilitating seamless data exchange and memory management across various applications.
Before getting started, ensure that you have the following pre-installed:
Start by running the Redis container with the RedisGraph module loaded:
docker-compose up -d
Once the container is up, verify its operation by executing a session in the Redis CLI from within a Docker terminal. Here’s how you can do it:
docker exec -it mcp-memory-redis-1 redis-cli
127.0.0.1:6379> MODULE LIST
The application can connect to Redis using configurations specified in src/index.ts
. By default, it connects to a local Redis instance at localhost:6379
.
To customize the connection string, update the Redis client configuration within this file:
// Example of updating Redis client settings
const redisConfig = {
host: 'your-host',
port: 6380,
};
Suppose an organization uses an LLM to manage project-related tasks and issues. In this context, the MCP Memory with Redis Graph server can be used as follows:
For financial analysis, this server can store historical financial data, regulatory advice, and risk assessments in a structured manner:
To integrate the Redis Graph server with various MCP clients, follow these steps:
npm install
.npm start
.MCP Memory supports a matrix of compatible MCP clients that ensure seamless integration and data exchange:
AI Application | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ (only tools support) | ✅ | ❌ (unavailable) | Tools Only |
MCP Memory can be configured to enhance security and performance:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
This sample configuration ensures secure communication between the client and server.
A1: Yes, this server is designed to be fully compatible with these and other MCP clients.
A2: You can update the src/index.ts
file's configuration section as needed.
A3: Yes, by using unique identifiers or tags, you can categorize and manage shared or private memories effectively.
A4: Use the create_relation
, get_related_memories
APIs to build and query complex relationships between different pieces of data.
A5: Yes, while RedisGraph is primarily used, MCP servers can be extended or integrated with other databases as needed through custom scripts.
If you wish to contribute to the development of this project:
git clone https://github.com/your-repo
.By integrating with this MCP Memory server, AI applications can achieve enhanced contextual understanding and data management capabilities, making the process of handling complex tasks significantly more efficient.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods