All Projects

bpcontext

A semantic search and context engine for codebases. Indexes source files with vector + keyword search, exposes an MCP server for AI tool integration, and keeps large file content out of the LLM context window.

Overview

bpcontext is a Rust CLI and MCP server that solves a specific problem in agentic development: keeping codebases searchable without bloating the AI context window. Instead of reading every file, the agent indexes the codebase once and queries it semantically.

The tool combines BM25 keyword ranking with vector similarity (sentence embeddings) using reciprocal rank fusion to merge results. It exposes a full MCP (Model Context Protocol) server so Claude Code and other MCP-aware tools can call it directly.

Features

  • Index entire directories of source files into a searchable chunk store
  • Hybrid search: BM25 keyword + vector similarity, merged via RRF
  • Persistent knowledge store with SHA-256 content hashing (incremental re-index)
  • MCP server exposing bpx_search, bpx_index, bpx_execute, and more
  • Context budget tracking — alerts when token utilization crosses thresholds
  • count_only mode for pre-flight result size checks
  • fetch_and_index for URL content indexing

Tech Stack

Rust MCP SQLite sentence-transformers BM25

Links