Setup Guides
Choose how you want to use CtxVault. Each integration takes under 5 minutes.
ChatGPT Custom GPT
Create a custom GPT that automatically stores and recalls memories using CtxVault. Works with ChatGPT Plus, Team, and Enterprise.
Get your API Key
Sign up for CtxVault if you haven't already. You'll get an API key (starts with cv_) and a project slug.
Create a new GPT
Go to chat.openai.com → Explore GPTs → Create. Switch to the Configure tab.
Set the GPT Name and Instructions
Name your GPT something like "My Project Assistant". Paste the following into the Instructions box:
You are a project assistant with persistent memory powered by CtxVault. ## MEMORY PROTOCOL ### Auto-Store (use the "pushMemory" action) Automatically store memories when you: - Make or discuss an important DECISION (type: "decision") - Establish a CONVENTION or coding standard (type: "convention") - Discover a reusable PATTERN (type: "pattern") - Learn a LESSON from a mistake or debugging (type: "lesson") - Write a useful code SNIPPET (type: "snippet") - Reference external docs or URLs (type: "reference") For each memory, choose a clear title and detailed content. Set importance 1-10 (default 5, use 8+ for critical decisions). Add relevant tags for categorization. ### Auto-Recall (use the "searchMemory" action) Search memory when: - The user starts a new topic or asks about a past decision - You need to check if a convention already exists - The user asks "what did we decide about X?" - You're about to make a decision that might contradict a past one ### Context Packs (use the "generateContextPack" action) Generate a full context pack when: - Starting a new conversation or session - The user says "catch me up" or "what do you know about X?" - Working on a complex topic that may have multiple related memories ## BEHAVIOR - When recalling memories, cite them naturally: "Based on our previous decision..." - Don't store trivial chat messages — only meaningful decisions, patterns, and learnings - If you find conflicting memories, flag them to the user - Proactively store important decisions without being asked - At the start of each conversation, recall context for the topic being discussed
Add the Actions (API)
In the Actions section, click Create new action. Set the Authentication to:
- Type: API Key
- API Key:
cv_your_api_key_here - Auth Type: Bearer
Then paste the following OpenAPI schema into the Schema box:
Alternatively, paste the raw YAML from the openapi.yaml file in the CtxVault repository.
Test it
Save your GPT and start chatting. Try these prompts:
"We decided to use PostgreSQL for the database. Remember this." → GPT will call pushMemory automatically "What database did we choose?" → GPT will call searchMemory and cite the decision "Catch me up on the project" → GPT will call generateContextPack for a full briefing
Share with your team
Publish your GPT as Anyone with the link or Only people in your workspace. Create additional API keys with different roles (READER for devs, ADMIN for leads) from the API Keys dashboard.
Claude Desktop (MCP Server)
Use the CtxVault MCP Server to give Claude Desktop native persistent memory tools. Claude will automatically store and recall memories using built-in tool calls.
Get your API Key
Sign up for CtxVault to get your API key and project slug.
Install the MCP Server
# Option A: Install from npm (recommended) npm install -g @ctxvault/mcp-server # Option B: Clone and install locally git clone https://github.com/ctxvault/ctxvault.git cd ctxvault/mcp-server npm install
Configure Claude Desktop
Open your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the CtxVault MCP server:
{
"mcpServers": {
"ctxvault": {
"command": "npx",
"args": ["@ctxvault/mcp-server"],
"env": {
"CTXVAULT_API_KEY": "cv_your_api_key_here",
"CTXVAULT_PROJECT": "your-project-slug",
"CTXVAULT_BASE_URL": "https://api.ctxvault.dev"
}
}
}
}Restart Claude Desktop
Quit and reopen Claude Desktop. You should see a hammer icon in the bottom-left of the chat input, indicating MCP tools are available. Click it to see the 4 CtxVault tools:
ctxvault_rememberStore a decision, convention, pattern, or lesson
ctxvault_recallSearch memory for relevant past context
ctxvault_contextGenerate a full context pack for a topic
ctxvault_listList all memory items with optional filters
Start using it
Claude will automatically use the memory tools during conversations. Try:
"Remember that we chose React with TypeScript for the frontend" → Claude calls ctxvault_remember "What tech stack decisions have we made?" → Claude calls ctxvault_recall "Give me full context on our authentication approach" → Claude calls ctxvault_context
Cursor IDE
Add CtxVault as an MCP server in Cursor for persistent memory in your coding sessions.
Get your API Key
Sign up for CtxVault to get your API key and project slug.
Add MCP Server in Cursor
Open Cursor Settings → MCP Servers → Add new MCP Server.
Or add it manually to your .cursor/mcp.json file:
{
"mcpServers": {
"ctxvault": {
"command": "npx",
"args": ["@ctxvault/mcp-server"],
"env": {
"CTXVAULT_API_KEY": "cv_your_api_key_here",
"CTXVAULT_PROJECT": "your-project-slug",
"CTXVAULT_BASE_URL": "https://api.ctxvault.dev"
}
}
}
}Use in Composer
In Cursor's Composer (Cmd+I / Ctrl+I), the AI will automatically have access to the CtxVault tools. Ask it to remember decisions or recall past context while coding.
Python & Node.js SDKs
Integrate CtxVault directly into your application code for maximum control over when and what to remember.
Install
pip install ctxvault
npm install ctxvault
Use it
from ctxvault import CtxVault
cv = CtxVault(
api_key="cv_your_key",
project="my-project"
)
# Store a decision
cv.push([{
"type": "decision",
"title": "Use PostgreSQL",
"content": "Chose PostgreSQL with pgvector.",
"importance": 8,
"tags": ["database"]
}])
# Search memory
results = cv.search("database choice")
# Get a context pack for LLM injection
pack = cv.context("authentication approach")
print(pack["pack"]) # Ready for system promptconst { CtxVault } = require("ctxvault");
const cv = new CtxVault({
apiKey: "cv_your_key",
project: "my-project"
});
// Store a decision
await cv.push([{
type: "decision",
title: "Use PostgreSQL",
content: "Chose PostgreSQL with pgvector.",
importance: 8,
tags: ["database"]
}]);
// Search memory
const results = await cv.search("database choice");
// Get a context pack for LLM injection
const pack = await cv.context("authentication approach");
console.log(pack.pack); // Ready for system promptNeed help?
Check the API Documentation or open an issue on GitHub.