CCCMemory MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CCCMemory MCPsearch my past decisions about database schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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)
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-mcpInstall new package:
npm install -g cccmemoryUpdate MCP config to use
cccmemorycommandDatabase migration is automatic (
.claude-conversations-memory.db→.cccmemory.db)
Related MCP server: Memex
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 cccmemoryVerify installation:
cccmemory --versionConfiguration
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 cccmemoryManual 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.dbFallback (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:
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
ollama pull mxbai-embed-large
ollama serveConfig:
{
"embedding": {
"provider": "ollama",
"model": "mxbai-embed-large",
"dimensions": 1024
}
}{
"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:
Variable | Default | Description |
|
| Enable smart chunking for long messages |
|
| Target chunk size in tokens |
|
| Overlap between chunks (0-1) |
|
| Enable hybrid re-ranking (vector + FTS) |
|
| Vector weight in re-ranking (FTS gets 1-weight) |
|
| Enable synonym expansion for queries |
MCP Tools
Indexing
Tool | Description |
| Index current project's conversations |
| Index all Claude Code + Codex projects |
Search
Tool | Description |
| Search messages in current project |
| Search a project across Claude Code + Codex |
| Search across all indexed projects |
| Find architectural decisions |
| Decisions across all projects |
| Find past errors and fixes |
| Mistakes across all projects |
| Find related conversations |
Context
Tool | Description |
| Get context before editing a file |
| See file history with commits |
| Find all context related to a file |
| List recent sessions with summaries |
| Summarize the latest session (problem, actions, errors) |
| Recall past work for current task |
| Look up component requirements |
| Query tool usage history |
| Connect git commits to sessions |
Project Management
Tool | Description |
| Find folders from renamed projects |
| Migrate/merge conversation history |
| Delete conversations by keyword |
| Generate docs from local code scan + conversations |
Working Memory
Tool | Description |
| Store a fact, decision, or context with optional TTL |
| Retrieve a specific memory by key |
| Semantic search across stored memories |
| List all memories, optionally filtered by tags |
| Remove a memory by key |
Session Handoff
Tool | Description |
| Create handoff document for session transition |
| Resume work from a previous handoff |
| List available handoff documents |
Context Injection
Tool | Description |
| Get relevant context at conversation start |
| Auto-inject context based on user message |
Tag Management
Tool | Description |
| List all tags with usage statistics |
| Find items by tag (memories, decisions, patterns) |
| Rename a tag across all items |
| Merge multiple tags into one |
| Delete a tag and unlink all items |
| Add tags to an item |
| Remove tags from an item |
Memory Quality
Tool | Description |
| Set confidence level (uncertain/likely/confirmed/verified) |
| Set importance level (low/normal/high/critical) |
| Pin a memory to prevent cleanup |
| Archive a memory with optional reason |
| Restore an archived memory |
| Search memories by confidence/importance |
| Get memory statistics by confidence/importance |
Maintenance
Tool | Description |
| Database size and item counts |
| Find items not accessed recently |
| Find similar/duplicate items |
| Merge duplicate items |
| Archive or delete stale items |
| Reclaim disk space |
| Remove orphaned records |
| Overall database health check |
| Run multiple maintenance tasks |
| View past maintenance operations |
Session IDs
list_recent_sessions returns two identifiers:
id: internal conversation id (use forscope="current"filters, handoffs, and documentation filters)session_id: external session id (Claude JSONL filename / Codex rollout id). Use forindex_conversationsand CLIindex --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 helpSupported Platforms
Platform | Status | Conversation Location |
Claude Code | ✅ Supported |
|
Claude Desktop | ✅ Supported | (indexes Claude Code history) |
Codex | ✅ Supported |
|
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 cccmemoryMCP 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 statusDefault Transformers.js should work out of the box. If you opt into Ollama, ensure it's running (ollama serve).
License
MIT
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaolai/cccmemory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server