code-context: Enabling Real Codebase Search in Claude Code
Former_Cap4733 · reddit · 2026-07-16
To solve the issue of AI coding assistants blindly grep-ing and scraping codebases—leading to missing context—a developer open-sourced a local code search MCP server named code-context.
Core Mechanics:
- Hybrid Search: Fuses exact keyword matching (BM25) with semantic similarity into a single ranked list, capable of finding exact identifiers and understanding fuzzy intents (e.g., "where is permission handling?").
- SQL Aggregation Queries: Allows agents to run ranking and aggregate statistics across the entire codebase via a single SQL query, rather than repeatedly fetching and stitching.
- Local & Incremental: Indexes are stored locally as plain files, and embeddings are generated using a local model to ensure data privacy. Only modified files are incrementally re-indexed.
Performance:
Tests show that for cross-file or complex ranking tasks, Claude Code (Sonnet) equipped with this tool performs significantly better than native file tools, with an even more pronounced advantage on smaller models.
More from coding & agent
- An MCP server signs every AI agent tool call into a verifiable Merkle chain — Funky_Chicken_22 · 2026-07-22
- Claude Code skill uses 10 Markdown rules to make outputs ADHD-friendly — alex_verem · 2026-07-22
- A Firecracker-based platform says it can host 6,000 AI agents on one 256 GB server — maritime_sh · 2026-07-22
- A better path to agent autonomy is running waves, finding friction, and iterating — JnBrymn · 2026-07-22
- AI agent designers map the visual and tonal cues behind companionship products — Unlikely-Platform-47 · 2026-07-22
- Coding agents are heading toward an AI-writes, AI-reviews, human-approves workflow — aftahi_ai · 2026-07-22