# cowork-history [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/egoughnour/cowork-history  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/cowork-history

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

## Tools
Capabilities this server exposes over MCP:

- **history_system_check** — Check if system meets requirements for Ollama embeddings.

Verifies: macOS, Apple Silicon (M1/M2/M3/M4), RAM, Homebrew.
Use before attempting Ollama setup.
- **history_setup_ollama** — Install Ollama via Homebrew (macOS).

Requires Homebrew pre-installed. Uses 'brew install' and 'brew services'.
PROS: Auto-updates, pre-built binaries, managed service.
CONS: Requires Homebrew, may prompt for sudo on first install.
- **history_setup_ollama_direct** — Install Ollama via direct download (macOS).

Downloads from ollama.com to ~/Applications.
PROS: No Homebrew needed, no sudo required, fully headless.
CONS: Manual PATH setup, no auto-updates.
- **history_ollama_status** — Check Ollama server status and available models.

Returns whether Ollama is running and if the embedding model is available.
Use to check if semantic/vector search is available.
- **cowork_history_search** — Search Claude conversation history using hybrid search.

Combines FTS5 full-text search, macOS Spotlight content indexing, and
optional vector similarity (requires Ollama). Supports natural language,
keywords, and "exact phrases".

Examples:
- "authentication bug" - finds conversations mentioning both words
- "how to deploy" - semantic search finds related discussions
- project:"my-app" query:"database" - filter by project
- **cowork_history_list** — List recent Claude conversations from the index, sorted by modification time.
- **cowork_history_get** — Get full content of a specific conversation by session ID.
- **cowork_history_projects** — List all projects with conversation history, showing reconstructed paths.
- **cowork_history_stats** — Get statistics about conversation history and search capabilities.
- **cowork_history_reindex** — Rebuild the conversation index and optionally generate embeddings.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "cowork-history": {
    "command": "uvx",
    "args": ["cowork-history"],
    "env": {
      "OLLAMA_URL": "",
      "EMBEDDING_MODEL": ""
    }
  }
}
```

**Requires environment variables:** `OLLAMA_URL`, `EMBEDDING_MODEL` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What cowork-history MCP server does

The cowork-history MCP server makes Claude Code and Cowork conversation history stored under `~/.claude/` searchable through MCP. It supports keyword search, macOS Spotlight search, and semantic similarity search backed by Ollama embeddings. The search tool can choose a mode automatically or use a specific backend: `auto`, `fts`, `spotlight`, `vector`, or `hybrid`.

In addition to searching, the server can list recent conversations, filter listings by project, retrieve the complete content for a session ID, and enumerate projects with stored history. It also reports index statistics and which search capabilities are currently available.

## How it works

Conversation metadata and content are maintained in a SQLite database at `~/.claude/.history-index/conversations.db`. The database includes an FTS5 table for ranked text queries, conversation metadata such as session IDs, projects, timestamps, and topics, full conversation content, a path cache, and an optional embeddings table.

The index is refreshed automatically when a search detects that it is more than five minutes old. `cowork_history_reindex` can rebuild it on demand and can optionally generate embeddings. Path reconstruction probes for actual filesystem paths rather than relying only on inferred names.

FTS mode is suited to fast keyword or exact-phrase matching. Spotlight mode uses macOS `mdfind`. Vector mode finds related concepts even when the query does not share the same wording as the conversation, but it depends on a running Ollama service and an available embedding model. Hybrid mode combines available methods and ranks the results together.

## Setup and configuration

Install the package with `uvx cowork-history` or `pip install cowork-history`. Claude Desktop can also install the packaged `.mcpb` release, or launch the server through an MCP configuration using the `uvx` command. The repository documents local development with an editable install and direct module execution.

`OLLAMA_URL` sets the Ollama endpoint and defaults to `http://localhost:11434`. `EMBEDDING_MODEL` selects the embedding model and defaults to `nomic-embed-text`. These settings are only relevant to vector embeddings; the server can use non-vector search modes without configuring Ollama.

For vector search on macOS, Ollama can be installed through Homebrew or through the server's direct-download setup tool. After installation, the service must be running and the selected embedding model must be available. Reindexing with embeddings then populates the vector data.

## Tools and capabilities

- `cowork_history_search`: query conversation history with hybrid, FTS, Spotlight, or vector search.
- `cowork_history_list`: list recent sessions, optionally by project.
- `cowork_history_get`: retrieve a session's full content by ID.
- `cowork_history_projects`: list projects containing history.
- `cowork_history_stats`: inspect index statistics and backend availability.
- `cowork_history_reindex`: rebuild the index and optionally create embeddings.
- `history_system_check`, `history_ollama_status`: inspect Ollama requirements and model availability.
- `history_setup_ollama`, `history_setup_ollama_direct`: install Ollama using Homebrew or a direct download.

## Limitations and notes

The server requires existing conversation data under `~/.claude/`; it cannot return history that has not been created there. Spotlight search depends on macOS indexing, while vector search requires Ollama and an embedding model. For exact phrase matching, FTS mode is the documented choice. The available search backends can be checked with `cowork_history_stats`.

_Full upstream README: https://allmcps.com/mcp/cowork-history/readme_

