Skip to main content

Ingest Claude AI conversation exports into a local ChromaDB vector database for semantic search

Project description

claude-chroma

A Python CLI tool that ingests Claude AI conversation exports into a local ChromaDB vector database, making your entire conversation history semantically searchable. Pair it with the official chroma-mcp server to give Claude Desktop or Claude Code access to everything you've ever discussed.

Prerequisites

  • Python 3.11+
  • uv

Quickstart

# Clone and install
git clone https://github.com/danwahl/claude-chroma.git
cd claude-chroma
uv sync

# Drop your Claude export(s) into claude_data/
cp ~/Downloads/conversations.json claude_data/

# Ingest into ChromaDB
uv run claude-chroma ingest

# Verify
uv run claude-chroma stats

# Test a search
uv run claude-chroma search "free will compatibilism"

Connecting to Claude Desktop / Claude Code

Add the official chroma-mcp server to your claude_desktop_config.json:

{
  "mcpServers": {
    "chroma": {
      "command": "uvx",
      "args": [
        "chroma-mcp",
        "--client-type", "persistent",
        "--data-dir", "/absolute/path/to/claude-chroma/chroma_data"
      ]
    }
  }
}

Claude will then be able to query your full conversation history via the chroma MCP tool.

CLI Reference

claude-chroma ingest

Ingest all .json exports from the Claude data directory (including subdirectories) into ChromaDB.

Options:
  --claude-dir PATH  Directory containing JSON exports [default: ./claude_data]
  --chroma-dir PATH  ChromaDB storage directory [default: ./chroma_data]

claude-chroma stats

Show database statistics: total conversations, chunks, date range, and top 10 most-chunked conversations.

Options:
  --chroma-dir PATH  ChromaDB storage directory [default: ./chroma_data]

claude-chroma search

Run a semantic similarity search for development and debugging.

Arguments:
  QUERY              Search query text

Options:
  -n, --n-results    Number of results [default: 5]
  --chroma-dir PATH  ChromaDB storage directory [default: ./chroma_data]

Chunking Strategy

Conversations are chunked at the exchange level — each human message is paired with the subsequent assistant response. This preserves the question + answer arc as a single semantic unit. Long assistant responses (>2000 characters) are split with overlap, with the human message prepended as context to each sub-chunk.

Chunk IDs are deterministic ({conversation_uuid}:{turn_index}), so re-ingesting the same export is a no-op, and updated exports overwrite stale data.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_chroma-0.1.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_chroma-0.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file claude_chroma-0.1.2.tar.gz.

File metadata

  • Download URL: claude_chroma-0.1.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for claude_chroma-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c253a1d0fb363bb628aaa965de213ef8623dc212b6d2a0a5bc388a5170229948
MD5 1254446df05ed3f7677a3d1428e19ab7
BLAKE2b-256 be1545c38621fafc5e59d7ef38ffea42ab2f3c9e49a6a58b9577b6b9384b2b0b

See more details on using hashes here.

File details

Details for the file claude_chroma-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_chroma-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 90f0a231e6c7432e36279ed4746dd97effd7aa54f07c0b5fc83a8643f2056262
MD5 7b4f59c79451354bc995d1393a737c9f
BLAKE2b-256 96516ba6f970b4fe7acf3162fb9c1ee2f1eb033ed3c09cefcd9df169b1cda631

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page