Setup

Setup guides

Choose how you want to use ctxvault. Each integration takes under 5 minutes.

New to ctxvault? Start with ChatGPT

The easiest way to try ctxvault --- create a Custom GPT with persistent memory in 5 minutes. No terminal or coding needed. Jump to ChatGPT setup ↓

ChatGPT Custom GPT

Create a custom GPT that automatically stores and recalls memories using ctxvault. Works with ChatGPT Plus, Team, and Enterprise.

Quick setup --- copy these two things

That's all you need to set up your Custom GPT

GPT Instructions

Paste into the Instructions field

OpenAPI Schema URL

https://api.ctxvault.dev/openapi.yaml

1

Get your API Key

Sign up for ctxvault if you haven't already. You'll verify your email via a magic link, then you'll be shown an API key once (starts with cv_) and a project slug.

2

Create a new GPT

Go to chat.openai.com Explore GPTs Create. Switch to the Configure tab.

3

Set the GPT Name and Instructions

Name your GPT something like "My Project Assistant". Paste the following into the Instructions box:

GPT Instructions
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
4

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:

OpenAPI Schema URL

https://api.ctxvault.dev/openapi.yaml

Or copy the full schema from the docs page

Alternatively, paste the raw YAML from the openapi.yaml file in the ctxvault repository.

5

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
6

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.

1

Get your API Key

Sign up for ctxvault to get your API key and project slug (API key is shown once after email verification).

2

Run the one-command setup (recommended)

terminal
npx ctxvault-mcp@latest setup claude-desktop
3

Manual config (if you prefer)

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:

claude_desktop_config.json
{
  "mcpServers": {
    "ctxvault": {
      "command": "npx",
      "args": ["ctxvault-mcp@latest"],
      "env": {
        "CTXVAULT_API_KEY": "cv_your_api_key_here",
        "CTXVAULT_PROJECT": "your-project-slug",
        "CTXVAULT_BASE_URL": "https://ctxvault.dev"
      }
    }
  }
}
4

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 ctxvault memory + project/account tools:

ctxvault_remember

Store a decision, convention, pattern, or lesson

ctxvault_recall

Search memory for relevant past context

ctxvault_context

Generate a full context pack for a topic

ctxvault_list

List all memory items with optional filters

ctxvault_whoami

Show API key identity, role, scope, and project access

ctxvault_projects

List projects accessible by the current API key

ctxvault_project_current

Show active session project and cloud default project

ctxvault_project_use

Switch active project and optionally sync cloud default

5

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

Claude Chat & ChatGPT (Remote MCP Connector)

Use ctxvault directly inside chat products via a remote MCP server + OAuth. No terminal setup. No copying API keys into the chat app.

1

Add a Remote MCP Connector

In your chat product's Connectors/Integrations settings, add a new MCP connector with this URL:

MCP URL
https://mcp.ctxvault.dev/mcp
2

Sign in and Approve

You'll be redirected to ctxvault to sign in (magic link) and approve access. After approval, ctxvault issues a dedicated API key for the connector behind the scenes.

3

Verify It--™s Live

If the connector setup fails, confirm these URLs are reachable:

Discovery URLs
https://mcp.ctxvault.dev/.well-known/oauth-protected-resource
https://api.ctxvault.dev/.well-known/oauth-authorization-server

Cursor IDE

Add ctxvault as an MCP server in Cursor for persistent memory in your coding sessions.

1

Get your API Key

Sign up for ctxvault to get your API key and project slug.

2

Run the one-command setup (recommended)

terminal
npx ctxvault-mcp@latest setup cursor
3

Manual config (if you prefer)

Open Cursor Settings → MCP Servers Add new MCP Server.

Or add it manually to your .cursor/mcp.json file:

.cursor/mcp.json
{
  "mcpServers": {
    "ctxvault": {
      "command": "npx",
      "args": ["ctxvault-mcp@latest"],
      "env": {
        "CTXVAULT_API_KEY": "cv_your_api_key_here",
        "CTXVAULT_PROJECT": "your-project-slug",
        "CTXVAULT_BASE_URL": "https://ctxvault.dev"
      }
    }
  }
}
4

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.


One-Command MCP Setup

The fastest way to connect ctxvault to Codex, Claude, Cursor, or all of them. Setup supports both API-key configuration and interactive magic-link login.

1

Run the setup command

terminal
npx ctxvault-mcp@latest setup

Tip: If you don't have an API key yet, type open at the prompt to open the signup page.

It will ask which assistant(s) to configure. Choose all to set up Codex + Claude Code + Claude Desktop + Cursor in one run.

2

Target a specific app (optional)

terminal
# Codex
npx ctxvault-mcp@latest setup codex

# Claude Code (CLI)
npx ctxvault-mcp@latest setup claude-code

# Claude Desktop
npx ctxvault-mcp@latest setup claude-desktop

# Cursor
npx ctxvault-mcp@latest setup cursor
3

Magic-link login (no API key paste)

terminal
npx ctxvault-mcp@latest login
npx ctxvault-mcp@latest projects
npx ctxvault-mcp@latest use your-project --sync-default
npx ctxvault-mcp@latest sync

Login stores local auth/session state in ~/.config/ctxvault/mcp.json and MCP can use it automatically.

4

Verify it worked

terminal
# Codex
codex mcp list

# Claude Code
claude mcp list

For Cursor, if the CLI install is flaky on your machine, the setup command writes .cursor/mcp.json in the current repo and adds .cursor/ to .gitignore so secrets aren't committed.

5

What this changes on your machine

The setup command does not upload your API key anywhere. It only writes local MCP client configuration so your assistant can launch npx ctxvault-mcp with three environment variables:

env
CTXVAULT_API_KEY=cv_...
CTXVAULT_SESSION=cvs_...
CTXVAULT_PROJECT=your-project
CTXVAULT_BASE_URL=https://ctxvault.dev

You can remove it anytime with codex mcp remove ctxvault or claude mcp remove -s user ctxvault.


Python & Node.js SDKs

Integrate ctxvault directly into your application code for maximum control over when and what to remember.

1

Install

Python
pip install ctxvault-sdk
Node.js
npm install ctxvault
2

Use it

app.py
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 prompt
app.js
const { 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 prompt

Need help?

Check the API Documentation or open an issue on GitHub.