Open Context
AI context management for codebases – enables Claude Code to read, search, and update project documentation via MCP.
README
Open Context
AI context management for codebases — let Claude Code read, search, and update your project documentation via MCP.
Open Context is a desktop app + remote MCP server that maintains structured context documents for your code modules. Developers connect Claude Code to their projects with a single command, and the system keeps documentation in sync through git hooks, AI analysis, and a human-in-the-loop review flow.
Screenshots
| Dashboard | Project Modules |
|---|---|
![]() |
![]() |
| Setup Claude Code | Context Review (Diff) |
|---|---|
![]() |
![]() |
| Team Management | Coverage |
|---|---|
![]() |
![]() |
| Full Context Document |
|---|
![]() |
How It Works
Developer pushes code
↓
Pre-push hook reads API key from ~/.claude.json
↓
Calls REST API (/api/context) to find affected modules
↓
Spawns Claude Code in background to analyze diffs
↓
Submits updated context via MCP (pending review)
↓
Admin reviews + approves in desktop app
↓
Claude Code reads fresh context next session
For Developers (No Desktop App Needed)
An admin generates an API key and sends you the setup command:
claude mcp add --transport http open-context https://open-context-mcp.vercel.app/mcp \
--header 'Authorization: Bearer oc_live_...'
This saves your API key to ~/.claude.json (local to your machine, never committed).
The project's .mcp.json (in git) has only the server URL — no secrets.
Claude Code can now access your project context via 6 MCP tools:
| Tool | Description |
|---|---|
resolve_project |
Find project by working directory or name |
get_project_context |
Get full context document (llms.txt format) |
list_modules |
List all modules with coverage status |
get_module_context |
Get context for a specific module |
search_context |
Search across all project contexts |
update_module_context |
Submit updated context (goes through review) |
For Admins (Desktop App)
The Electron app lets you:
- Manage projects — add projects, scan for modules, generate context
- Setup projects — writes
.mcp.json(URL only),CLAUDE.md, git hook +.open-context/scripts - Review AI updates — approve or reject context changes submitted via MCP
- Track staleness — see which modules are outdated based on git commits
- Manage team — create members, generate per-developer API keys, control per-project access
Architecture
┌─────────────────────────────────────────────┐
│ Electron Desktop App (Next.js UI) │
│ • Project & module management │
│ • Context review & approval │
│ • Team & API key management │
├─────────────────────────────────────────────┤
│ Supabase (PostgreSQL) │
│ • Projects, modules, context documents │
│ • Team members, API keys, access control │
├─────────────────────────────────────────────┤
│ Remote Server (Vercel) │
│ • /mcp — 6 MCP tools for Claude Code │
│ • /api/context — REST API for git hooks │
│ • API key auth (SHA256 hashed) │
│ • Member-scoped project filtering │
└─────────────────────────────────────────────┘
Key Design Decisions
- Pending context workflow — AI updates go through human review before becoming active
- Git-aware staleness — each module tracks its git snapshot; commits since = staleness
- Smart git hooks — pre-push hook calls REST API using dev's API key (no desktop app needed)
- No secrets in git —
.mcp.jsonhas only the server URL; API keys live in each dev's~/.claude.json - Member-scoped access — API keys with
member_idonly see assigned projects; admin keys see everything - Dual access pattern — Claude Code uses MCP protocol; git hooks use REST API; both auth via same API keys
Development Setup
Prerequisites
- Node.js 20+
- npm
- Supabase project (with migrations applied)
- Claude CLI (for smart context updates)
1. Install Dependencies
npm install
cd remote-server && npm install
2. Database Setup
Run the migrations in your Supabase SQL editor:
# In order:
supabase/migrations/001_initial_schema.sql
supabase/migrations/002_team_members.sql
3. Environment Variables
Desktop app — configure in Settings page:
- Supabase URL, Service Role Key, Org ID
- API Key (for MCP auth)
Remote server (remote-server/) — set in Vercel:
SUPABASE_URLSUPABASE_SERVICE_ROLE_KEY
4. Run the Desktop App
# Development (Electron + Next.js hot reload)
npm run electron:dev
# Or just the Next.js UI
npm run dev
5. Deploy the MCP Server
cd remote-server
vercel --prod
6. Build for Distribution
# macOS
npm run electron:build:mac
# Windows
npm run electron:build:win
# Linux
npm run electron:build:linux
Project Structure
├── app/ # Next.js pages (dashboard, projects, team, settings)
├── components/ # React components (shadcn/ui based)
├── electron/
│ ├── main.ts # Electron main process entry
│ ├── preload.ts # IPC bridge (context-isolated)
│ ├── ipc/ # IPC handlers (8 categories)
│ ├── store/ # SupabaseStore + SettingsStore
│ └── git/ # GitService + StalenessChecker
├── cli/
│ ├── update-context.ts # CLI for git hook integration
│ └── smart-context-update.ts # Background Claude analysis
├── remote-server/
│ ├── api/mcp.ts # Vercel serverless MCP endpoint
│ ├── api/context.ts # REST API for git hook (no MCP needed)
│ ├── lib/ # Auth + Supabase data store
│ └── tools/ # 6 MCP tool implementations
├── .open-context/ # Portable hook scripts (committed)
│ ├── update-context.js # Compiled CLI for pre-push hook
│ └── smart-context-update.js
├── hooks/ # React hooks (useElectron, useProjects, etc.)
├── lib/ # Shared types and utilities
└── supabase/migrations/ # Database schema
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Make your changes
- Run type checks:
npx tsc --noEmitandnpx tsc --project tsconfig.mcp.json --noEmit - Test the Electron app:
npm run electron:dev - Commit and open a PR
Build Verification
There are three TypeScript builds to check:
# Next.js + Electron renderer
npx tsc --noEmit
# CLI + MCP scripts
npx tsc --project tsconfig.mcp.json --noEmit
# Remote server
cd remote-server && npx tsc --noEmit
License
MIT — see LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。






