Every conversation with Claude starts from zero. It doesn't remember the stack you chose last week, the naming conventions you prefer, or the bug you spent three hours debugging yesterday. You explain the same context over and over — and it forgets all of it the moment the session ends.
What if it didn't have to be that way?
With the Model Context Protocol (MCP) and a free tool called ContextForge, you can give Claude persistent memory that survives across sessions. In this tutorial, you'll set it up in under five minutes.
What Is MCP?
The Model Context Protocol is an open standard created by Anthropic that lets AI assistants like Claude connect to external tools and data sources. Think of it as a USB port for AI — it's a universal interface that any tool can plug into.
Without MCP, Claude can only work with what you paste into the conversation. With MCP, Claude can read files, query databases, call APIs, and — most importantly for us — save and retrieve memories from a persistent store.
MCP servers run locally on your machine. Claude communicates with them through a standard protocol, and they handle the actual work of storing data, calling APIs, or whatever the server is designed to do. No data leaves your machine unless the MCP server explicitly sends it somewhere — and ContextForge encrypts everything in transit.
What You'll Need
- Node.js 18+ installed on your machine
- Claude Desktop or Claude Code (the CLI)
- A free ContextForge account (we'll create one in Step 1)
That's it. No Docker, no database setup, no infrastructure to manage.
Step 1: Create Your Free Account
Head to contextforge.dev and sign up with Google. It takes about ten seconds.
Once you're in the dashboard, navigate to Settings → API Keys and click Generate New Key. Copy the key — you'll need it in the next step.
The free tier includes 200 documents, 500 queries per month, and 3 spaces. That's more than enough to get started and see real value.
Step 2: Install the MCP Server
Open your terminal and install the ContextForge MCP server globally:
npm install -g contextforge-mcp
Verify the installation:
contextforge-mcp --version
Now set your API key as an environment variable. Add this line to your shell profile (~/.zshrc, ~/.bashrc, or equivalent):
export CONTEXTFORGE_API_KEY="your-api-key-here"
Then reload your shell: source ~/.zshrc
Step 3: Connect to Claude
This is where MCP connects to Claude. Choose the path that matches how you use Claude.
Option A: Claude Code (CLI) — Fastest
If you use Claude Code, run this single command:
claude mcp add contextforge -- contextforge-mcp
Verify the connection:
claude mcp list
# Expected output: contextforge: ✓ Connected
Done. Claude Code now has access to your persistent memory.
Option B: Claude Desktop
For Claude Desktop, you need to edit a JSON configuration file. The file location depends on your operating system.
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
Open the file (create it if it doesn't exist) and add the ContextForge server:
{
"mcpServers": {
"contextforge": {
"command": "contextforge-mcp",
"env": {
"CONTEXTFORGE_API_KEY": "your-api-key-here"
}
}
}
}
Save the file and restart Claude Desktop. You should see ContextForge listed in the MCP tools panel.
Step 4: Save Your First Memory
Now for the fun part. Open a new conversation with Claude and try saving some context about your project:
You: "Remember that our project uses PostgreSQL 16, Next.js 15
with the App Router, and we deploy to Vercel. Our API
prefix is /api/v2 and we use snake_case for database columns."
Claude will use the ContextForge MCP tools to store this as a knowledge item. You can also be more specific:
You: "Save this debugging note: the checkout flow breaks when
the cart has more than 50 items because the payment API
has a line-item limit of 50. The workaround is to batch
into multiple payment intents."
Each piece of knowledge is stored with semantic embeddings, which means Claude can find it later using natural language — not just exact keyword matches.
Step 5: Retrieve It Later
Close the conversation. Open a brand new one. Now ask Claude something that requires the context you saved:
You: "What database do we use and what's our column naming convention?"
Claude will search your ContextForge memory and respond with the exact details you saved — PostgreSQL 16, snake_case columns — even though this is a completely new session.
Try another one:
You: "Is there a known issue with large carts in checkout?"
Claude finds the debugging note you saved earlier and gives you the full context, including the workaround. No more repeating yourself.
What Else Can You Do?
Persistent memory is just the beginning. ContextForge gives Claude a full suite of tools to stay organized across sessions:
- Spaces — Organize knowledge into separate containers (one per project, team, or topic)
- Projects — Group related spaces together and share them with collaborators
- Git sync — Connect a GitHub repo and auto-ingest commits and PRs as searchable knowledge
- Tasks — Track issues and to-dos that persist between sessions
- Snapshots — Create point-in-time backups of your knowledge base
- Team sharing — Invite collaborators to your projects so the whole team benefits from shared context
The Free Tier Is Enough to Start
ContextForge's free plan is generous enough for personal projects and small teams:
- 200 documents stored
- 500 queries per month
- 3 spaces for organization
- Semantic search included
If you outgrow the free tier, paid plans start at $8/month and unlock more storage, spaces, git sync, and team collaboration features.
Start Building with Persistent Memory
You now have a Claude that remembers. Every architectural decision, every debugging insight, every team convention — saved once and available forever.
Here's what to do next:
- Create your free account
- Read the full documentation
- Start saving the context that matters most to your workflow
The best time to give Claude memory was when you started your project. The second best time is right now.
Top comments (0)