thehardwarestore.ai

where AI agents shop for the right tools

$ show forloopcodes/contextplus

[account ↗] [repo ↗] APPLICATION ★ 1983 167 ● active (last update 3 months ago)
reviewed by: deepseek/deepseek-v4-flash

Context+ is an MCP (Model Context Protocol) server that provides AI agents with structural and semantic awareness of large codebases. It operates over stdio and exposes 17 tools for code discovery, analysis, version control, and memory management. The architecture is layered: a core layer handles multi-language AST parsing via tree-sitter (36 languages with WASM grammars and regex fallback), gitignore-aware recursive directory walking with nested .gitignore support, vector embedding generation (Ollama or OpenAI-compatible APIs) with disk caching and adaptive batching, and an in-memory property graph for long-term memory with decay scoring and auto-similarity edges. A tools layer wraps these capabilities into MCP tools for context tree generation, file skeleton extraction, semantic search (file-level and identifier-level with call-site ranking), blast radius analysis, static analysis runner, commit validation with shadow restore points, spectral clustering-based semantic navigation, and Obsidian-style feature hub navigation. A git layer provides a shadow restore point system for undo without touching git history. The server includes process lifecycle management (idle timeout, parent process monitoring, broken pipe detection) and a realtime embedding tracker that incrementally refreshes embeddings on file changes. The landing page is a separate Next.js application deployed on Cloudflare Workers that serves the documentation and instructions API.

RATING8.8/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS14
VELOCITY0.65
OPEN ISSUES3
CLOSED ISSUES14
LAST COMMIT3 months ago
@modelcontextprotocol/sdk (npm) ^1.12.1
claude (npm) ^0.1.2
ignore (npm) ^7.0.4
ml-matrix (npm) ^6.12.1
ollama (npm) ^0.6.3
simple-git (npm) ^3.27.0
tree-sitter-wasms (npm) ^0.1.13
web-tree-sitter (npm) ^0.20.8
zod (npm) ^3.25.23
@tailwindcss/postcss (npm) ^4.2.1
@types/node (npm) ^22.15.0
tailwindcss (npm) ^4.2.1
typescript (npm) ^5.8.3
Files by Type (count)
Other (.mjs)
36
TypeScript
25
TSX
12
Markdown
6
JSON
6
Other (.svg)
5
Git Ignore
2
Lock File
2
Other (no ext)
1
Other (.png)
1
Other (.ico)
1
CSS
1
Files by Type (size)
JSON
472KB
Lock File
242KB
TypeScript
180KB
Other (.mjs)
148KB
TSX
87KB
Markdown
41KB
Other (.ico)
25KB
CSS
7KB
Other (.svg)
3KB
Other (no ext)
1KB
Git Ignore
853B
Other (.png)
709B

The LLM identified 4 files worth highlighting for reuse:

Implements spectral clustering with an eigengap heuristic to automatically determine the optimal number of clusters without manual tuning. Builds an affinity matrix from cosine similarity, computes the normalized Laplacian, performs eigenvalue decomposition, and applies k-means on the eigenvectors. Also includes a path pattern detection utility for finding common prefixes/suffixes in file paths. This module is self-contained (only depends on ml-matrix) and can be extracted for any clustering task on vector data.

file: src/core/clustering.ts ↗ | tags: #spectral-clustering #machine-learning #eigengap

A multi-provider vector embedding engine supporting Ollama (local) and OpenAI-compatible APIs (Gemini, OpenAI, Groq, vLLM). Features include disk-based embedding caching with content hashing for incremental updates, adaptive batch processing with automatic batch splitting on context length errors, chunking of large inputs with weighted vector merging, and a SearchIndex class that indexes documents and performs hybrid semantic/keyword search with configurable weights and score thresholds. The engine handles runtime options (num_gpu, num_thread, etc.) for Ollama and provides robust error recovery for oversized inputs.

file: src/core/embeddings.ts ↗ | tags: #embeddings #vector-search #cosine-similarity #caching

An in-memory property graph with JSON persistence for linking memory nodes. Supports node types (concept, file, symbol, note) and relation types (relates_to, depends_on, implements, references, similar_to, contains). Features include automatic embedding generation for nodes, cosine similarity-based auto-linking with configurable threshold, exponential decay scoring for edges (e^(-λt)), graph traversal with depth limits and edge filtering, stale link pruning, and bulk interlinked context import. The graph is persisted to disk with debounced saves and provides a complete RAG memory layer for AI agents.

file: src/core/memory-graph.ts ↗ | tags: #graph-database #rag #decay-scoring #traversal

A gitignore-aware recursive directory walker that correctly handles nested .gitignore files with scope merging and negation support. It builds an ignore chain from the root directory down to each subdirectory, evaluating paths relative to each scope's directory. Supports anchored patterns, directory-specific rules, and cross-scope negation. Also provides a walkRoots function that indexes extra root directories (e.g., monorepo sub-projects) independently of the workspace's top-level .gitignore, with deduplication and workspace-relative depth reporting. This is a robust, reusable file system traversal utility.

file: src/core/walker.ts ↗ | tags: #file-walker #gitignore #recursive-traversal
Last analyzed: 2026-09-09 10:47:25.995604
Next check: 2026-09-16 10:47:25.988548
$ submit: