Ctxvault
Local memory infrastructure for AI agents. Store knowledge and skills in isolated vaults you compose, control and query.
What is Ctxvault?
Ctxvault is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to local memory infrastructure for ai agents. store knowledge and skills in isolated vaults you compose, control and query.
Local memory infrastructure for AI agents. Store knowledge and skills in isolated vaults you compose, control and query.
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Local memory infrastructure for AI agents. Store knowledge a
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx ctxvaultConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Ctxvault
CtxVault is a local-first memory infrastructure layer for AI agents that organizes knowledge into isolated, composable vaults backed by ChromaDB vector embeddings and LangChain. Each vault can hold PDFs, Markdown, plain text, or DOCX documents, which are semantically indexed so agents can query them with natural language. Vaults can be scoped globally or per-project via a .ctxvault/config.json file that can be committed to version control, making knowledge portable across machines. AI agent developers and researchers use CtxVault to give their agents persistent, searchable knowledge bases and reusable skill stores without relying on cloud memory services.
Prerequisites
- Python 3.10 or later installed
- pip or uv package manager available
- ChromaDB dependencies (installed automatically by the ctxvault package)
- An MCP-compatible client such as Claude Desktop
- Optional: uv for faster dependency management and isolated environments
Install CtxVault from PyPI
Install the ctxvault package. This also installs the ctxvault-mcp entry point used by MCP clients.
pip install ctxvaultInitialize your first vault
Create a local vault in your project directory. CtxVault will create a .ctxvault/config.json in the current directory to record the vault configuration.
ctxvault init my-knowledge-vaultAdd documents to the vault and index them
Copy PDF, Markdown, TXT, or DOCX files into the vault directory, then run the index command to generate vector embeddings for semantic search.
# Copy docs into the vault directory:
cp docs/*.md .ctxvault/vaults/my-knowledge-vault/
# Index the vault:
ctxvault index my-knowledge-vaultTest semantic search from the CLI
Verify the vault is working with a quick command-line query before connecting an AI agent.
ctxvault query my-knowledge-vault "how does authentication work"Configure Claude Desktop to use CtxVault via MCP
Add the ctxvault-mcp entry to your MCP client configuration. The --agent flag is optional and restricts access to vaults that list that agent name in their access control config.
{
"mcpServers": {
"ctxvault": {
"command": "ctxvault-mcp"
}
}
}Restart the MCP client and query vaults from Claude
After restarting Claude Desktop, the tools list_vaults, query, write, and list_docs become available. Ask Claude to list your vaults and then query one to confirm everything works.
Ctxvault Examples
Client configuration
Claude Desktop configuration for CtxVault MCP Server using the ctxvault-mcp command. Add --agent to restrict access to vaults configured for that agent identity.
{
"mcpServers": {
"ctxvault": {
"command": "ctxvault-mcp",
"args": ["--agent", "claude"]
}
}
}Prompts to try
Example prompts that use CtxVault's vault management and semantic search capabilities.
- "List all available CtxVault vaults and tell me how many documents each one contains."
- "Search the 'architecture-docs' vault for information about the authentication flow."
- "Write a new note about today's meeting decisions to the 'project-memory' vault."
- "Query the 'api-specs' vault for the endpoint that handles user profile updates."
- "Show me all documents indexed in the 'onboarding' vault."Troubleshooting Ctxvault
ctxvault index fails with a ChromaDB or embedding error
ChromaDB requires a compatible version of sentence-transformers. Run pip install ctxvault --upgrade to get the latest pinned dependencies, or create a fresh virtual environment and reinstall. On Apple Silicon, ensure you have the arm64 wheels: pip install chroma-hnswlib --no-binary :all: may be needed.
ctxvault-mcp command not found in Claude Desktop
The ctxvault-mcp script is installed to the Python environment's bin directory. If Claude Desktop does not inherit your PATH, use the absolute path to ctxvault-mcp (e.g., /Users/you/.local/bin/ctxvault-mcp) in the command field of the MCP config.
Query returns no results for documents I know were indexed
Confirm the vault was indexed in the same directory from which ctxvault-mcp is invoked — CtxVault searches for .ctxvault/config.json upward from the working directory. If the working directory differs between the CLI and the MCP server, the vault may not be found. Set an explicit project path or use a global vault stored in ~/.ctxvault/.
Frequently Asked Questions about Ctxvault
What is Ctxvault?
Ctxvault is a Model Context Protocol (MCP) server that local memory infrastructure for ai agents. store knowledge and skills in isolated vaults you compose, control and query. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Ctxvault?
Follow the installation instructions on the Ctxvault GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Ctxvault?
Ctxvault works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Ctxvault free to use?
Yes, Ctxvault is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Ctxvault Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Ctxvault? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Ctxvault in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Ctxvault?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.