ai-setup 5 min read

ContextForge – Persistent Memory for Claude, Cursor, Copilot

Stop re-explaining your project to Claude every session. ContextForge adds persistent memory to Claude Code, Cursor and Copilot via MCP.

By
Share: X in
ContextForge product thumbnail

TL;DR

TL;DR: ContextForge is a free MCP server that gives Claude, Cursor, and Copilot persistent memory across sessions — so your AI coding assistant remembers your project context, decisions, and patterns without you re-explaining them every time.

Source and Accuracy Notes

⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.

What Is ContextForge?

Every time you start a new Claude Code session, open Cursor, or use Copilot, the conversation begins from scratch. ContextForge solves this by running a local MCP server that stores your project knowledge and surfaces it to any connected AI tool.

The core idea: instead of stuffing a CLAUDE.md that goes stale, you maintain a living knowledge base that persists across sessions and is automatically consulted by your AI tools.

Three Resource Types

ContextForge organizes memory into three types:

  1. Knowledge — notes, documentation, architectural decisions, code patterns. The stuff you want Claude to know without re-explaining.
  2. GitHub — commits and pull requests. Gives the AI access to your actual code history.
  3. Tasks — tracking items and tasks. Keeps task state persistent across sessions.

Key Features

  • Spaces — personal knowledge bases within ContextForge. Group related knowledge together.
  • Skills — reusable prompts that encode recurring workflows
  • Routines — multi-step processes the AI can execute consistently
  • Semantic Search — finds relevant knowledge using vector similarity
  • Git Integration — connects to GitHub for commit and PR context
  • Project Linking — links multiple AI tools to the same project context
  • Session Presence — knows which tools are active in a project

Setup Workflow

Prerequisites

  • Node.js 18 or higher
  • One of: Claude Desktop, Claude Code, Cursor IDE, Windsurf, or ChatGPT

Step 1: Install ContextForge MCP

On macOS or Linux:

npm install -g contextforge-mcp

On Windows (PowerShell as Administrator):

npm install -g contextforge-mcp

Step 2: Run the Setup Wizard

npx contextforge-setup

The wizard guides you through account creation and MCP configuration.

Step 3: Connect to Claude Code

claude mcp add contextforge -s user -e CONTEXTFORGE_API_KEY=your_key -- npx -y contextforge-mcp

Step 4: Verify

claude mcp list

Or run:

npx contextforge-setup --verify

Installing for Specific IDEs

The docs include specific guides for:

Deeper Analysis

Why “The Week Two Problem” Matters

ContextForge’s own blog frames this as “The Week Two Problem”: 60% of AI agent failures in week two are not the model’s fault — the AI has simply forgotten what it knew in week one. A longer conversation context window does not solve this; it just delays the inevitable reversion.

Persistent memory solves the architecture problem at the root: the context is externalized, not stuffed into a finite window.

How It Differs from CLAUDE.md

A CLAUDE.md file is a static document that:

  • Requires manual updates
  • Gets ignored when context window is saturated
  • Is tool-specific (only Claude Code reads it)

ContextForge’s knowledge base is:

  • Dynamically updated through the AI itself (“save this as knowledge”)
  • Queried via semantic search, not context stuffing
  • Tool-agnostic via the MCP protocol

The Free Tier

The product offers a free tier with a 3-minute setup. Pricing beyond that is not publicly listed — you’d need to sign up to see paid tier details.

Practical Evaluation Checklist

  • [ ] Installs via npm install -g contextforge-mcp without errors
  • [ ] npx contextforge-setup wizard completes account flow
  • [ ] claude mcp list shows contextforge as connected
  • [ ] Can save a knowledge note and have it recalled in a new session
  • [ ] Cursor IDE integration works after setup
  • [ ] Semantic search returns relevant results from saved knowledge

Security Notes

The contextforge.dev/docs/security page covers API key management and storage. For self-hosted or air-gapped environments, review the security documentation before using ContextForge with proprietary code.

FAQ

Q: Does this work with GitHub Copilot in VS Code? A: ContextForge targets Claude Code, Cursor, and Copilot via MCP. VS Code Copilot does not natively support the MCP protocol — you would need the Copilot Chat interface in IDEs that expose MCP.

Q: Is my code stored on ContextForge’s servers? A: The MCP server communicates with ContextForge’s cloud. Review their security docs for what data is transmitted and stored.

Q: How is this different from a shared CLAUDE.md? A: A CLAUDE.md is static text that competes for context window space. ContextForge’s knowledge is stored in a queryable database and retrieved semantically — it does not consume the conversation context directly.

Q: Can I self-host the MCP server? A: The primary distribution is via npm as a managed service. Self-hosting options are not documented in the public docs as of this writing.

Conclusion

ContextForge addresses the fundamental limitation of stateless AI coding sessions: every new conversation starts with a blank slate. By externalizing project knowledge into a persistent, queryable store and connecting it to your AI tools via MCP, it eliminates the “re-explain everything” tax.

The free tier and three-minute setup make it easy to try — if you use Claude Code, Cursor, or Copilot daily, the memory problem is real and this solves it directly. Start with npm install -g contextforge-mcp and npx contextforge-setup.