MCP Connector

Maintain Claude Conversation Continuity

Auto-saves and restores Claude project state across threads, with fuzzy-matching validation to stop project name fragmentation.

Works with claude

91
Spark score
out of 100
Updated Jul 2025
Version 1.0.0
Models

Add to Favorites

Why it matters

Ensure seamless, uninterrupted conversations with Claude, even when token limits are reached. This asset intelligently saves and restores your project context, preventing fragmentation and maintaining a cohesive dialogue.

Outcomes

What it gets done

01

Automatically save project state and conversation context.

02

Restore full conversation context for uninterrupted sessions.

03

Validate project names to prevent fragmentation.

04

Support multiple parallel projects with intelligent tracking.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-claude-thread-continuity | bash

Capabilities

Tools your agent gets

save_project_state

Save current project state with validation to enable context restoration

load_project_state

Restore full project context from a previously saved state

list_active_projects

View all tracked projects and their current status

get_project_summary

Get a brief overview of a specific project

validate_project_name

Check for similar project names to prevent fragmentation

auto_save_checkpoint

Automatically trigger checkpoint saving during conversations

Overview

Claude Thread Continuity MCP Server

This MCP server auto-saves Claude project state (focus, decisions, files, next actions) locally as JSON and restores it by name in a new thread. It also fuzzy-matches new project names against existing ones to catch accidental duplicates. Use it for multi-session development, research, writing, or debugging work likely to outlast one conversation's token limit. It's a local continuity tool, not a substitute for version control.

What it does

Claude Thread Continuity MCP Server automatically saves and restores project state when a Claude conversation hits its token limit, so context is not lost when starting a new thread. It saves state on triggers - file changes, technical decisions, project milestones, or every 10 messages as a fallback - and stores everything locally in human-readable JSON at ~/.claude_states/<project-name>/, with automatic backup rotation (keeps the last 5). Version 1.1 adds an anti-fragmentation system: before saving a new project, it fuzzy-matches the proposed name against existing projects (70% similarity threshold by default) and warns when a near-duplicate exists, for example flagging "Hebrew Speaking Evaluation MVP" as 85% similar to an existing "Hebrew Evaluation MVP" and recommending consolidation instead of creating a fragmented duplicate.

When to use - and when NOT to

Use it for complex, multi-session development projects, long-running research or learning threads, writing projects with recurring plot/character context, or multi-session debugging - anywhere a Claude conversation is likely to hit a token limit and need to resume with full context. It is not a substitute for version control or a database; it is a local, single-machine JSON store meant for conversational continuity, not for sharing project state across machines or team members. If you tend to create many similarly-named projects, the validation step is worth keeping on rather than routinely overriding with force=true.

Inputs and outputs

Core commands: save_project_state (writes project_name, current_focus, technical_decisions, files_modified, next_actions, conversation_summary), load_project_state (restores a named project's full state), list_active_projects, get_project_summary, validate_project_name (checks name similarity before saving), and auto_save_checkpoint (triggered automatically). A saved state is a JSON object like:

{
  "project_name": "my-project",
  "current_focus": "What you're working on now",
  "technical_decisions": ["Key choices made"],
  "files_modified": ["List of files created/changed"],
  "next_actions": ["Planned next steps"],
  "conversation_summary": "Brief context summary",
  "last_updated": "2025-06-15T10:30:00Z",
  "version": "1.1",
  "validation_bypassed": false
}

Example usage: save_project_state: project_name="my-web-app", current_focus="Setting up React components", technical_decisions=["Using TypeScript", "Vite for bundling"], next_actions=["Create header component", "Set up routing"], then later load_project_state: project_name="my-web-app" to pick up exactly where you left off.

How to install

Requires Python 3.8+ and the MCP SDK:

git clone https://github.com/peless/claude-thread-continuity.git
cd claude-thread-continuity
pip install -r requirements.txt
python3 test_server.py

Then add to claude_desktop_config.json:

{
  "mcpServers": {
    "claude-continuity": {
      "command": "python3",
      "args": ["~/.mcp-servers/claude-continuity/server.py"],
      "env": {}
    }
  }
}

Restart Claude Desktop.

Who it's for

Developers, researchers, and writers running long, multi-session Claude conversations who want to avoid re-explaining project context after every token-limit reset, and who want protection against accidentally fragmenting one project into several similarly-named ones. All data stays local; no accounts or telemetry. Licensed MIT.

Source README

🧠 Claude Thread Continuity MCP Server

Never lose context again! This MCP server automatically saves and restores project state when Claude threads hit token limits, ensuring seamless conversation continuity.

πŸš€ Features

  • πŸ”„ Automatic State Persistence - Auto-saves project context during conversations
  • ⚑ Seamless Restoration - Instantly restore full context when starting new threads
  • πŸ›‘οΈ Smart Validation - Prevents project fragmentation with intelligent name checking
  • πŸ”’ Privacy First - All data stored locally on your machine
  • 🎯 Zero Configuration - Works invisibly once set up
  • πŸ“Š Smart Triggers - Auto-saves on file changes, decisions, milestones
  • πŸ—‚οΈ Multi-Project Support - Manage multiple concurrent projects

✨ NEW: Anti-Fragmentation System

Version 1.1 introduces intelligent project validation to prevent the common issue of accidentally creating multiple similar projects:

  • πŸ” Fuzzy Name Matching - Detects similar project names (70% similarity threshold)
  • ⚠️ Validation Warnings - Suggests consolidation when similar projects exist
  • πŸ’ͺ Force Override - Bypass validation when genuinely different projects needed
  • 🎯 Configurable Thresholds - Adjust sensitivity for your workflow

Example Validation in Action

❌ Project "Hebrew Speaking Evaluation MVP" blocked
βœ… Similar project found: "Hebrew Evaluation MVP" (85% similar)
🎯 Recommendation: Update existing project or use force=true

⚑ Quick Start

# 1. Clone the repository
git clone https://github.com/peless/claude-thread-continuity.git
cd claude-thread-continuity

# 2. Install dependencies
pip install -r requirements.txt

# 3. Test the enhanced server
python3 test_server.py

# 4. Add to Claude Desktop config
# See setup instructions below

πŸ› οΈ Installation

1. Install the MCP Server

# Create permanent directory
mkdir -p ~/.mcp-servers/claude-continuity
cd ~/.mcp-servers/claude-continuity

# Copy files (or clone repo to this location)
# Place server.py and requirements.txt here

2. Configure Claude Desktop

Edit your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\\Claude\\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "claude-continuity": {
      "command": "python3",
      "args": ["~/.mcp-servers/claude-continuity/server.py"],
      "env": {}
    }
  }
}

3. Restart Claude Desktop

Close and reopen Claude Desktop. The continuity tools will now be available automatically.

🎯 How It Works

Automatic Context Saving

The server automatically saves project state when:

  • βœ… Files are created or modified
  • βœ… Technical decisions are made
  • βœ… Project milestones are reached
  • βœ… Every 10 messages (fallback)

Smart Validation Process

Before saving, the system:

  1. Checks for Similar Names - Uses fuzzy matching to find existing projects
  2. Calculates Similarity - Compares project names with 70% threshold
  3. Provides Recommendations - Suggests consolidation or renaming
  4. Allows Override - Use force: true for edge cases

Context Restoration

When starting a new thread:

  1. Load Project: load_project_state: project_name="your-project"
  2. Full Context Restored: All technical decisions, files, and progress restored
  3. Continue Seamlessly: Pick up exactly where you left off

πŸ”§ Available Commands

Command Description NEW in v1.1
save_project_state Save current project state ✨ Now with validation
load_project_state Restore full project context
list_active_projects View all tracked projects
get_project_summary Get quick project overview
validate_project_name Check for similar project names ✨ NEW
auto_save_checkpoint Triggered automatically

πŸ’‘ Usage Examples

Starting a New Project (with Validation)

save_project_state: project_name="my-web-app", current_focus="Setting up React components", technical_decisions=["Using TypeScript", "Vite for bundling"], next_actions=["Create header component", "Set up routing"]

Checking Name Before Creating

validate_project_name: project_name="my-webapp", similarity_threshold=0.7

Force Override When Needed

save_project_state: project_name="my-web-app-v2", force=true, current_focus="Starting version 2"

Continuing After Token Limit

load_project_state: project_name="my-web-app"

Viewing All Projects

list_active_projects

πŸ—‚οΈ Data Storage

Project states are stored locally at:

~/.claude_states/
β”œβ”€β”€ project-name-1/
β”‚   β”œβ”€β”€ current_state.json
β”‚   └── backup_*.json
└── project-name-2/
    β”œβ”€β”€ current_state.json
    └── backup_*.json
  • Privacy: Everything stays on your machine
  • Backups: Automatic backup rotation (keeps last 5)
  • Format: Human-readable JSON files
  • Validation: Metadata tracks validation bypass status

πŸ—οΈ Project State Structure

Each saved state includes:

{
  "project_name": "my-project",
  "current_focus": "What you're working on now",
  "technical_decisions": ["Key choices made"],
  "files_modified": ["List of files created/changed"],
  "next_actions": ["Planned next steps"],
  "conversation_summary": "Brief context summary",
  "last_updated": "2025-06-15T10:30:00Z",
  "version": "1.1",
  "validation_bypassed": false
}

πŸ›‘οΈ Validation Configuration

Default Settings

  • Similarity Threshold: 70% (0.7)
  • Comparison Method: Fuzzy string matching
  • Auto-save Behavior: Bypasses validation (uses force=true)

Customizing Validation

validate_project_name: project_name="test-project", similarity_threshold=0.8

Higher threshold = stricter matching (0.9 = 90% similar required)
Lower threshold = looser matching (0.5 = 50% similar triggers warning)

πŸ” Troubleshooting

Tools Not Appearing

  1. Check Claude Desktop logs
  2. Verify Python 3 is in your PATH: python3 --version
  3. Validate JSON config syntax
  4. Restart Claude Desktop completely

Testing the Enhanced Server

cd ~/.mcp-servers/claude-continuity
python3 test_server.py

The test suite now includes validation testing and will report:

  • βœ… Basic functionality tests
  • βœ… Project validation tests
  • βœ… Fuzzy matching accuracy
  • βœ… Force override functionality

Common Issues

Validation Too Strict:
Lower the similarity threshold or use force=true

Permission Errors:

chmod +x ~/.mcp-servers/claude-continuity/server.py

Python Path Issues:
Update the config to use full Python path:

{
  "command": "/usr/bin/python3",
  "args": ["~/.mcp-servers/claude-continuity/server.py"]
}

πŸ§ͺ Development

Requirements

  • Python 3.8+
  • MCP SDK 1.0+
  • difflib (built-in, for fuzzy matching)

Running Tests

python3 test_server.py

Enhanced test suite includes:

  • Basic functionality validation
  • NEW: Project name similarity testing
  • NEW: Validation workflow testing
  • NEW: Force override testing
  • NEW: MCP tool validation

Project Structure

claude-thread-continuity/
β”œβ”€β”€ server.py           # Main MCP server (enhanced with validation)
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ test_server.py     # Comprehensive test suite
β”œβ”€β”€ README.md          # This file
β”œβ”€β”€ LICENSE            # MIT License
└── examples/          # Usage examples

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Submit a pull request

Current Development Priorities

  • Integration with external project management tools
  • Advanced similarity algorithms
  • Project merging utilities
  • Custom validation rules

πŸ“„ License

MIT License - see LICENSE file for details.

πŸš€ Why This Matters

Before v1.1: 😫 Hit token limit β†’ Lose all context β†’ Re-explain everything β†’ Lose momentum

Common Problem: 😀 Create "Hebrew MVP", then "Hebrew Evaluation MVP", then "Hebrew Speaking MVP" β†’ Context scattered across multiple projects

After v1.1: 😎 Hit token limit β†’ Start new thread β†’ load_project_state β†’ Continue seamlessly + Smart validation prevents fragmentation

Perfect for:

  • πŸ—οΈ Complex Development Projects - Keep track of architecture decisions without fragmentation
  • πŸ“š Learning & Research - Maintain context across study sessions with consistent naming
  • ✍️ Writing Projects - Remember plot points without creating duplicate character projects
  • πŸ”§ Multi-session Debugging - Preserve debugging state with clear project organization

πŸ“ˆ Version History

v1.1.0 (Current)

  • ✨ Project Validation System - Prevents fragmentation with fuzzy name matching
  • ✨ validate_project_name tool - Manual name checking
  • ✨ Force Override capability - Bypass validation when needed
  • ✨ Enhanced Testing - Comprehensive validation test suite
  • πŸ› Bug Fixes - Improved error handling and edge cases

v1.0.0

  • πŸš€ Initial release with core continuity functionality

Built with ❀️ for the Claude community

Tired of fragmented projects? Version 1.1 keeps your context organized!

FAQ

Common questions

Discussion

Questions & comments Β· 0

Sign In Sign in to leave a comment.