
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 分