Briefing

Semble: Token‑Efficient Code Retrieval for Claude Code

ai-dev
by Bibabomas · Claude

Add Semble as an MCP server to Claude Code to reduce token usage and improve code search speed.

What to do now

Install Semble via 'claude mcp add semble -s user -- uvx --from "semble[mcp]" semble' and benchmark against current grep.

Summary

Semble is an open‑source tool designed to improve code retrieval in Claude Code by combining static Model2Vec embeddings with BM25 and RRF reranking. It achieves 98% fewer tokens than grep+read and reaches 99% of the retrieval quality of a 137M‑parameter transformer, while being ~200× faster. The benchmark involved ~1250 query/document pairs across 63 repositories and 19 languages, achieving 0.854 NDCG@10. Semble runs entirely on CPU, requiring no GPU or external services, and can be dropped into Claude Code, Cursor, Codex, or OpenCode as an MCP server.

Key features include token efficiency, fast indexing (~250 ms per repo), rapid query response (~1.5 ms), accurate ranking, and zero configuration. The tool uses the potion‑code‑16M static model and is available on GitHub. Installation is straightforward via the Claude CLI.

Semble offers a practical alternative to transformer‑based code search, reducing token costs and improving developer productivity.

Key changes

  • Token‑efficient: 98% fewer tokens than grep+read
  • Fast indexing: ~250 ms per repo, ~1.5 ms per query
  • Accurate: 0.854 NDCG@10, 99% of transformer quality
  • MCP server drop‑in for Claude Code, Cursor, Codex, OpenCode
  • Zero config: no API keys, no GPU, runs on CPU
  • Uses static Model2Vec embeddings (potion‑code‑16M) with BM25 and RRF
  • Benchmarked on 1250 query/document pairs across 63 repos

Affects

none

Customer impact

Analyzing matches…

Ask about this story

Impact on an agency? Which customers? Compare historically Risks of waiting