io.github.egoughnour/cowork-history

السجل الرسمي البيانات وقواعدها

Hybrid search for Cowork history: FTS, Spotlight, and semantic vectors

ماذا يمكنك أن تفعل مع io.github.egoughnour/cowork-history؟

  • Hybrid Search - Combines multiple search methods for best results:
  • 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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package cowork-history
Claude Code
claude mcp add cowork-history -e 'OLLAMA_URL=<OLLAMA_URL>' -e 'EMBEDDING_MODEL=<EMBEDDING_MODEL>' -- uvx cowork-history==4.0.3
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "cowork-history": {
            "command": "uvx",
            "args": [
                "cowork-history==4.0.3"
            ],
            "env": {
                "OLLAMA_URL": "<OLLAMA_URL>",
                "EMBEDDING_MODEL": "<EMBEDDING_MODEL>"
            }
        }
    }
}

متغيرات البيئة

  • OLLAMA_URL URL for Ollama server (default: http://localhost:11434)
  • EMBEDDING_MODEL Ollama embedding model (default: nomic-embed-text)
MCPB package https://github.com/egoughnour/cowork-history/releases/download/v4.0.3/cowork-history.mcpb

متغيرات البيئة

  • OLLAMA_URL URL for Ollama server (default: http://localhost:11434)
  • EMBEDDING_MODEL Ollama embedding model (default: nomic-embed-text)

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Cowork History MCP
  2. Features
  3. Installation
  4. Quick Start
  5. Available Tools
  6. Search Modes
  7. Enabling Vector Search
  8. How It Works
  9. Environment Variables
  10. Troubleshooting
  11. Development
  12. License

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.

uvx cowork-history
Option 3: Via pip
pip install cowork-history
Option 4: Manual Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "cowork-history": {
      "command": "uvx",
      "args": ["cowork-history"],
      "env": {
        "OLLAMA_URL": "http://localhost:11434",
        "EMBEDDING_MODEL": "nomic-embed-text"
      }
    }
  }
}

Quick Start

Once installed, Claude can search your conversation history:

"What did we discuss about authentication last week?"
"Find the conversation where we debugged the payment webhook"
"Show me my conversations in the my-project folder"

Available Tools

Search & Browse
ToolDescription
cowork_history_searchSearch conversations using hybrid search (FTS + Spotlight + vector)
cowork_history_listList recent conversations, optionally filtered by project
cowork_history_getGet full content of a specific conversation by session ID
cowork_history_projectsList all projects with conversation history
cowork_history_statsGet statistics and search capability status
cowork_history_reindexRebuild index and optionally generate embeddings
ToolDescription
history_system_checkCheck system requirements for Ollama
history_setup_ollamaInstall Ollama via Homebrew (macOS)
history_setup_ollama_directInstall Ollama via direct download (no Homebrew)
history_ollama_statusCheck Ollama status and embedding model availability

Search Modes

The cowork_history_search tool supports multiple search modes:

ModeDescription
auto (default)Uses all available methods, best results
ftsFull-text search only (fastest)
spotlightmacOS Spotlight only
vectorSemantic similarity only (requires Ollama)
hybridExplicit combination with ranking
Search Examples
"authentication bug"           → finds conversations with both words
"how to deploy"                → semantic search finds related discussions
"\"exact phrase\""             → exact phrase matching
project:"my-app" "database"    → filter by project

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:

"Set up Ollama for vector search"

Or manually:

# Install Ollama (macOS)
brew install ollama

# Start Ollama service
brew services start ollama

# Pull the embedding model
ollama pull nomic-embed-text

Then generate embeddings:

"Rebuild the history index with 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

VariableDefaultDescription
OLLAMA_URLhttp://localhost:11434Ollama server URL
EMBEDDING_MODELnomic-embed-textOllama embedding model

Troubleshooting

No conversations found
  1. Make sure ~/.claude/ directory exists
  2. Check that you have conversation history (use Claude Code or Cowork first)
  3. Verify the MCP server is properly configured
Vector search not available
  1. Check Ollama is installed: ollama --version
  2. Check Ollama is running: curl http://localhost:11434/api/tags
  3. Check model is available: ollama list
  4. 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_stats to see which search backends are active

Development

Running locally
# Clone the repository
git clone https://github.com/egoughnour/cowork-history
cd cowork-history

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest tests/

# Run the server directly
python -m src.cowork_history_server
Testing with MCP Inspector
npx @modelcontextprotocol/inspector uvx cowork-history

License

MIT License - see LICENSE file for details.

الأسئلة الشائعة

ما هو io.github.egoughnour/cowork-history؟

Hybrid search for Cowork history: FTS, Spotlight, and semantic vectors

كيف أثبّت io.github.egoughnour/cowork-history؟

يعمل على جهازك. في Claude Code: claude mcp add cowork-history -e 'OLLAMA_URL=<OLLAMA_URL>' -e 'EMBEDDING_MODEL=<EMBEDDING_MODEL>' -- uvx cowork-history==4.0.3. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.egoughnour/cowork-history إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.egoughnour/cowork-history مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.egoughnour/cowork-history؟

ينشره egoughnour. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.