Swarmvault

v1.0.0Knowledge & Memorystable

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

agent-memoryai-agentsclaude-codeclaude-code-memorycodex
Share:
478
Stars
0
Downloads
0
Weekly
0/5

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

Local-first knowledge graph
RAG knowledge base
Claude Code memory store
swarmclawai

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx swarmvault

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 --version
2

Initialize 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-repo
3

Install 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 --hook
4

Configure 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 openai
5

Compile 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 --commit
6

Query 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.

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.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides