ContextEngine
MCP server — AI agents that remember across sessions. Zero API keys, 100% local.
Install / Use
claude mcp add FASTPROD -- npx -y github:FASTPROD/ContextEngineIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Skill content
View source on GitHubOpsContext for AI Agents
AI that doesn't break what it can't see.
Claude Code, Cursor, and Copilot write code without seeing your servers — so they suggest the wrong port, restart the wrong service, deploy into the wrong env. OpsContext gives them eyes on what's actually running, plus a tamper-proof log of every change they make. Free core, no signup, runs entirely on your machine.
Previously published as
@compr/contextengine-mcp. The 2.0 rename reflects what the project actually does: Claude Code sees the code, OpsContext sees the infra that runs it.
OpsContext is an MCP server. It runs locally, snapshots your live infra (PM2 processes, nginx config, Docker containers, git status, cron jobs, redacted env), and exposes it via tools your AI coding agents (Claude Code, Cursor, Copilot, Windsurf, OpenClaw) can call in real time. Everything stays on your machine — no telemetry, no code uploads.
🌐 Browser Capture (Phase 1, shipped 2026-06): OpsContext now captures prompts + assistant responses + tool calls from Claude.ai, ChatGPT.com, and your Claude Code terminal sessions into the same hash-chained audit log. Cross-surface drift detection becomes possible (e.g. catch when a model says one thing in the browser and another in the terminal). See Step 3 below.
Why
Claude Code already reads your CLAUDE.md, copilot-instructions.md, and source files. It has hooks, skills, and native memory. It does not — and structurally cannot — see what's running on your servers. Live process state, nginx routes, port conflicts across fleets, git working-tree drift across 30+ repos — that's the operational context AI agents lack.
OpsContext fills that gap, plus two compliance layers regulated industries demand from any agent stack:
- Operational visibility (the moat) — collectors for PM2 / nginx / Docker / git / cron / .env (redacted) / composer / systemd. Cross-project + check_ports + fleet HTML scoring. Claude Code can't see this; we feed it cleanly.
- Tamper-evident audit log (compliance) — hash-chained JSONL at
~/.contextengine/audit.log. Every state change recorded withprev_hash/hash. Designed to produce evidence aligned with SOC 2 CC7.2 (change monitoring) and ISO 27001 A.12.4.1 (event logging). These are evidence artifacts, not a certification. OpsContext is not itself SOC 2– or ISO 27001–certified; the audit log helps your org's auditor satisfy those controls. - Policy-as-code hooks (enforcement) — declarative
.contextengine/policy.jsonfor secret patterns (withpathsscoping), diff-aware doc coverage (replaces the workaround-y 4-hour staleness gate), deploy-verify hosts, and signed bypass tokens. Runs as a pre-commit hook layer alongside gitleaks.
Plus the persistent-memory + search features carried forward from the contextengine era:
- 🔍 Hybrid Search — keyword (BM25) ships always; semantic re-ranking is opt-in
- 🧠 Semantic Search (optional) —
all-MiniLM-L6-v2runs locally on CPU, no API keys. Install withnpm install @huggingface/transformers(~250MB, native onnxruntime). BM25 alone is plenty for most workspaces; turn semantic on when you have many similar projects and want fuzzy matches. - 📁 Auto-discover — finds
copilot-instructions.md,CLAUDE.md,.cursorrules,AGENTS.mdacross all projects - 💻 Code Parsing — extracts functions, classes, interfaces from TS/JS/Python source files
- ⚙️ Operational Intelligence — collects git, Docker, PM2, nginx, cron, package.json data
- 🔒 Local-only — nothing leaves your machine
- ⚡ Instant startup — keyword search ready immediately, embeddings load in background
- 💾 Session Persistence — AI agents can save/restore context across conversations
- 💡 Learning Store — permanent operational rules that auto-surface in search results
- �️ Protocol Firewall — progressive enforcement that ensures agents commit, document, and save learnings
- �🔌 Plugin Adapters — extend with custom data sources (Notion, Jira, RSS, etc.)
- 🧩 MCP native — works with any MCP-compatible client (VS Code, Claude, Cursor, OpenClaw)
What OpsContext is NOT
- Not a replacement for Claude Code, Cursor, or your IDE assistant. It runs alongside them as their ops/compliance backend. Code context = their job. Infra context + audit + policy = ours.
- Not a code quality tool — it checks project structure (CI, tests, Docker, docs) and validates content depth, but won't tell you if your code is good. An A+ score means "well-organized for AI agents," not "production-ready."
- Not required for tiny / solo projects — agents read
copilot-instructions.mdnatively, and the audit log + policy gates earn their keep when there's more than one developer to coordinate or a compliance officer to answer to. - Not worth chasing 100% score — invest in your PIPELINES.md and SKILLS docs instead of score-chasing. Those prevent costly mistakes; the score keeps you honest.
Quick Start
1. Scaffold config (optional)
npx @compr/opscontext-mcp init
Detects your project type, creates contextengine.json + .github/copilot-instructions.md template.
2. Add to your MCP client
VS Code (recommended — per-project setup)
Create .vscode/mcp.json in your project root:
{
"servers": {
"contextengine": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@compr/opscontext-mcp"]
}
}
}
This activates ContextEngine when the workspace is open. Add this file to each project that needs it.
Note: VS Code deprecated MCP configuration in user
settings.json. Use.vscode/mcp.jsonper workspace instead.
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ContextEngine": {
"command": "npx",
"args": ["-y", "@compr/opscontext-mcp"]
}
}
}
Cursor — add to MCP settings:
{
"mcpServers": {
"ContextEngine": {
"command": "npx",
"args": ["-y", "@compr/opscontext-mcp"]
}
}
}
OpenClaw — add ContextEngine as an MCP server in your OpenClaw config, or use the bundled skill:
# Option 1: Copy the skill to your OpenClaw workspace
cp -r node_modules/@compr/opscontext-mcp/skills/contextengine ~/.openclaw/workspace/skills/
# Option 2: Add as MCP server in openclaw.json
{
"mcpServers": {
"contextengine": {
"command": "npx",
"args": ["-y", "@compr/opscontext-mcp"],
"env": { "CONTEXTENGINE_WORKSPACES": "~/Projects" }
}
}
}
3. Capture browser + Claude Code events (optional)
Phase-1 browser capture wires Claude.ai / ChatGPT.com / Claude Code into the same hash-chained audit log the MCP server already writes to. Three small commands; each one is independent.
3a. Generate the browser extension secret
npx @compr/opscontext-mcp init-extension-secret
Writes a 32-byte hex token to ~/.contextengine/extension-secret (mode 0600). The Chrome extension authenticates to your local MCP server with this secret — nobody else on your network can post events.
Verify:
ls -la ~/.contextengine/extension-secret # → -rw------- (0600)
Then load the unpacked extension and paste the secret into its Options page. Full install steps (build, load unpacked, paste secret): chrome-extension/README.md. (Chrome Web Store listing coming.)
3b. Auto-start the local server (macOS)
npx @compr/opscontext-mcp install-autostart
Installs a LaunchAgent so OpsContext binds 127.0.0.1:7842 on every login — that's the port the browser extension and the Claude Code hook both post to.
Verify:
curl http://127.0.0.1:7842/health # → {"ok":true,...}
Companion commands: uninstall-autostart, autostart-status.
3c. Wire Claude Code terminal sessions
npx @compr/opscontext-mcp install-claude-hook
Adds UserPromptSubmit, PostToolUse, and SessionStart hook entries to ~/.claude/settings.json so every Claude Code prompt + tool call lands in the same audit log as the browser events.
Verify:
npx @compr/opscontext-mcp watch --once # → tails recent events; should show claude_code_* kinds after one prompt
4. Pin your config (recommended)
If you have a contextengine.json with custom sources, add this to your shell profile (~/.zshrc or ~/.bashrc):
export CONTEXTENGINE_CONFIG="$HOME/path/to/contextengine.json"
Without this, ContextEngine falls back to auto-discovery (finds copilot-instructions.md etc.) but won't load your explicit sources, code dirs, or custom patterns.
That's it. ContextEngine auto-discovers your docs in ~/Projects.
📦 VS Code Extension
ContextEngine has a free VS Code extension that provides proactive enforcement — no MCP setup required:
- 📊 Value meter — shows what ContextEngine saved you this session: learnings recalled, learnings saved, estimated time saved. Falls back to git status when no MCP session is active
- 📈 Live stats dashboard — click ℹ️ to see real-time session metrics (tool calls, recalls, nudges, truncations, time saved)
- @contextengine chat —
/status,/commit,/search,/remind,/syncin Copilot Chat - Escalating notifications — warns when files accumulate without commits
- Terminal watcher — monitors commands with smart classification (git, deploy, database, python, build, test), credential redaction in logs, and stuck-pattern detection (alerts after 3+ consecutive failures)
- One-click commit — commit all changes across all repos
The extension reads live metrics from the MCP server (via ~/.contextengine/session-stats.json). For search, learnings, sessions, and scoring — it uses the MCP server (npx @compr/opscontext-mcp).
⭐ PRO Features
OpsContext is source-available with a free tier. The free tier covers everything agents need — search, memory, sessions, and compliance enforcement. PRO adds team and ops intelligence across multiple projects. Licensed under BSL-1.1, which is not OSI-approved open source (converts to AGPL-3.0 on 2030-02-22). See docs/about.md for the full publisher disclosure and licensing intent.
| Feature | Free | PRO | |---------|------|-----| | Hybrid search (keyword + semantic) | ✅ | ✅ | | Persistent learnings | ✅ | ✅ | | Session save/load | ✅ | ✅ | | End-of-session enforcement | ✅ | ✅ | | Protocol Firewall (agent compliance) | ✅ | ✅ | | VS Code extension (git monitor, chat) | ✅ | ✅ | | Plugin adapters | ✅ | ✅ | | Project health score (A+ to F) | — | ✅ | | Compliance audit | — | ✅ | | Port conflict detection | — | ✅ | | Multi-project discovery | — | ✅ | | HTML score reports | — | ✅ |
Pricing
| Plan | Price | Machines | |------|-------|----------| | Pro | CHF 2/mo | 2 | | Team | CHF 12/mo | 5 | | Enterprise | CHF 36/mo | 10 |
→ Get PRO · Annual plans save 17%
# Activate after purchase
npx @compr/opscontext-mcp activate
CLI Usage (no MCP required)
ContextEngine
Truncated for display — read the full file on GitHub.
Related Skills
momen-cursurrules-prompt-file
40.6kCursor rules for building custom frontends with Momen.app as headless BaaS with GraphQL API, actionflows, AI agents, and Stripe integration.
semiotic-react-dataviz-cursorrules-prompt-file
40.6kCursor rules for Semiotic data visualization library with 30+ chart types, MCP server, and AI-assisted chart generation.
Agent-Reach
73.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
68.3k🌊 The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
