OpenContext MCPStop your coding agents from forgetting your architecture.
A Model Context Protocol (MCP) server that gives Cursor, OpenCode, and Claude persistent, project-local memory. Track architecture decisions in plain markdown with ADR-style frontmatter directly inside Git—no cloud, no vector hallucinations.
.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.
How OpenContext Compares
A technical breakdown of architecture trade-offs.
| Feature / Architecture | OpenContext | Massive .cursorrules | Vector RAG Plugins | Internal Agent Memory |
|---|---|---|---|---|
| Storage Layer | Local Markdown (.opencontext/) | Single giant config file | Cloud / Local Vector DB | Hidden session cache |
| Token Consumption | ~100 token index (on-demand) | Wastes tokens on every prompt | Varies (large raw chunks) | Unpredictable context bloat |
| Determinism & Edits | 100% deterministic (Git diffs) | Static only | Hallucinates outdated vectors | Stale / lost on restart |
| Git & PR Reviewable | Native commit history | Monolithic file only | Opaque external database | Ephemeral memory |
| Zero Cloud / Privacy | 100% Local (Stdio MCP) | Local file | Requires third-party APIs | Tied to vendor platform |
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.