Open source. MIT. Version 4

Your next session.
Already in context.

Context Vault gives Claude Code, Cursor, and Codex a memory that outlasts the chat. Your agent saves decisions as markdown and finds them again next time.

npx context-vault setup

Free locally / No account / Read the docs

my-api · new session · no chat history

Three days later. New editor, empty chat.

Add the logout endpoint.

get_contextquery: "auth logout refresh tokens" 1 match, decisions/jwt-with-rotating-refresh-tokens

There is no sessions table, so logout has to revoke the refresh token chain. That follows the decision saved on Monday.

  • editsrc/routes/logout.ts+22 -0
  • editsrc/auth/refresh.ts+9 -1

Illustrative session with made-up project details. The tools, the file layout and the frontmatter are the real ones.

Connects to
  • Claude Codesetup
  • Cursorsetup
  • Windsurfsetup
  • Codexmanual entry

How it works

One setup.
Then it runs on its own.

  1. Connect your editors

    One command finds the clients on your machine and adds the MCP entry to each. Codex needs the entry pasted by hand. Then add the agent rules file so the agent knows when to search and save.

    $ context-vault setup
      claude-code  cursor  windsurf
      MCP entry written
      codex: add the entry by hand
    
    Illustrative output
  2. Your agent saves what matters

    With the rules in place, the agent calls save_context when it makes a decision or learns a convention. Each call writes one markdown file. You type nothing.

    > save_context
      kind    decision
      tags    auth, api
      saved   decisions/jwt-with-rotating…
    
    Illustrative output
  3. The next session starts informed

    Before it asks you again, the agent calls get_context. The match comes back as text, in the same editor or a different one.

    > get_context "auth logout"
      1 match  decisions/jwt-with-rotating…
      Logout must revoke the refresh
      token chain. No sessions table.
    
    Illustrative output

What is on disk

It is just a folder.
Read it like one.

The vault is a directory of markdown files with a small index beside it. A local background process, shared by your agent sessions, reads and writes it. There is no cloud service in the loop, and if you uninstall, the files stay.

~/.vault
decisions/jwt-with-rotating-refresh-tokens-n6r7qf4x.md
---
id: 01JX4M8Q2T9KZ3V7B5N6R7QF4X
title: JWT with rotating refresh tokens
kind: decision
tags: ["auth", "api"]
source: claude-code
created: 2026-09-28T09:14:07Z
---

Access tokens last 15 minutes.
Refresh tokens rotate on use.
No sessions table. Logout revokes
the whole chain.
the MCP entry your client holds
{
  "mcpServers": {
    "context-vault": {
      "command": "context-vault",
      "args": ["mcp"]
    }
  }
}
  • get_contextSearch the vault, full-text and semantic
  • save_contextWrite or update an entry
  • list_contextBrowse by kind, tag, or date
  • session_endSave a summary of the session

Example vault with made-up entries. File layout, frontmatter fields, config and tool names match version 4.

LICENSE

MIT, no limits locally

The engine and the local vault are open source. No account, no entry cap.

Read the license
STORAGE

Plain markdown on disk

Each memory is one file in ~/.vault. Open it, edit it, commit it.

See the paths
SEARCH

Full-text plus embeddings

Hybrid search over a local index. The embedding model runs on your machine.

Read the docs
PROTOCOL

A standard MCP server

Setup writes the config for Claude Code, Cursor, and Windsurf. Codex takes one pasted entry.

Connect a client

Plans

Local is free.
Sync is $9 a month.

LOCALFree

The full vault on your machine. MIT licensed, no account, no entry limits.

PRO$9/month

The same vault synced across machines, a web dashboard, 50K hosted entries, and 10 GB.

Compare plans

Questions

Good questions.
Straight answers.

Go deeper in the docs
What does Context Vault actually remember?

The context your agent saves: architecture decisions, working patterns, useful references, and session notes. You can inspect and edit the entries as plain markdown files.

Does my context leave my computer?

With the local vault, entries, search and the embedding model all stay on your machine. Hosted mode is an optional, separate service for accessing your vault across devices.

Which AI tools can I use?

Context Vault connects through the Model Context Protocol (MCP). The setup guide covers Claude Code, Cursor, and Windsurf, with configuration options for other MCP-compatible clients.

Is the local vault really free?

Yes. The local vault is open source under the MIT license, with no account required and no entry limits. Optional hosted plans are available when you need a web dashboard and access across machines.

Stop re-explaining
your own project.

npx context-vault setup

Field notes

From the blog