
ontomics
Give any coding agent instant semantic knowledge of your codebase — one tool call instead of 19, ~20x fewer tokens.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npm install -g @ontomics/ontomicsPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"ontomics": {
"command": "npx",
"args": [
"-y",
"@ontomics/ontomics",
"--repo",
"."
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- A git repository (.git/ directory); non-git directories require --force
- The ontomics binary, installed via npm (@ontomics/ontomics), Homebrew (EtienneChollet/tap/ontomics), the shell installer, or built from source with cargo
- Supported source languages: Python, TypeScript, JavaScript, or Rust
- macOS or Linux
About ontomics
An MCP server that extracts domain knowledge from a codebase — concepts, naming conventions, vocabulary, and behavioral similarity between functions — and makes it queryable by coding agents in a single tool call, cutting token consumption and agentic search time dramatically. The index is built and stored locally per repo using tree-sitter parsing, TF-IDF concept scoring, local embedding models, and PageRank centrality.
Tools & capabilities (19)
query_conceptFind all variants, related concepts, and occurrences of a term.
locate_conceptFind the key signatures, classes, and files for a concept.
describe_symbolGet the signature, docstring, and relationships for a function or class.
trace_conceptTrace how a concept flows through the codebase via call chains.
list_conceptsList the top domain concepts by frequency.
list_conventionsList all detected naming patterns (prefixes, suffixes, conversions).
list_entitiesList code entities (classes, functions) filtered by concept, role, or kind.
check_namingCheck an identifier against project conventions; suggests the canonical form.
suggest_nameGenerate an identifier name that fits the project's vocabulary.
vocabulary_healthMeasure convention coverage, naming consistency, and cluster cohesion.
ontology_diffShow new, changed, or removed domain concepts since a git ref.
export_domain_packExport domain knowledge as portable YAML for use in other repos.
find_similar_logicFind functions with behaviorally similar implementations, ranked by embedding similarity.
describe_logicGet the behavioral description, body text, and logic cluster membership for a function.
compact_contextAssemble tiered context (concepts + logic) for a symbol, optimized for LLM consumption.
describe_fileOverview of a file's entities, concepts, and relationships.
concept_mapShow which modules contain which domain concepts.
type_flowsShow dominant types and how data flows through the codebase.
trace_typeTrace how a specific type propagates across files and call sites.
When to use it
- Answer 'what are the main domain concepts in this codebase?' in a single tool call instead of dozens of greps and reads
- Find functions that behave similarly to a given function, surfacing implementation duplication that naming or call graphs miss
- Enforce naming conventions by checking identifiers against the project's detected vocabulary and suggesting canonical names
- Track how a codebase's domain vocabulary changes between git refs
- Export a portable domain pack (YAML) to bootstrap conventions in other repositories
Security notes
Runs entirely locally — no API keys and no network calls for indexing (embedding models are downloaded once on first run and cached). Requires a git repository; ontomics refuses to index home, root, or temp directories unless --force is passed.
ontomics FAQ
Does it require any API keys or send my code to a service?
No. The entire pipeline runs locally. The two embedding models (BGE-small and CodeRankEmbed) are downloaded once on first run and cached; indexing makes no API calls.
Which languages are supported?
Python, TypeScript, JavaScript, and Rust, auto-detected from file extensions.
Where is the index stored?
At <repo>/.ontomics/index.db. Subsequent startups load from cache and watch for file changes. Configuration lives in .ontomics/config.toml.
Can I index a directory that isn't a git repo?
It requires a .git/ directory and refuses to index home, root, or temp directories. Pass --force to index a non-git directory.
How do I share it with my team?
Drop an .mcp.json in the repo root with the ontomics server entry (command npx, args -y @ontomics/ontomics --repo .) so teammates pick it up automatically.
Alternatives to ontomics
Compare all alternatives →Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).
Up-to-date, version-specific library documentation injected into your coding agent.
Code intelligence engine that indexes repos into a persistent knowledge graph for AI coding agents.
Compare ontomics with: