Index your codebase's domain knowledge. 20x fewer tokens, 10x faster.
ontomics MCP Server
The io.github.EtienneChollet/ontomics MCP server indexes a codebase’s domain knowledge. Its description states it can achieve “20x fewer tokens” and “10x faster.” The repository is associated with MCP (Model Context Protocol) and supports semantic-search and structured parsing via tree-sitter.
🛠️ Key Features
MCP server
Domain-knowledge indexing for codebases
Semantic search
Tree-sitter involvement
Listed on the MCP Registry
🚀 Use Cases
Finding domain-relevant information in a codebase via semantic search
Supplying indexed domain knowledge to model-context workflows
Both conditions produced complete, correct answers. ontomics got there in one call.
What it does that search can't
Search tells you where a string appears. An LSP tells you where a symbol is defined and referenced. Neither answers: what are the domain concepts in this codebase? How do they relate? What naming conventions emerged? What changed in the domain vocabulary since last release? Which functions behave similarly, regardless of what they're named?
ontomics builds a semantic index of your project's domain — clustering related symbols into concepts, detecting naming conventions from usage frequency, resolving abbreviations, grouping functions by behavioral similarity, and tracking how the vocabulary evolves over time. That index can be exported as a portable artifact to bootstrap conventions in other repos.
Behavioral similarity
Beyond naming and concepts, ontomics embeds raw function bodies using CodeRankEmbed (768-dim, contrastive code retrieval) and clusters them by behavioral similarity. This surfaces relationships that neither naming nor call graphs expose:
The result also reveals that random_transform appears at two locations with different similarity scores — a sign of implementation duplication that concept-level search would miss entirely.
Install
Install once, available in every project. No configuration needed — ontomics auto-detects the repo and indexes it on first run.
ontomics requires a git repository (.git/ directory). It will refuse to index home, root, or temp directories. To index a non-git directory, pass --force.
1. Install the binary
npm (macOS/Linux):
bash
npm install -g @ontomics/ontomics
macOS (Homebrew):
bash
brew install EtienneChollet/tap/ontomics
Shell installer (macOS/Linux):
bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/EtienneChollet/ontomics/releases/latest/download/ontomics-installer.sh | sh
From source:
bash
git clone https://github.com/EtienneChollet/ontomics.git
cd ontomics
cargo build --release
2. Register with your harness
Claude Code:
bash
claude mcp add -s user ontomics -- ontomics
Codex:
bash
codex mcp add ontomics -- ontomics
OpenClaw:
bash
openclaw mcp set ontomics '{"command":"ontomics"}'
pi-coding-agent:
bash
pi install npm:@ontomics/ontomics
Share with your team — drop an .mcp.json in your repo root:
Embed (concepts) — BGE-small (384-dim) clusters related concepts by semantic similarity
Embed (logic) — CodeRankEmbed (768-dim) embeds raw function bodies and clusters them by behavioral similarity
Centrality — PageRank scores entities by structural importance
Both embedding models are downloaded once on first run and cached locally. The index lives at <repo>/.ontomics/index.db — subsequent startups load from cache and watch for file changes.
Configuration via .ontomics/config.toml in the repo root. All fields have sensible defaults. See SPEC.md for the full design contract.