PC

peless/claude-thread-continuity

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

65 stars 10 forks 质量 66 趋势 14MIT

🧠 让你的Claude对话保持畅通!一个MCP服务器,当线程达到令牌限制时,自动保存并恢复项目上下文。

概览

当 Claude 线程达到令牌限制时,该 MCP 服务器会自动保存并恢复项目状态,确保对话无缝连续。 - - 在对话中自动保存项目上下文 - - 在启动新线程时立即恢复完整上下文 - - 通过智能命名检查防止项目碎片化 - - 所有数据存储在你的机器本地 - - 设置后工作隐形 - - 自动保存文件变更、决策和里程碑 - - 管理多个并发项目 1.1版本引入了智能项目验证,以防止误创建多个相似项目的常见问题: - - 检测相似项目名称(70%相似度阈值) - - 当存在相似项目时建议合并 - - 需要真正不同项目时绕过验证 - - 调整工作流程的敏感度 编辑你的Claude Desktop配置文件: - ~/库/应用支持/Claude/claude_desktop_config。

概述(AI 翻译)

永不再丢失上下文! 当 Claude 线程达到令牌限制时,该 MCP 服务器会自动保存并恢复项目状态,确保对话无缝连续。

🚀 特色

  • ** 🔄 自动状态持久化** - 在对话中自动保存项目上下文
  • ** ⚡ 无缝恢复** - 启动新线程时即时恢复完整上下文
  • ** 🛡️ 智能验证** - 通过智能名称检查防止项目碎片化
  • ** 🔒 隐私优先** - 所有存储在您机器本地的数据
  • ** 🎯 零配置** - 设置后隐形工作
  • ** 📊 智能触发器** - 自动保存文件变更、决策、里程碑
  • ** 🗂️ 多项目支持** - 管理多个并发项目

✨ 新:反碎片化系统

1.1版本引入了智能项目验证,以防止误创建多个相似项目的常见问题:

  • ** 🔍 模糊名称匹配** - 检测相似项目名称(相似度阈值70%)
  • ** ⚠️ 验证警告** - 建议在类似项目存在时进行合并
  • ** 💪 强制覆盖** - 当真正需要不同项目时绕过验证

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 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:

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

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