# redleaves/context-keeper [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/redleaves/context-keeper  
**GitHub Stars:** 156  
**Views:** 10  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/redleaves-context-keeper

## Description
LLM-driven context and memory management with wide-recall + precise-reranking RAG architecture. Features multi-dimensional retrieval (vector/timeline/knowledge graph), short/long-term memory, and complete MCP support (HTTP/WebSocket/SSE).

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/redleaves/context-keeper), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/redleaves/context-keeper.git
```

2. Run:

```sh
cd context-keeper
```

3. Configure:

```sh
cp config/env.template config/.env
```

4. Configure:

```sh
vim config/.env
```

5. Start the server:

```sh
./scripts/manage.sh deploy http --port 8088
```

6. Install:

```sh
docker build -t context-keeper:latest .
```

## Documentation

## What redleaves/context-keeper does

The redleaves/context-keeper MCP server gives AI assistants persistent memory for conversations, projects, and development context. It separates recent conversation detail from durable knowledge summaries: short-term records are kept in the local file system, while long-term information is stored in a vector database. The design also isolates users, sessions, and workspaces so that context from separate projects is not mixed.

Memory is organized around a memory ID representing a task or topic and batch IDs representing stored conversation segments. The system can evaluate importance, preserve significant decisions, associate files with a session, and carry knowledge between sessions for the same user. Its stated use cases include reviewing architecture decisions, reusing fixes for similar bugs, and consulting previous configuration or technology-selection discussions.

## How it works

redleaves/context-keeper uses a two-stage retrieval flow. First, an intent-analysis step interprets the request and can rewrite the query. A broad retrieval stage then searches several dimensions in parallel: semantic or vector similarity, chronological information, and relationships in a knowledge graph. The resulting candidate set is passed to an LLM for quality assessment, relevance ranking, and synthesis.

Context is maintained through a four-dimensional model that is progressively built and updated. Initial session management can create a project context. Retrieval fills that context with topic and conversation information, while file association can update code-related context. Conversation storage and later retrieval operations trigger semantic change detection; detected changes are merged and persisted, while unchanged context is retained.

## Tools and capabilities

The README identifies these MCP operations:

- `session_management(get_or_create)` creates or retrieves a session and starts project-context construction when needed.
- `retrieve_context(query, sessionId)` searches and synthesizes relevant context for a session.
- `store_conversation(messages, sessionId)` saves conversation data and checks it against the current context.
- `associate_file(filePath, sessionId)` links a file with a session and uses it to update code context.

The redleaves/context-keeper MCP server supports MCP communication over HTTP, WebSocket, and SSE. Its retrieval model combines semantic, temporal, and knowledge-graph dimensions, with LLM-based reranking and context synthesis between retrieval and response generation.

## Setup and configuration

A vector database is required for the long-term memory layer. The project describes a unified vector-storage interface and lists Alibaba Cloud DashVector and JD Cloud Vearch as supported choices, while also allowing developers to implement other backends through that interface. Short-term conversation data uses the local file system.

The repository identifies Go 1.21 or later as the runtime baseline.

## Limitations and notes

The server depends on external LLM processing for intent analysis, ranking, synthesis, context comparison, and conflict handling. It also requires vector-storage infrastructure for durable memory.

The project is listed in the 🧠 Knowledge & Memory category. Its isolation model is intended to keep users, sessions, and workspaces separate, but operators should still verify storage permissions and retention behavior for their deployment.

_Full upstream README: https://allmcps.com/mcp/redleaves-context-keeper/readme_

