CL

Claude Thread Continuity MCP Server Persistent Memory

Resume Claude Desktop conversations with full context using the MCP server memory, keeping history, project states, and preferences across sessions.

Overview

This MCP (Model Context Protocol) server provides persistent memory for Claude Desktop threads, allowing conversations to be resumed with full context across sessions and devices. It implements a lightweight HTTP service that stores conversation history, project state, and user preferences so that Claude Desktop (or any MCP-aware client) can rehydrate threads after restarts or when switching machines.

Persisting context simplifies longer workflows that require continuity—code reviews, multi-step design discussions, and project-based agent work. Instead of relying on local ephemeral state, the MCP server centralizes memory in durable storage and exposes simple endpoints for storing, retrieving, and managing memory items keyed by thread, project, or namespace.

Features

  • Persistent storage of conversation history, project states, and preferences
  • Namespace and thread-scoped memories for per-project or per-session isolation
  • Simple HTTP API compatible with MCP-aware clients (store, fetch, list, delete)
  • Pluggable storage backend (file-based or database-backed) and configurable data directory
  • Lightweight and easy to run locally or behind a reverse proxy
  • Optional Docker support for quick deployment

Installation / Configuration

Clone the repository, install dependencies, and run the server locally. Replace commands below with your preferred environment (venv, Docker, etc.).

  1. Clone and install
git clone https://github.com/peless/claude-thread-continuity.git
cd claude-thread-continuity
# Python example:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Run the server
# default run (adjust the command if the project uses a different entrypoint)
python server.py
  1. Environment variables / config (examples)
# Basic settings
export MCP_PORT=8080
export MCP_HOST=0.0.0.0

# Storage settings (file path, or a DB URL if supported)
export MEMORY_DIR=/var/lib/claude-mcp
export DATABASE_URL=sqlite:///data/mcp.db   # optional, if a DB backend is supported

# Logging / operational
export LOG_LEVEL=info
  1. Docker (example)
docker build -t claude-mcp .
docker run -p 8080:8080 \
  -e MCP_PORT=8080 \
  -v $(pwd)/data:/data \
  claude-mcp

Note: Adjust paths and environment keys according to your deployment preferences. The repository includes a README and example config to match the exact variable names the server uses.

Available Resources

  • GitHub repository: https://github.com/peless/claude-thread-continuity
  • MCP (Model Context Protocol) implementations and client integrations — use the MCP endpoints in your Claude Desktop or custom client to save and load memories
  • Example client snippets (see below) demonstrate typical request payloads for storing and retrieving memory entries

API endpoints (common patterns — verify exact paths in the repository):

MethodPathPurpose
POST/memoryCreate or update a memory item
GET/memory/:idRetrieve a memory item by id
GET/threads/:thread_id/memoryList memory items for a thread
DELETE/memory/:idRemove a memory item

Example request schema (JSON)

{
  "namespace": "project-xyz",
  "thread_id": "thread-123",
  "key": "conversation-history",
  "value": "Full transcript or serialized state",
  "metadata": {"user": "alice", "role": "owner"},
  "timestamp": "2026-04-10T12:00:00Z"
}

Use Cases

  • Resume a paused Claude Desktop conversation: when the user re-opens Claude Desktop, the client fetches thread memories from the MCP server and presents the full conversation and context so the assistant can continue seamlessly.
  • Maintain project state across devices: store project-specific variables (requirements, style preferences, last-file-edits) in a namespace keyed by project ID, allowing collaborators to share continuity with the same context.
  • Keep user preferences and assistant persona: persist settings such as tone, default file paths, and domain constraints so every session remembers the user’s preferred behavior.
  • Long-running agent tasks: agents that run across multiple sessions can checkpoint progress (current step, tools used, retrieved facts) into the MCP server and resume work after interruptions.

Concrete example — save memory via curl

curl -X POST http://localhost:8080/memory \
  -H "Content-Type: application/json" \
  -d '{
    "namespace": "project-website",
    "thread_id": "thread-42",
    "key": "conversation",
    "value": "User: Please refactor index.html. Assistant: Sure, starting...",
    "metadata": {"file": "index.html"}
  }'

Fetch thread memories

curl http://localhost:8080/threads/thread-42/memory

Delete a specific memory

curl -X DELETE http://localhost:8080/memory/<memory-id>

Notes for Developers

  • Review the server README in the repository for exact environment variable names, supported storage backends, and entrypoint commands.
  • The server is intended as a local or self-hosted memory service; secure it appropriately when exposing to networks (TLS, authentication, and access controls).
  • Use namespace and thread_id fields to partition data for multi-user or multi-project scenarios. This keeps conversation data scoped and efficiently retrievable.

This MCP server is a practical way to add durable conversational memory to Claude Desktop and other MCP-aware tools, enabling richer, longer-lived conversational workflows without losing context between sessions.