Sign inSign up

adityakarnam/open-context

By adityakarnam

Updated 7 months ago

Save your context, your way — AI platform, manage it locally, and export.

Image
Machine learning & AI
0

387

adityakarnam/open-context repository overview

open-context

Portable AI context — import, manage, and export your conversation history across every AI platform.

open-context lets you migrate your full chat history from ChatGPT or Gemini into Claude-compatible formats, and gives Claude persistent memory through a built-in MCP server. This single Docker image bundles the React web UI, REST API server, and MCP server together.


What is open-context?

When you switch AI assistants, you lose everything — your communication style, your background, your conversation history. open-context solves that by:

  1. Importing your chat history from ChatGPT (Gemini support coming)
  2. Analyzing your patterns with a local LLM (Ollama) to generate preferences and memory
  3. Exporting to Claude, ChatGPT custom instructions, or Gemini formats
  4. Persisting new context across every Claude conversation via an MCP server

Everything runs locally. Your data never leaves your machine.


How to use this image

Quick start — web UI + REST API
docker run -p 3000:3000 \
  -v open-context-data:/root/.opencontext \
  adityakarnam/open-context:latest

Open http://localhost:3000.

docker run -p 3000:3000 \
  -v open-context-data:/root/.opencontext \
  adityakarnam/open-context:0.0.1
MCP server (stdio mode for Claude Code / Claude Desktop)

Override the default command to run the MCP server instead:

docker run -i --rm \
  -v open-context-data:/root/.opencontext \
  adityakarnam/open-context:latest \
  node dist/mcp/index.js
Connect to Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "open-context": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "open-context-data:/root/.opencontext",
        "adityakarnam/open-context:latest",
        "node", "dist/mcp/index.js"
      ]
    }
  }
}
Connect to Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "open-context": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "open-context-data:/root/.opencontext",
        "adityakarnam/open-context:latest",
        "node", "dist/mcp/index.js"
      ]
    }
  }
}
With docker compose
services:
  open-context:
    image: adityakarnam/open-context:latest
    ports:
      - "3000:3000"
    volumes:
      - open-context-data:/root/.opencontext

volumes:
  open-context-data:

Persistent storage

All data is stored in the mounted volume at /root/.opencontext — no browser localStorage is used.

FileDescription
preferences.jsonYour structured preferences (used by the UI form)
preferences.mdClaude preferences doc — paste into Claude Settings → Preferences
memory.mdClaude memory doc — paste into Claude → Manage Memory
contexts.jsonMCP context entries saved by Claude

Environment variables

VariableDefaultDescription
PORT3000HTTP server port
OLLAMA_HOSThttp://host.docker.internal:11434Ollama endpoint for AI analysis
OLLAMA_MODELgpt-oss:20bModel used for preference analysis
OPENCONTEXT_STORE_PATH/root/.opencontext/contexts.jsonMCP context store path

host.docker.internal resolves to the host machine from inside the container. On Linux, add --add-host=host.docker.internal:host-gateway.


MCP tools

Once connected, Claude gains these persistent memory tools:

ToolWhat it does
save_contextSave a note or memory with optional tags
recall_contextFull-text search across saved contexts
list_contextsList all contexts, optionally filtered by tag
search_contextsMulti-keyword AND search
update_contextUpdate content or tags of a saved context
delete_contextRemove a context by ID
create_bubbleCreate a project workspace (bubble)
list_bubblesList all bubbles
get_bubbleGet a bubble and its contexts
update_bubbleRename or update a bubble
delete_bubbleDelete a bubble and optionally its contexts

Image variants

TagDescription
0.0.1, latestCurrent stable release — UI + API + MCP on node:25-slim

License

MIT — github.com/adityak74/open-context

Tag summary

Content type

Image

Digest

sha256:f4155c02b

Size

82.6 MB

Last updated

7 months ago

docker pull adityakarnam/open-context