mcp-server-claude
by zcc-cddg-mx
README.md
# mcp-server-claude
MCP Memory Server for Claude Code — persistent context across sessions using semantic search (RAG).
## Problem
Claude Code compacts conversation history when it exceeds the context window (~200k tokens). This causes loss of operational context between sessions. A database alone doesn't fix this — the solution is **selective context retrieval** (RAG), not full history loading.
## Solution
A local MCP server that:
1. Saves key fragments from each session with embeddings
2. On new sessions, retrieves only the top-K semantically relevant fragments (~5-10k tokens)
3. Provides structured project context (decisions, status, todos) on demand
## Architecture
```
Claude Code CLI
│ MCP Protocol (JSON-RPC 2.0 / stdio)
▼
MCP Memory Server (FastMCP)
├── Tools: remember, recall, get_project_context, list_sessions
├── ChromaDB ← vector store (semantic search)
└── SQLite ← session metadata
```
## Quick Start
```bash
git clone <repo>
cd mcp-server-claude
pip install -r requirements.txt
cp .env.example .env
# edit .env — set MEMORY_DB_PATH to a directory outside the repo
# Register with Claude Code:
# Add the contents of mcp_config.example.json to ~/.claude/settings.json
```
## Environment
Designed for Zurich Insurance GenAI Platform (LiteLLM proxy UAT, WSL2 Ubuntu 24).
- `CLAUDE_CODE_DISABLE_PROMPT_CACHING=1` — proxy doesn't support caching; this server compensates
- All embeddings run locally (sentence-transformers) — no external calls
## Documentation
- [Architecture & Analysis](docs/ANALYSIS.md)
- [Managed Projects](docs/projects.md)
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues