Never lose context again! This MCP server automatically saves and restores project state when Claude threads hit token limits, ensuring seamless conversation continuity.
- π 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
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
β Project "Hebrew Speaking Evaluation MVP" blocked
β
Similar project found: "Hebrew Evaluation MVP" (85% similar)
π― Recommendation: Update existing project or use force=true
# 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
# 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
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": {}
}
}
}
Close and reopen Claude Desktop. The continuity tools will now be available automatically.
The server automatically saves project state when:
- β Files are created or modified
- β Technical decisions are made
- β Project milestones are reached
- β Every 10 messages (fallback)
Before saving, the system:
- Checks for Similar Names - Uses fuzzy matching to find existing projects
- Calculates Similarity - Compares project names with 70% threshold
- Provides Recommendations - Suggests consolidation or renaming
- Allows Override - Use
force: true
for edge cases
When starting a new thread:
- Load Project:
load_project_state: project_name="your-project"
- Full Context Restored: All technical decisions, files, and progress restored
- Continue Seamlessly: Pick up exactly where you left off
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 |
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"]
validate_project_name: project_name="my-webapp", similarity_threshold=0.7
save_project_state: project_name="my-web-app-v2", force=true, current_focus="Starting version 2"
load_project_state: project_name="my-web-app"
list_active_projects
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
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
}
- Similarity Threshold: 70% (0.7)
- Comparison Method: Fuzzy string matching
- Auto-save Behavior: Bypasses validation (uses
force=true
)
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)
- Check Claude Desktop logs
- Verify Python 3 is in your PATH:
python3 --version
- Validate JSON config syntax
- Restart Claude Desktop completely
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
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"]
}
- Python 3.8+
- MCP SDK 1.0+
- difflib (built-in, for fuzzy matching)
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
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
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
- Integration with external project management tools
- Advanced similarity algorithms
- Project merging utilities
- Custom validation rules
MIT License - see LICENSE file for details.
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
- β¨ 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
- π Initial release with core continuity functionality
Built with β€οΈ for the Claude community
Tired of fragmented projects? Version 1.1 keeps your context organized!