repo-ctx
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@repo-ctxCheck cached context for myrepo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
repo-ctx
A unified context layer for LLMs. Stores both in-repo context (what this repo is) and cross-repo patterns (shared knowledge across projects) in a global SQLite database. Any MCP-compatible IDE (Cursor, Claude Desktop) gets instant context without re-exploring.
Homelab Knowledge Base: See README-homelab-kb.md for the Andromeda homelab KB (facts, services, patterns, runbooks, HTTP API on port 3456).
Install
cd ~/repo-ctx
npm install
npm run build
npm install -g .Related MCP server: sill-ensoul
Quick Start
# Initialize the database
repo-ctx init
# Import existing context from ~/.context_store/
repo-ctx import --legacy
# List cached repos
repo-ctx list
# Get full context for a repo (pipe-friendly)
repo-ctx get myrepo
repo-ctx get myrepo --json | pbcopy
# Search across all repos
repo-ctx search "fastapi"
# List cross-repo patterns
repo-ctx patterns
# Export entire DB as JSON (for backup or sharing)
repo-ctx export > context-backup.json
# Import on another machine
repo-ctx import context-backup.jsonCursor Integration
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"repo-ctx": {
"command": "node",
"args": ["/path/to/repo-ctx/dist/index.js", "serve"]
}
}
}The LLM is then instructed (via AGENTS.md or Cursor rules) to:
Before exploring any repo: check for cached context via
get_contextAfter exploring: save context via
save_contextAfter significant tasks: call
auto_update_contextto auto-detect changesWhen
get_contextreports drift: callauto_update_contextto refreshWhen noticing patterns: save them via
save_pattern
MCP Tools
Tool | Description |
| Retrieve context for a repo + automatic freshness/drift check |
| Save full repo context (creates new version) |
| Partial update (only changed fields) |
| Scan repo on disk, auto-detect changes, merge additively |
| List all cached repos |
| Full-text search across repos |
| Version history for a repo |
| Remove a repo and its history |
| Save a cross-repo pattern |
| Get patterns by tech stack or tags |
| Search across patterns |
How It Works
In-Repo Context
Each repo gets a structured context entry: overview, tech stack, file tree, key files, architecture, and notes. Context is versioned — every update creates a new version, old ones are preserved.
Cross-Repo Patterns
When the LLM notices a pattern used across repos (e.g. "JWT auth middleware"), it saves it as a pattern tagged with the repos where it was seen. When working in any repo, relevant patterns are surfaced based on the tech stack.
Automatic Staleness Detection
On every get_context call, the server compares stored fingerprints (git hash, dependency file hash, file tree hash) against the current state. If drift is detected, the response includes an action_hint telling the agent to call auto_update_context.
Auto-Update
auto_update_context scans the repo on disk using convention-based heuristics (file names, extensions, directory structure) to detect key files, tech stack, sub-projects, and patterns. It merges additively — never overwrites manually-set fields like overview, architecture, or notes.
Database
Everything lives in ~/.repo-context/context.db — a single portable SQLite file. Copy it to another machine, install repo-ctx, and every LLM has your full knowledge base.
This server cannot be deployed
Maintenance
Related MCP Connectors
shared AI-context layer for teams — persistent memory your agents search and update over MCP
Your versioned memory across every AI tool — context maps, personal memory, and tasks over MCP.
Cross-LLM persistent memory: store context once, recall it from any AI model.
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to retrieve and manage code context with hybrid search, project memory, and observability via MCP tools.29MIT

sill-ensoulofficial
AlicenseNot gradedqualityBmaintenanceProvides persistent, cross-session memory for CLI agents via MCP tools, enabling them to recall, distill, and share experiences across projects and tools.6MIT- AlicenseNot gradedqualityCmaintenanceProvides coding agents with governed semantic memory and code-graph context via MCP, enabling code-linked recall, blast-radius impact analysis, and lifecycle-aware memory management.3Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to locally search, query, and understand codebases with token-efficient context, dependency graphs, history, architecture diagrams, and metrics through MCP.93MIT