Persistent, Project-Local Memory for AI Coding Agents
Coding agents forget decisions between sessions. OpenContext MCP exposes a lightweight Model Context Protocol server that enables AI agents to read and write durable .opencontext/ markdown rules.
.opencontext/ ├── architecture.md ├── api-contracts.md └── coding_rules.md
01# Architecture0203## Authentication0405We use **JWT with refresh tokens**.0607### Access Token08- 15-minute expiry09- Stored in memory only1011### Refresh Token12- 7-day expiry13- HttpOnly secure cookie14- Rotated on each use
Without vs. With OpenContext
AI agents are powerful — but only if they remember what matters.
Without Memory
Session context vanishes
Agents lose all memory of prior decisions, conventions, and architecture between sessions.
Architectural rules get broken
Without persistent rules, agents re-implement patterns that conflict with your codebase.
Agents re-ask conventions
"Should I use Zod or Yup?" — the same question, every session, no memory of past answers.
With OpenContext
Plain .md storage in your repo
Plain markdown files that persist across every session. Agents read before acting.
Zero cloud or account lock-in
Open any .opencontext/ file in your editor. Human-readable, machine-readable, no magic.
Team-wide alignment via Git
Commit shared rules to your repo, or .gitignore for private local context. Your choice.
Get Started in 3 Steps
Go from zero-install setup to a codebase with durable, searchable memory in one guided workflow.
Step 01
Add OpenContext to your MCP Client
Add the OpenContext MCP entry to your client configuration. No global install is required. Your client launches the server via npx over stdio.
Core command
["npx", "-y", "opencontext-mcp"]Config path
opencode.json / project MCP settings
Transport: stdio{
"mcp": {
"opencontext": {
"type": "local",
"command": ["npx", "-y", "opencontext-mcp"],
"enabled": true
}
}
}Frequently Asked Questions
Everything you need to know about OpenContext.