How It Works
The Problem
Every conversation starts from scratch. You repeat your preferences, your team's processes, your project context. Built-in memory features are locked to one provider and opaque — you can't see or control what's stored.
The Solution
ctx4 is an MCP server that gives your AI persistent, structured context stored in a GitHub repo you control. Connect Claude, ChatGPT, or any MCP client — your context follows you everywhere.
How the Flow Works
You connect your MCP client
Add the ctx4 MCP URL to Claude, ChatGPT, or any MCP client
AI loads your context
The AI calls ctx_instructions to read your full context: who you are, what you know, what skills you've taught it
You have a conversation
The AI works with your full context loaded
AI saves what matters
During the conversation, the AI saves relevant preferences, learnings, and knowledge via ctx_bash
Auto-syncs to GitHub
Changes are committed and pushed to your repo automatically
Next conversation picks up where you left off
Any client, any time. Your context is always there.
What Gets Stored
Everything lives in a GitHub repo you own. That means you can inspect any file, download your data, upload changes manually, or reorganize things however you like. Your context is just files in a repo — no lock-in, no black box.
The structure is flexible. The AI has full control and can create folders, add files, and evolve your context as you use it. Our template suggests a starting point:
your-context-repo/
├── resources/ # Loaded every conversation (instructions, who you are)
├── skills/ # Reusable workflows (invoked on demand)
└── knowledge/ # Memories, notes, reference materialYou can stick with this or change it. The AI adapts to whatever structure you choose.
How It's Built
ctx4 is open source. It's an MCP server that sits between your AI client (Claude, ChatGPT, etc.) and your GitHub repo. When you chat, it receives requests via MCP, reads and writes your context in an isolated sandbox, and syncs everything to GitHub. Each user gets their own sandbox — your data stays yours. Changes are committed and pushed automatically, so your repo is always up to date.
Ready to try it?
Get Started