Swarmvault
The local-first LLM Wiki: open-source knowledge graph builder, RAG knowledge base, and agent memory store. Built on Andrej Karpathy's pattern. An Obsidian alternative for personal knowledge management, AI second brain, and durable Claude Code / Codex
What is Swarmvault?
Swarmvault is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to local-first llm wiki: open-source knowledge graph builder, rag knowledge base, and agent memory store. built on andrej karpathy's pattern. an obsidian alternative for personal knowledge management, ai...
The local-first LLM Wiki: open-source knowledge graph builder, RAG knowledge base, and agent memory store. Built on Andrej Karpathy's pattern. An Obsidian alternative for personal knowledge management, AI second brain, and durable Claude Code / Codex
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- The local-first LLM Wiki: open-source knowledge graph builde
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx swarmvaultConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Swarmvault
SwarmVault is a local-first knowledge graph builder, RAG knowledge base, and persistent agent memory store for LLM-powered development workflows. Inspired by Andrej Karpathy's writing on LLM wikis, it ingests your codebases, documentation, and external sources into a searchable knowledge graph and exposes this context to AI agents via an MCP server. Claude Code, Codex, Cursor, and 40+ other agent platforms can query the vault, update a task ledger, and retrieve semantically ranked context packs—making it a durable second brain that persists across sessions.
Prerequisites
- Node.js 24+ (required for the @swarmvaultai/cli package)
- npm 10+ for global CLI installation
- An MCP-compatible agent such as Claude Code, Cursor, or VS Code Copilot
- Optional: an API key for a cloud LLM provider (OpenAI, Anthropic, Gemini) if you want cloud model backends; the built-in heuristic provider works offline with no keys
Install the SwarmVault CLI globally
Install the @swarmvaultai/cli package globally via npm. Node.js 24 or newer is required.
npm install -g @swarmvaultai/cli
swarmvault --versionInitialize a vault for your project
Run quickstart to scan your repository, build the initial knowledge graph, and set up the vault directory structure. This creates raw/, wiki/, state/, agent/, and inbox/ directories.
swarmvault quickstart ./your-repoInstall for Claude Code with MCP
Register SwarmVault as an MCP server for Claude Code. The --mcp flag writes the configuration to .mcp.json and --hook sets up git hooks for automatic graph updates.
swarmvault install --agent claude --mcp --hookConfigure a cloud LLM provider (optional)
Add a cloud provider if you want to use OpenAI, Anthropic, or Gemini models for compilation and query. Skip this step to use the built-in offline heuristic provider.
export OPENAI_API_KEY=your_openai_api_key_here
swarmvault provider add openaiCompile the knowledge base
Run the compile command to extract entities, relationships, and summaries from your ingested sources and write them to the wiki directory.
swarmvault compile --max-tokens 8000 --approve --commitQuery the vault
Test that the knowledge base is working by running a query. This exercises the same retrieval path that the MCP server uses when Claude Code requests context.
swarmvault query "What are the key architectural patterns in this codebase?"Swarmvault Examples
Client configuration
MCP configuration for Claude Code, generated automatically by swarmvault install --agent claude --mcp. You can also add this manually to .mcp.json in your project root.
{
"mcpServers": {
"swarmvault": {
"command": "swarmvault",
"args": ["mcp"]
}
}
}Prompts to try
Use these prompts in Claude Code or another connected agent to leverage the SwarmVault knowledge graph.
- "What are the key concepts and architectural decisions in this codebase?"
- "Build a context pack for the authentication module with an 8000 token budget"
- "What is the current task ledger status?"
- "Add a source from https://github.com/owner/repo and rebuild the graph"
- "Run a vault health check and report any issues"Troubleshooting Swarmvault
npm install fails with Node.js version error
SwarmVault requires Node.js 24 or newer. Run `node --version` to check. Use nvm to install the latest Node: `nvm install 24 && nvm use 24`.
MCP server is not available after claude install
Verify the .mcp.json file was created in your project root and contains the swarmvault entry. If not, run `swarmvault install --agent claude --mcp` again from your project directory.
Graph operations are slow or the compile step times out
Use the --max-tokens flag to limit compilation scope. For large repos, ingest incrementally with `swarmvault source add <path>` and run `swarmvault compile` on subsets.
Frequently Asked Questions about Swarmvault
What is Swarmvault?
Swarmvault is a Model Context Protocol (MCP) server that local-first llm wiki: open-source knowledge graph builder, rag knowledge base, and agent memory store. built on andrej karpathy's pattern. an obsidian alternative for personal knowledge management, ai second brain, and durable claude code / codex It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Swarmvault?
Follow the installation instructions on the Swarmvault GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Swarmvault?
Swarmvault works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Swarmvault free to use?
Yes, Swarmvault is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Swarmvault Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Swarmvault? 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 Swarmvault 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 Swarmvault?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.