💡 1. Inspiration & The Origin Story

Why krusch-context-mcp Was Built

In early 2026, as AI coding assistants like Cursor, Claude Code, Windsurf, and Gemini CLI became central to daily development, a critical architectural gap emerged: AI agents suffer from severe amnesia between sessions.

Every new conversation started from a blank slate. Agents would re-analyze the entire codebase repeatedly, forget previous debugging breakthroughs, and ignore project-specific architectural conventions unless manually re-prompted.

Traditional RAG tools (Pinecone, Qdrant, naive vector search) failed to solve this because they treated agent memory like a flat text index. They lacked temporal awareness, steering capabilities, multi-agent consensus, and local offline capabilities. krusch-context-mcp was built to be the sovereign, zero-trust, multi-engine working memory server for the agent era.

🏗️ 2. How Local & Remote Agents Use the MCP Server

krusch-context-mcp exposes 42 standardized Model Context Protocol (MCP) tools over stdio JSON-RPC transport. Any client — whether a cloud-hosted IDE like Cursor, a CLI agent like Claude Code, or a 100% offline local agent running via Ollama — connects seamlessly to the exact same memory server.

🌟 3. Deep Dive into the 5 Core Subsystems

5 Unified Memory Subsystems Architecture

Subsystem 1: Episodic Memory & Temporal Recency Decay

Episodic memory records session learnings, past bugs, priorities, outcomes, and activity logs. Unlike flat vector search where a 6-month-old memory can distort current context, krusch-context-mcp applies exponential decay:

FinalScore = Similarity × e^(-0.01 × age_in_days)

A memory's relevance naturally decays ~26% after 30 days of inactivity. Recent refactors automatically supersede old decisions.

Subsystem 2: Holographic Steering Nuggets

Rather than stuffing 2,000-line system prompts into every turn, Holographic Nuggets maintain lightweight key-value steering facts (kind: 'project' | 'user' | 'agent'). Agents query nudges dynamically during planning, retrieving micro-conventions exactly when needed.

Subsystem 3: Company Brain v2 (Multi-Agent Consensus & Provenance)

Designed for team collaboration and multi-agent coordination (interaction_memory): parent-child version graphs, consensus conflict resolution (krusch_context_resolve_conflict), and role-based access lenses (krusch_context_search_lens).

Subsystem 4: Codebase & Docs Search

Direct integration with pg-git indexes source code blobs, git trees, commits, and external documentation manuals (polygres-docs, openrouter-docs) searchable via krusch_docs_search.

Subsystem 5: Proactive Trajectory Auditor & AI Watch Research Engines

Integrates 4 cutting-edge AI research subsystems: AgentDebugX (failure pattern matching), DataFlow-Harness (DAG operators), Rubric4Setwise (LLM reranking), and AREX (constraint auditing).

🥊 4. Feature Comparison

Feature Generic Vector DBs Basic MCP Memory krusch-context-mcp
Protocol Support Proprietary REST MCP Native 42-Tool MCP Surface
Temporal Recency Decay ❌ No ❌ No ✅ Exponential Decay (e^-0.01t)
Micro-Steering (Nuggets) ❌ No ❌ No ✅ Holographic Steering Facts
Multi-Agent Consensus ❌ No ❌ No ✅ Company Brain v2 Substrate
Graph-Vector Fusion Separate DB ❌ No ✅ Native pgGraph Multi-Hop
Offline Cache + Sync ❌ No Local Only ✅ SQLite + Polygres Sync

⚙️ 5. Deployment & Configuration

# --- Polygres.com Cloud Database & Runtime API ---
POLYGRES_PROJECT_ID="p4b2ef196c33edbd8be43174"
POLYGRES_RUNTIME_URL="https://p4b2ef196c33edbd8be43174.api.db.polygres.com/v1"
POLYGRES_API_KEY="poly_live_YOUR_POLYGRES_API_KEY"

# Native PostgreSQL Connection
DATABASE_URL="postgresql://username:[email protected]:5432/kruschdb?sslmode=require"

# --- OpenRouter Cloud Embeddings ---
EMBEDDING_URL="https://openrouter.ai/api/v1/embeddings"
EMBEDDING_API_KEY="sk-or-v1-YOUR_OPENROUTER_API_KEY"
EMBED_MODEL="baai/bge-large-en-v1.5"