
Cowork History
io.github.egoughnour由 GitHub 账号 egoughnour 发布v4.0.3更新于 Oct 27, 2026
Hybrid search for Cowork history: FTS, Spotlight, and semantic vectors
概览
通过全文、Spotlight 和可选的语义向量检索,搜索和浏览本机的 Claude Code 与 Cowork 对话历史。
- 可以做什么
- 以混合、全文、Spotlight 或向量模式搜索对话,支持按项目过滤和精确短语匹配
- 列出最近的对话(可按项目筛选),并列出所有有历史记录的项目
- 按会话 ID 读取某个对话的完整内容
- 查看索引统计信息和当前可用的搜索后端
- 重建索引,并可选生成向量嵌入
- 检查、安装并配置用于向量搜索的 Ollama
- 适用场景
- 适合让助手回忆此前 Claude Code 或 Cowork 会话中讨论过的内容、找回某次调试过程,或按项目回顾历史对话,而无需手动逐个打开。
- 运行要求
- 以 stdio 本地进程运行,可通过 uvx、pip 或 Claude Desktop 安装包安装;偏向 macOS(使用 mdfind 的 Spotlight、可选 Homebrew 安装)。需要已存在含对话历史的 ~/.claude/ 目录。向量搜索还需运行中的 Ollama 服务,通过 OLLAMA_URL 和 EMBEDDING_MODEL 配置。
安装
在 SourceWeft 中
- 打开 控制台中的 Cowork History,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Cowork History MCP
An MCP (Model Context Protocol) server for searching and browsing your Claude conversation history stored in ~/.claude/. Works with both Claude Code and Cowork conversations.
Features
- Hybrid Search - Combines multiple search methods for best results:
- SQLite FTS5 - Fast full-text search with BM25 ranking
- macOS Spotlight - Leverages system content indexing via
mdfind - Vector Embeddings - Semantic similarity search (optional, requires Ollama)
- Smart Path Reconstruction - Recovers actual filesystem paths via probing (not heuristic guessing)
- Persistent Index - SQLite database with incremental updates for fast queries
- Ollama Setup Tools - Automated installation and configuration for embeddings
Installation
Option 1: Claude Desktop (One-Click Install)
Download cowork-history.mcpb from the latest release and double-click to install.
Option 2: Via uvx (Recommended for CLI)
Option 3: Via pip
Option 4: Manual Configuration
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
Quick Start
Once installed, Claude can search your conversation history:
Available Tools
Search & Browse
Ollama Setup (for Vector Search)
Search Modes
The cowork_history_search tool supports multiple search modes:
Search Examples
Enabling Vector Search
Vector search provides semantic similarity matching (finding related concepts even without exact keywords). It requires Ollama with an embedding model.
Quick Setup
Ask Claude to set it up for you:
Or manually:
Then generate embeddings:
How It Works
Indexing
The server maintains a SQLite database at ~/.claude/.history-index/conversations.db with:
- FTS5 virtual table for fast full-text search
- Conversation metadata (session ID, project, timestamps, topic)
- Full content for comprehensive search
- Path cache for reconstructed paths
- Embeddings table for vector search (optional)
The index updates automatically when you search (if >5 minutes old) or you can force a rebuild with cowork_history_reindex.
Environment Variables
Troubleshooting
No conversations found
- Make sure
~/.claude/directory exists - Check that you have conversation history (use Claude Code or Cowork first)
- Verify the MCP server is properly configured
Vector search not available
- Check Ollama is installed:
ollama --version - Check Ollama is running:
curl http://localhost:11434/api/tags - Check model is available:
ollama list - Pull embedding model:
ollama pull nomic-embed-text
Search not finding expected results
- Try natural language queries (semantic search is more flexible)
- Use
mode: "fts"for exact phrase matching - Check
cowork_history_statsto see which search backends are active
Development
Running locally
Testing with MCP Inspector
License
MIT License - see LICENSE file for details.
来源:README.md,提交 270013b
工具
0版本历史
1- v4.0.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分