New:Socket for Asana Is Now Available.Learn more
Get Started

cccmemory

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cccmemory

MCP server for indexing and searching Claude Code conversation history with decision tracking, git integration, and project migration/merge

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

CCCMemory MCP

An MCP server that gives Claude long-term memory by indexing conversation history with semantic search, decision tracking, and cross-project search.

What's New in v2.0

Version 2.0 brings major improvements to search quality and accuracy:

  • Smart Chunking - Long messages are now split at sentence boundaries, ensuring full content is searchable (previously truncated at 512 tokens)
  • Hybrid Search - Combines semantic search with full-text search using Reciprocal Rank Fusion (RRF) for better ranking
  • Dynamic Thresholds - Similarity thresholds adjust based on query length for better precision
  • Improved Snippets - Search results highlight matching terms in context
  • Extraction Validation - Reduces false positives in decision/mistake detection
  • Query Expansion - Optional synonym expansion for broader recall (disabled by default)
⚠️ Breaking Changes in v1.8.0 (click to expand)

This package was renamed from claude-conversation-memory-mcp to cccmemory.

If upgrading from the old package:

  • Uninstall old package: npm uninstall -g claude-conversation-memory-mcp
  • Install new package: npm install -g cccmemory
  • Update MCP config to use cccmemory command
  • Database migration is automatic (.claude-conversations-memory.db.cccmemory.db)

Features

  • Search conversations - Natural language search across your chat history
  • Smart chunking - Long messages fully indexed without truncation
  • Hybrid search - Combines vector + keyword search with RRF re-ranking
  • Track decisions - Remember why you made technical choices
  • Prevent mistakes - Learn from past errors
  • Git integration - Link conversations to commits
  • Cross-project search - Search across all your projects globally
  • Project migration - Keep history when renaming/moving projects
  • Semantic search - Uses Transformers.js embeddings (bundled, works offline)
  • Working memory - Store and recall facts, decisions, and context across sessions
  • Session handoff - Seamless context transfer between conversations
  • Tag management - Organize memories, decisions, and patterns with tags
  • Memory quality - Track confidence, importance, and verification status
  • Database maintenance - Find duplicates, clean stale data, health reports

Installation

Node.js version

CCCMemory supports Node.js 20 or 22 LTS. Using other versions can break native modules (like better-sqlite3). If you switch Node versions, reinstall the package (or run npm rebuild better-sqlite3 in a local clone).

npm install -g cccmemory

Verify installation:

cccmemory --version

Configuration

For Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "cccmemory": {
      "command": "npx",
      "args": ["-y", "cccmemory"]
    }
  }
}

Then restart Claude Desktop.

For Claude Code

Edit ~/.claude.json (note: this file is in your home directory, not inside ~/.claude/):

{
  "mcpServers": {
    "cccmemory": {
      "command": "npx",
      "args": ["-y", "cccmemory"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "cccmemory": {
      "command": "cccmemory"
    }
  }
}

For Codex CLI

Codex stores MCP settings in ~/.codex/config.toml (shared by the CLI and the IDE extension).

Recommended (CLI):

codex mcp add cccmemory -- npx -y cccmemory

Manual config (~/.codex/config.toml):

[mcp_servers.cccmemory]
command = "npx"
args = ["-y", "cccmemory"]

If you installed globally, you can use:

[mcp_servers.cccmemory]
command = "cccmemory"

Open Codex and run /mcp in the TUI to verify the server is active.

Storage Paths

By default, CCCMemory uses a single database:

  • ~/.cccmemory.db

If you want per-project isolation, set:

export CCCMEMORY_DB_MODE="per-project"

In per-project mode, CCCMemory stores:

  • ~/.claude/projects/<project>/.cccmemory.db
  • Fallback (restricted sandboxes): <project>/.cccmemory/.cccmemory.db

If your home directory is not writable (common in sandboxed Codex/Claude setups where ~/.claude and ~/.codex are locked), set an explicit writable path:

export CCCMEMORY_DB_PATH="/path/to/cccmemory.db"

For MCP configs, add these env vars in your server definition. CCCMemory stores the global project registry inside the same database (projects + project_sources tables).

Embedding Configuration (Optional)

The MCP uses Transformers.js by default for semantic search (bundled, works offline, no setup required).

Model download & cache behavior (Transformers.js):
On first use, @xenova/transformers downloads the model weights and caches them in its own default cache directory. CCCMemory does not manage or relocate that cache. Subsequent runs reuse the cached model and work fully offline.

To customize, create ~/.claude-memory-config.json:

{
  "embedding": {
    "provider": "transformers",
    "model": "Xenova/all-MiniLM-L6-v2",
    "dimensions": 384
  }
}

Alternative providers:

Ollama (faster, requires Ollama running)
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
ollama pull mxbai-embed-large
ollama serve

Config:

{
  "embedding": {
    "provider": "ollama",
    "model": "mxbai-embed-large",
    "dimensions": 1024
  }
}
OpenAI (requires API key)
{
  "embedding": {
    "provider": "openai",
    "model": "text-embedding-3-small",
    "dimensions": 1536
  }
}

Set OPENAI_API_KEY environment variable.

Search Configuration (Optional)

Tune search behavior with environment variables:

VariableDefaultDescription
CCCMEMORY_CHUNKING_ENABLEDtrueEnable smart chunking for long messages
CCCMEMORY_CHUNK_SIZE450Target chunk size in tokens
CCCMEMORY_CHUNK_OVERLAP0.1Overlap between chunks (0-1)
CCCMEMORY_RERANK_ENABLEDtrueEnable hybrid re-ranking (vector + FTS)
CCCMEMORY_RERANK_WEIGHT0.7Vector weight in re-ranking (FTS gets 1-weight)
CCCMEMORY_QUERY_EXPANSIONfalseEnable synonym expansion for queries

MCP Tools

Indexing

ToolDescription
index_conversationsIndex current project's conversations
index_all_projectsIndex all Claude Code + Codex projects
ToolDescription
search_conversationsSearch messages in current project
search_project_conversationsSearch a project across Claude Code + Codex
search_all_conversationsSearch across all indexed projects
get_decisionsFind architectural decisions
get_all_decisionsDecisions across all projects
search_mistakesFind past errors and fixes
search_all_mistakesMistakes across all projects
find_similar_sessionsFind related conversations

Context

ToolDescription
check_before_modifyGet context before editing a file
get_file_evolutionSee file history with commits
search_by_fileFind all context related to a file
list_recent_sessionsList recent sessions with summaries
get_latest_session_summarySummarize the latest session (problem, actions, errors)
recall_and_applyRecall past work for current task
get_requirementsLook up component requirements
get_tool_historyQuery tool usage history
link_commits_to_conversationsConnect git commits to sessions

Project Management

ToolDescription
discover_old_conversationsFind folders from renamed projects
migrate_projectMigrate/merge conversation history
forget_by_topicDelete conversations by keyword
generate_documentationGenerate docs from local code scan + conversations

Working Memory

ToolDescription
rememberStore a fact, decision, or context with optional TTL
recallRetrieve a specific memory by key
recall_relevantSemantic search across stored memories
list_memoryList all memories, optionally filtered by tags
forgetRemove a memory by key

Session Handoff

ToolDescription
prepare_handoffCreate handoff document for session transition
resume_from_handoffResume work from a previous handoff
list_handoffsList available handoff documents

Context Injection

ToolDescription
get_startup_contextGet relevant context at conversation start
inject_relevant_contextAuto-inject context based on user message

Tag Management

ToolDescription
list_tagsList all tags with usage statistics
search_by_tagsFind items by tag (memories, decisions, patterns)
rename_tagRename a tag across all items
merge_tagsMerge multiple tags into one
delete_tagDelete a tag and unlink all items
tag_itemAdd tags to an item
untag_itemRemove tags from an item

Memory Quality

ToolDescription
set_memory_confidenceSet confidence level (uncertain/likely/confirmed/verified)
set_memory_importanceSet importance level (low/normal/high/critical)
pin_memoryPin a memory to prevent cleanup
archive_memoryArchive a memory with optional reason
unarchive_memoryRestore an archived memory
search_memory_by_qualitySearch memories by confidence/importance
get_memory_statsGet memory statistics by confidence/importance

Maintenance

ToolDescription
get_storage_statsDatabase size and item counts
find_stale_itemsFind items not accessed recently
find_duplicatesFind similar/duplicate items
merge_duplicatesMerge duplicate items
cleanup_staleArchive or delete stale items
vacuum_databaseReclaim disk space
cleanup_orphansRemove orphaned records
get_health_reportOverall database health check
run_maintenanceRun multiple maintenance tasks
get_maintenance_historyView past maintenance operations

Session IDs

list_recent_sessions returns two identifiers:

  • id: internal conversation id (use for scope="current" filters, handoffs, and documentation filters)
  • session_id: external session id (Claude JSONL filename / Codex rollout id). Use for index_conversations and CLI index --session.

index_conversations accepts either, but external session_id is preferred.

CLI Usage

The package includes a standalone CLI:

# Interactive mode
cccmemory

# Single commands
cccmemory status
cccmemory index
cccmemory "search authentication"
cccmemory help

Supported Platforms

PlatformStatusConversation Location
Claude Code✅ Supported~/.claude/projects/
Claude Desktop✅ Supported(indexes Claude Code history)
Codex✅ Supported~/.codex/sessions/

Why only Claude Code and Codex CLI today? CCCMemory indexes local session history from stable, parseable on-disk formats. Claude Code and Codex CLI both store full conversation logs locally with consistent schemas. Other tools either do not expose full local history, only support partial/manual saves, or do not provide a stable file format to parse reliably. Without deterministic local storage, there is nothing safe to index or resume.

Architecture

Single Database (default)
└── ~/.cccmemory.db
    ├── projects + project_aliases
    ├── project_sources (global index)
    └── conversations/messages/decisions/mistakes/...

Per-Project Databases (optional)
└── ~/.claude/projects/{project}/.cccmemory.db
    └── {project}/.cccmemory/.cccmemory.db (sandbox fallback)

Troubleshooting

Claude Desktop shows JSON parse errors

Upgrade to v1.7.3+:

npm update -g cccmemory

MCP not loading in Claude Code

  • Check config location is ~/.claude.json (not ~/.claude/config.json)
  • Verify JSON syntax is valid
  • Restart Claude Code

Embeddings not working

Check provider status:

cccmemory status

Default Transformers.js should work out of the box. If you opt into Ollama, ensure it's running (ollama serve).

License

MIT

Keywords

mcp

FAQs

Package last updated on 25 Jan 2026

Related posts