# Semble — Code Search for AI Agents Uses ~98% Fewer Tokens Than grep+read, Hits the Hacker News Front Page

> A CPU-only code-search MCP server that cuts the tokens an agent burns hunting through a repo.

- Org: Minish Lab
- Date: 2026-05-17
- Category: repo, tool
- Source: https://github.com/MinishLab/semble
- Canonical page: https://ai-tldr.dev/releases/minishlab-semble/

## In short

Local CPU-only code-search MCP server that pairs Model2Vec static embeddings with BM25 lexical matching. Indexes a repo in about 250ms, answers queries in about 1.5ms, and reports 0.854 NDCG@10.

## What it is

Semble is an open-source code-search library built for AI coding agents. Instead of an agent running grep and reading whole files into its context, Semble returns the specific snippets that match a query. It runs as an MCP server, so Claude Code, Cursor, Codex, and other MCP clients can call it directly.

## How it works

It combines two retrieval methods: semantic search using Model2Vec static embeddings, and lexical matching with BM25 for identifiers and API names. Results are merged with Reciprocal Rank Fusion, then re-ranked with code-aware signals like definition boosts, identifier stemming, and penalties for test or legacy files. Everything runs on CPU with no API keys, GPU, or external services.

## Why it matters

Token cost and context bloat limit agent workflows. The project reports indexing a repo in about 250ms and answering queries in about 1.5ms on CPU while using roughly 98% fewer tokens than a grep-and-read loop, leaving more of an agent's context window for actual reasoning.

## Who it's for

developers building or running coding agents

## Try it

pip install semble

## Links

- [GitHub Repo](https://github.com/MinishLab/semble)
- [Documentation](https://minish.ai/packages/semble/introduction/)
- [PyPI Package](https://pypi.org/project/semble/)
- [Hacker News](https://news.ycombinator.com/item?id=48169874)
