Automatically detects git repositories to namespace and isolate memories per-repo, with cross-repo memory support and automatic repository indexing for semantic code search.
Supports repository-based memory management with automatic detection and indexing of GitHub repositories for context-aware semantic search and code navigation.
Provides hosted deployment storage backend using PostgreSQL with pgvector extension for vector embeddings, semantic search, and team sharing of memories.
Distributed as a Python package on PyPI for installation and deployment of the ContextFS memory layer.
Default local storage backend using SQLite with FTS5 for keyword search, memory storage, and session management.
ContextFS
Universal AI Memory Layer - Cross-client, cross-repo context management with RAG.
Works with Claude Code, Claude Desktop, Gemini CLI, Codex CLI, and any MCP client.
Documentation | Developer Memory Workflow Guide | GitHub
Features
Semantic Search - ChromaDB + sentence-transformers for intelligent retrieval
Auto Code Indexing - Automatically index repositories for semantic code search
Dual Storage - Smart routing between FTS (keywords) and RAG (semantic)
Cross-Repo Memory - Memories track source repository automatically
Session Management - Automatic capture and replay of conversation context
MCP Server - Standard protocol for universal client support
Plugins - Native integrations for Claude Code, Gemini CLI, Codex CLI
Web UI - Browse and search memories with side-by-side FTS/RAG comparison
Quick Start
Upgrading
Usage
CLI
Python API
MCP Server
Add to your MCP client config (Claude Code, Claude Desktop):
Or with Python directly:
MCP Tools:
Tool | Description |
| Save memory (auto-indexes repo, logs to session) |
| Semantic search with cross-repo support |
| Get specific memory by ID |
| List recent memories |
| Update existing memory content, type, tags, or project |
| Delete a memory by ID |
| Initialize repo for auto-indexing (opt-in) |
| Index current repository for code search |
| Check or cancel background indexing progress |
| List all indexed repositories with stats |
| List all repositories with memories |
| List source tools (claude-code, claude-desktop, etc.) |
| List all projects |
| List sessions |
| Load session messages |
| Add message to current session |
| Update session label or summary |
| Delete a session and its messages |
| Import JSON conversation as episodic memory |
MCP Prompts:
Prompt | Description |
| Guided memory save with type selection |
| Initialize repo for auto-indexing |
| Index repository for semantic search |
| Instructions for session capture |
| Save current session |
Plugins
Claude Code
Gemini CLI / Codex CLI
Cross-Repo Namespaces
ContextFS automatically detects your git repository and isolates memories:
Configuration
Environment variables:
Supported Languages
ContextFS supports 50+ file types including Python, JavaScript, TypeScript, Go, Rust, Java, C++, and more. See full list in docs.
Developer Memory Workflow (DMW)
ContextFS enables persistent developer memory across sessions with typed memories:
Type | Use Case |
| Project configurations, conventions |
| Architectural choices with rationale |
| Algorithms, patterns, important snippets |
| Bug fixes, error patterns, solutions |
| Setup guides, deployment steps |
| Session transcripts, conversations |
See the full Developer Memory Workflow Guide for patterns and examples.
Memory Lineage & Graph Operations
ContextFS tracks memory evolution and relationships with graph-backed lineage:
MCP Tools for Graph Operations:
Tool | Description |
| Update memory with history tracking |
| Combine multiple memories into one |
| Divide memory into separate parts |
| Create relationships between memories |
| Find connected memories via graph traversal |
| View memory evolution history |
Relationship Types: references, depends_on, contradicts, supports, supersedes, related_to, derived_from, part_of, implements
Session Management
Source tool auto-detected (claude-code, claude-desktop) or set via CONTEXTFS_SOURCE_TOOL.
Web UI
Start the web server to browse and search memories:
Features:
Browse all memories with filtering by type, repo, and project
Side-by-side FTS vs RAG search comparison
Session browser and message viewer
Real-time memory statistics
Architecture
Storage Backends
Backend | Purpose |
SQLite + FTS5 | Default local storage, keyword search, sessions |
ChromaDB | Vector embeddings, semantic/RAG search |
PostgreSQL + pgvector | Hosted deployments, team sharing |
FalkorDB | Advanced graph queries via Cypher |
Typed Storage Protocol
The StorageProtocol provides a unified interface across backends with typed models:
EdgeRelation- 20+ relationship types (references, depends_on, contradicts, etc.)MemoryEdge- Typed edges with weights and metadataGraphPath/GraphTraversal- Path finding and subgraph queries
License
MIT
Authors
Matthew Long and The YonedaAI Collaboration