Install in 2 minutes
One command installs the MCP server and connects it to your AI editor. No config files to write, no API keys needed.
Run the setup command
This installs the MCP server and connects it to your AI editor in one command. It auto-detects Claude Code, Cursor, and Windsurf.
npx context-vault setupSetup will:
- Install the context-vault npm package globally
- Detect your AI client and write the MCP config to the correct location
- Install the agent rules file (optional, recommended)
- Print every file path it creates or modifies
Use --dry-run to preview without writing, --no-rules to skip agent rules.
Restart your AI editor
MCP connections are established on editor startup. Restart Claude Code, Cursor, or Windsurf after setup completes.
After restart, your AI editor will connect to the context-vault MCP server automatically. You can verify the connection by asking your AI:
What MCP tools do you have available?You should see get_context, save_context, and list_context in the response.
Save your first entry
Ask your AI to save something to the vault. It'll use the save_context MCP tool automatically.
Save this decision to the vault: we're using SQLite for local storage because it requires no infra and the data stays on the machine. Tag it as architecture.Your AI will call save_context with the title, body, tags, and kind. The entry is saved as a markdown file in your vault folder and indexed in a local SQLite database.
Retrieve it in a new session
Start a new AI session and ask about the thing you saved. It retrieves from the vault automatically.
What database are we using and why?The agent rules file (installed in step 1) teaches your AI to search the vault before answering questions about architecture, decisions, or past work. It will call get_context and surface the entry you saved.
Config paths by client
Setup writes the MCP config automatically. Here are the exact paths for reference or manual setup.
Claude Code
~/.claude/mcp.jsonAgent rules are installed to ~/.claude/rules/context-vault.md
Cursor
.cursor/mcp.json (project) or ~/.cursor/mcp.json (global)Agent rules are appended to .cursorrules in your project root.
Windsurf
~/.codeium/windsurf/mcp_config.jsonAgent rules are appended to .windsurfrules in your project root.
Agent-assisted setup (optional)
After the CLI setup, run this in your AI session for conflict detection, project-aware bucket configuration, and rule merging:
/vault setupThe agent verifies the MCP connection, scans existing rules for conflicts, detects active projects, and configures vault buckets. It shows everything before writing and never modifies user-written files.