by peless
claude-thread-continuity is an MCP server designed to enhance the Claude Desktop experience by automatically saving and restoring project context. It ensures seamless conversation continuity, even when threads reach token limits, and prevents project fragmentation.
claude-thread-continuity is an MCP (Multi-Context Project) server designed to enhance the Claude Desktop experience by automatically saving and restoring project context. This ensures seamless conversation continuity, even when threads hit token limits, and prevents project fragmentation.
server.py
and requirements.txt
to a permanent directory (e.g., ~/.mcp-servers/claude-continuity
).pip install -r requirements.txt
.claude_desktop_config.json
) located in your OS-specific application support directory.mcpServers
entry for claude-continuity
, specifying the Python command and the path to server.py
.Once set up, you can use commands within Claude to manage project states:
save_project_state: project_name="your-project", ...
load_project_state: project_name="your-project"
validate_project_name: project_name="test-project", similarity_threshold=0.8
Q: What happens when I hit the token limit? A: The server automatically saves your project context, allowing you to load it in a new thread and continue seamlessly.
Q: How does the anti-fragmentation system work? A: It uses fuzzy name matching to detect similar project names (default 70% similarity). If a similar project is found, it suggests consolidating or updating the existing one, preventing you from creating redundant projects.
Q: Where is my data stored?
A: All project states are stored locally on your machine in ~/.claude_states/
in human-readable JSON format. No data leaves your device.
Q: Can I customize the validation sensitivity?
A: Yes, you can adjust the similarity_threshold
when using the validate_project_name
command.
Q: What if the tools don't appear in Claude Desktop? A: Check Claude Desktop logs, verify Python 3 is in your PATH, validate your JSON config syntax, and restart Claude Desktop completely.
Never lose context again! This MCP server automatically saves and restores project state when Claude threads hit token limits, ensuring seamless conversation continuity.
Version 1.1 introduces intelligent project validation to prevent the common issue of accidentally creating multiple similar projects:
β 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:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\\Claude\\claude_desktop_config.json
~/.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:
Before saving, the system:
force: true
for edge casesWhen starting a new thread:
load_project_state: project_name="your-project"
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
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
}
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)
python3 --version
cd ~/.mcp-servers/claude-continuity
python3 test_server.py
The test suite now includes validation testing and will report:
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"]
}
python3 test_server.py
Enhanced test suite includes:
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:
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:
Built with β€οΈ for the Claude community
Tired of fragmented projects? Version 1.1 keeps your context organized!
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by danny-avila
Provides a customizable ChatGPTβlike web UI that integrates dozens of AI models, agents, code execution, image generation, web search, speech capabilities, and secure multiβuser authentication, all openβsource and ready for selfβhosting.
by ahujasid
BlenderMCP integrates Blender with Claude AI via the Model Context Protocol (MCP), enabling AI-driven 3D scene creation, modeling, and manipulation. This project allows users to control Blender directly through natural language prompts, streamlining the 3D design workflow.
by pydantic
Enables building productionβgrade generative AI applications using Pydantic validation, offering a FastAPIβlike developer experience.
by GLips
Figma-Context-MCP is a Model Context Protocol (MCP) server that provides Figma layout information to AI coding agents. It bridges design and development by enabling AI tools to directly access and interpret Figma design data for more accurate and efficient code generation.
by mcp-use
Easily create and interact with MCP servers using custom agents, supporting any LLM with tool calling and offering multiβserver, sandboxed, and streaming capabilities.
by sonnylazuardi
This project implements a Model Context Protocol (MCP) integration between Cursor AI and Figma, allowing Cursor to communicate with Figma for reading designs and modifying them programmatically.
by lharries
WhatsApp MCP Server is a Model Context Protocol (MCP) server for WhatsApp that allows users to search, read, and send WhatsApp messages (including media) through AI models like Claude. It connects directly to your personal WhatsApp account via the WhatsApp web multi-device API and stores messages locally in a SQLite database.
by idosal
GitMCP is a free, open-source remote Model Context Protocol (MCP) server that transforms any GitHub project into a documentation hub, enabling AI tools to access up-to-date documentation and code directly from the source to eliminate "code hallucinations."
by Klavis-AI
Klavis AI provides open-source Multi-platform Control Protocol (MCP) integrations and a hosted API for AI applications. It simplifies connecting AI to various third-party services by managing secure MCP servers and authentication.