ai-setup 5 min read

open-context – AI Memory That Follows You Across Every Chat

open-context imports your ChatGPT history, analyzes your communication style via local Ollama AI, and gives Claude persistent memory through an MCP server. Open-source, MIT licensed.

By
Share: X in

TL;DR

TL;DR: open-context solves the context-loss problem when switching AI assistants — it imports your ChatGPT history, analyzes your communication style with local Ollama, and serves that context back to Claude (or any MCP-compatible model) via a persistent MCP server.

Source and Accuracy Notes

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

What Is open-context?

Every time you switch AI assistants — from ChatGPT to Claude, from Claude to Gemini — you start from scratch. Your communication style, your projects, your work context, all gone. open-context solves this by:

  1. Importing chat history from ChatGPT (Gemini support planned)
  2. Analyzing your patterns with a local Ollama instance to extract preferences and factual memory
  3. Exporting to Claude, ChatGPT, or Gemini format
  4. Serving that context via an MCP server so Claude can recall it automatically

The result: Claude knows who you are, how you communicate, and persists new context across every conversation — without you re-explaining yourself each time.

Setup Workflow

Prerequisites

  • Node.js 25 or higher
  • Optional: Ollama (for local AI analysis of your chat history)

Step 1: Install the MCP Server

npx opencontext@latest

Or install globally:

npm install -g open-context

Step 2: Get Your ChatGPT Export

OpenAI allows you to export your data at chatgpt.com → Settings → Export data. You will receive a ZIP file containing your conversation history.

Step 3: Import and Analyze

# Run the interactive setup
npx opencontext@latest

# Import your ChatGPT export ZIP
# open-context extracts your conversation history
# Ollama (if installed) analyzes your communication style and generates preferences

The tool creates:

  • preferences.md — AI-analyzed communication style ready for Claude’s settings
  • memory.md — factual context about you (job, technologies, projects)
  • conversations/ — all chats as readable markdown files

Step 4: Configure Claude to Use the MCP Server

# Add to your Claude config (claude_desktop_config.json or similar)
# The MCP server runs at http://localhost:3456 by default

Once connected, Claude can save and recall your context automatically across conversations.

Deeper Analysis

What Makes This Different

Most AI memory tools are cloud-based and vendor-locked. open-context is:

  • Local-first — your data stays on your machine
  • Portable — export to any AI platform format
  • Open-source — MIT license, auditable code
  • MCP-native — built for the Model Context Protocol standard

Architecture

ChatGPT Export (ZIP)

open-context (Node.js 25+)

  ┌────┴────┐
  ↓         ↓
Ollama     Markdown Files
(local AI)  ├─ preferences.md
            ├─ memory.md
            └─ conversations/

            MCP Server (:3456)

            Claude / any MCP client

The MCP server exposes your preferences and memory as tools that any compatible AI can call.

Practical Evaluation Checklist

  • Can import a ChatGPT export ZIP and parse conversations ✅
  • Runs without Ollama (skips AI analysis, still organizes chats) ✅
  • MCP server starts and responds to context queries ✅
  • Exports to Claude, ChatGPT, and Gemini formats ✅
  • MIT license — can be self-hosted commercially ✅
  • Node.js 25+ required (cutting-edge runtime) ⚠️

Security Notes

  • Chat history is processed locally — no data leaves your machine during import
  • Ollama runs inference entirely on-device if you choose to use it
  • The MCP server binds to localhost by default — not exposed externally
  • No telemetry or tracking in the open-source version

FAQ

Q: Does this work with Claude Code (CLI)? A: Yes — any tool that supports the MCP protocol can connect to the open-context MCP server, including Claude Code.

Q: Can I use this without ChatGPT? A: Yes. You can manually create the preferences.md and memory.md files and the MCP server will still serve them to connected AI assistants.

Q: What models does Ollama use for analysis? A: Any Ollama-supported model. The README recommends a general-purpose model for extracting communication patterns.

Q: How is this different from a simple clipboard paste into Claude? A: The MCP server makes context persistent and queryable across sessions. Claude can actively recall facts rather than relying on a single context window injection.

Conclusion

open-context fills a real gap in the AI assistant ecosystem: context portability. Rather than starting every new conversation by re-explaining your job, your projects, and your communication style, open-context makes that information persistent and queryable.

The MCP server approach is the right abstraction — it works with any MCP-compatible AI, not just Claude. For power users who bounce between models, or teams standardizing on a particular AI workflow, this is a genuinely useful piece of infrastructure.

Source: github.com/adityak74/opencontext — MIT licensed, main branch as of 2026-08-06.