Semble
Code search library and MCP server that returns exact code snippets to coding agents on CPU without API keys or GPUs.
At a Glance
Semble core is released under the MIT License and runs locally on CPU with no API keys, GPU, or external services.
Engagement
Available On
Alternatives
Listed Oct 2026
About Semble
Semble is an open-source code search library from MinishLab, built for coding agents. It returns the relevant code snippets for a natural-language or code query, so agents do not need to grep and read whole files. It runs on CPU with no API keys, GPU, or external services, and can be used as an MCP server, a CLI tool via AGENTS.md, or a dedicated sub-agent.
What It Is
Semble is a code search tool for AI coding agents such as Claude Code, Cursor, Codex, and OpenCode. An agent asks a question like "How is authentication handled?" and gets back only the matching code chunks. The project says this uses about 99% fewer tokens than grep+read, and that indexing and search for most repos finish in under a second. It can search a local path or a git URL, or several repos together as one corpus.
Setup and Interfaces
Install it with uv tool install semble, then run semble install. The installer detects supported coding agents and lets you enable the MCP server, CLI instructions in AGENTS.md or CLAUDE.md, and a dedicated semble-search sub-agent. semble uninstall reverses the setup. The MCP server exposes two tools:
searchtakes a query and a repo, with content typescode,docs,config, orall.find_relatedtakes a file path and line number and returns semantically similar chunks.
Semble also ships as a standalone CLI with search, find-related, savings, and clear commands, and as a Python library via SembleIndex.
How Retrieval Works
Files are split into code-aware chunks with tree-sitter. Each query is scored by two retrievers: static Model2Vec embeddings (the potion-code-16M-v2 model) for semantic similarity, and BM25 for lexical matches. The results are fused with Reciprocal Rank Fusion and then reranked with these signals:
- adaptive weighting for symbol-like queries
- definition boosts
- identifier stem matching
- file coherence
- noise penalties for tests, shims, examples, and
.d.tsstubs
Because the embedding model is static, no transformer forward pass runs at query time. Indexes are cached to disk and updated incrementally as files change. A custom Model2Vec-compatible model can be set with SEMBLE_MODEL_NAME, and .sembleignore controls which files are indexed.
Benchmarks
The project reports an NDCG@10 of 0.854 across about 1,250 queries over 63 repositories in 19 languages. It states this matches a 137M-parameter code-specialized transformer while indexing about 380x faster and querying about 17x faster.
Community Discussions
Be the first to start a conversation about Semble
Share your experience with Semble, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Semble core is released under the MIT License and runs locally on CPU with no API keys, GPU, or external services.
- MIT License
- MCP server, CLI via AGENTS.md, or dedicated sub-agent
- Runs on CPU with no API keys, GPU, or external services
- Local paths or git URLs supported
- Embedding model downloaded once from Hugging Face on first use
Capabilities
Key Features
- Code search for coding agents with natural-language or code queries
- MCP server with search and find_related tools
- Standalone CLI and Python library
- Interactive installer for MCP, AGENTS.md instructions, and sub-agent
- Code-aware chunking with tree-sitter
- Hybrid semantic (Model2Vec) and BM25 retrieval with RRF fusion
- Code-aware reranking signals
- Incremental cached indexes refreshed on file changes
- Search local paths, git URLs, or multiple repos together
- Search code, docs, config, or all content
- Custom Model2Vec-compatible model support
- Token savings statistics
- Runs on CPU without API keys or GPU
