OpenContext
A personal context store for AI agents and assistants—reuse your existing coding agent CLI (Codex/Claude/OpenCode) with built‑in Skills/tools and a desktop GUI to capture, search, and reuse project knowledge across agents and repos.
What is OpenContext?
OpenContext is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to personal context store for ai agents and assistants—reuse your existing coding agent cli (codex/claude/opencode) with built‑in skills/tools and a desktop gui to capture, search, and reuse project know...
A personal context store for AI agents and assistants—reuse your existing coding agent CLI (Codex/Claude/OpenCode) with built‑in Skills/tools and a desktop GUI to capture, search, and reuse project knowledge across agents and repos.
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A personal context store for AI agents and assistants—reuse
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx opencontextConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use OpenContext
OpenContext is a personal context store and knowledge management tool for AI coding agents that works alongside Claude Code, Cursor, and OpenAI Codex. It captures project documentation, architectural decisions, and reusable knowledge snippets, then makes them searchable and injectable into agent sessions through MCP tools and slash commands. Developers use it to avoid re-explaining project context in every conversation and to share knowledge across multiple agents and repositories.
Prerequisites
- Node.js 18 or higher installed
- npm 9 or higher for global package installation
- An MCP client such as Claude Code CLI, Cursor, or Codex CLI
- No external API keys required
Install the OpenContext CLI globally
Install the @aicontextlab/cli package globally via npm to get the 'oc' command available system-wide.
npm install -g @aicontextlab/cliInitialize OpenContext in your project
Run 'oc init' from your project directory. This detects installed coding agents (Claude Code, Cursor, Codex) and writes MCP configuration and slash command files for each.
cd your-project
oc init
# Non-interactive install for specific tools:
oc init --tools cursor,claudeCreate a context folder and add documentation
Organize your project knowledge into folders. Each folder can hold Markdown documents describing architecture, APIs, conventions, or any reusable context.
oc folder create architecture -d "System architecture decisions"
oc doc create architecture api-design.md -d "REST API design patterns"Start the MCP server
Launch the OpenContext MCP server so your coding agents can query the context store through the standard MCP protocol.
oc mcpSearch your knowledge base
Use the CLI search command to find relevant documentation before a coding session, or let the AI agent call the MCP search tool automatically.
oc search "authentication flow"(Optional) Launch the web UI
Open the local desktop GUI to browse, create, and edit context documents visually.
oc uiOpenContext Examples
Client configuration
MCP configuration entry written by 'oc init' for Claude Code (~/.claude/mcp.json).
{
"mcpServers": {
"opencontext": {
"command": "npx",
"args": ["opencontext"],
"env": {}
}
}
}Prompts to try
Use these slash commands and prompts inside Claude Code or Cursor once OpenContext is configured.
- "/opencontext-context" — load all relevant project background before starting a task
- "/opencontext-search authentication" — find docs related to authentication in this project
- "/opencontext-create" — create a new context document capturing what you just learned
- "/opencontext-iterate" — persist new knowledge from this conversation into the context store
- "Search OpenContext for our database schema conventions and apply them to this new migration"Troubleshooting OpenContext
'oc' command not found after global npm install
Run 'npm bin -g' to find where global binaries are installed, and add that directory to your PATH. On macOS with nvm this is typically ~/.nvm/versions/node/<version>/bin.
Slash commands do not appear in Claude Code after oc init
Verify that the commands were written to ~/.claude/commands/ by running 'ls ~/.claude/commands/'. If the directory is empty, re-run 'oc init --tools claude' from your project directory. Restart Claude Code to reload commands.
MCP server fails to start with port already in use error
Find and stop the existing process using the port: 'lsof -i :<port> | grep LISTEN' then 'kill <PID>'. Or configure OpenContext to use a different port if the option is available in your version.
Frequently Asked Questions about OpenContext
What is OpenContext?
OpenContext is a Model Context Protocol (MCP) server that personal context store for ai agents and assistants—reuse your existing coding agent cli (codex/claude/opencode) with built‑in skills/tools and a desktop gui to capture, search, and reuse project knowledge across agents and repos. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install OpenContext?
Follow the installation instructions on the OpenContext GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with OpenContext?
OpenContext works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is OpenContext free to use?
Yes, OpenContext is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
OpenContext Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to OpenContext? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up OpenContext in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use OpenContext?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.