经 AI Skill Hub 精选评估,本体索引 获评「强烈推荐」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.0 分,适合有一定技术背景的用户使用。
本体索引 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
本体索引 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/ontograph/ontoindex
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"----": {
"command": "npx",
"args": ["-y", "ontoindex"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 本体索引 执行以下任务... Claude: [自动调用 本体索引 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"____": {
"command": "npx",
"args": ["-y", "ontoindex"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Graph-powered code intelligence for AI agents. OntoIndex builds a local code graph for a repository and exposes it through a CLI, an MCP server, an HTTP API, and a browser UI.
The default path is local: install, analyze, setup, connect MCP, serve, and generate wiki output against a repository you control. Browser-hosted surfaces are optional clients on top of that local graph.
Important: OntoIndex has no official cryptocurrency, token, or coin. Any token using the OntoIndex name is not affiliated with this project or its maintainers.
2.1.4AI coding agents often work from small slices of a codebase. That is fast, but fragile: a model can edit a function without seeing callers, rename a symbol without downstream impact analysis, or miss coupling that sits outside the current prompt.
OntoIndex reduces that uncertainty by precomputing a repository graph. The graph records files, symbols, imports, calls, inheritance, routes, tools, documentation sections, communities, and execution flows. Agents can then ask graph-level questions before editing: where is this symbol used, what process does it participate in, what tests are nearby, and what changes are risky?
The index is local-first. Repository data is stored in .ontoindex/, while the global registry under ~/.ontoindex/ only tracks indexed repository metadata and paths.
OntoIndex runs on Node.js and uses native parser packages for some languages. Install the following before installing OntoIndex.
| Requirement | Linux | Windows |
|---|---|---|
| Node.js | Node.js 22.12.0 through 25.x plus npm | Node.js 22.12.0 through 25.x plus npm 11.6.0+ |
| Git | git CLI for repository metadata and diff analysis | Git for Windows |
| Native build tools | python3, make, and g++ for optional native parser builds | Python 3 and Microsoft C++ Build Tools from Visual Studio Build Tools |
| Shell | bash for the install script examples | PowerShell 5.1 or PowerShell 7 |
| Optional containers | Docker Engine and Docker Compose | Docker Desktop |
Linux example:
node --version
npm --version
git --version
python3 --version
make --version
g++ --version
Windows PowerShell example:
node --version
npm --version
git --version
python --version
npm config get msvs_version
Linux and macOS:
wget -qO- https://raw.githubusercontent.com/ontograph/ontoindex/master/scripts/install-ontoindex-latest.sh | bash
ontoindex --version
If wget is unavailable, curl -fsSL https://raw.githubusercontent.com/ontograph/ontoindex/master/scripts/install-ontoindex-latest.sh | bash works as a fallback.
Windows PowerShell:
iwr -useb https://raw.githubusercontent.com/ontograph/ontoindex/master/scripts/install-ontoindex-latest.ps1 | iex
ontoindex --version
Windows note:
- OntoIndex no longer supports Node.js 20 in the current release line because commander@15 requires Node.js 22.12.0 or newer. - Node.js 24 and 25 use OntoIndex's vendored tree-sitter runtime source, patched to compile native bindings with C++20 when prebuilds are unavailable. - With Node.js 22 LTS, use npm 11.6.0 or newer on Windows. - Older npm releases can bundle node-gyp builds that fail to detect Visual Studio 2026 Build Tools. - Upgrade with npm.cmd install -g npm@11.6.3 before retrying the installer.
From a local checkout:
| Platform | Command |
|---|---|
| Linux/macOS | ./scripts/install-ontoindex-latest.sh |
| Windows PowerShell | powershell -ExecutionPolicy Bypass -File .\scripts\install-ontoindex-latest.ps1 |
The installers fetch the latest GitHub release, locate the ontoindex-*.tgz asset, and install it with npm install -g. If ONTOINDEX_LOCAL_ASSET points to a tarball, or an ontoindex-*.tgz file already exists in the current directory or beside the script, the Linux/macOS installer uses that local tarball first instead of going back to GitHub. If a global install is not writable, the installers fall back to a user npm prefix.
The default installer is not an offline bundle of every third-party package. It ships OntoIndex sources and vendored parser sources, then lets npm resolve runtime dependencies such as LadybugDB, ONNX Runtime, and image/vector helpers for the current platform. A non-fatal npm deprecation warning from a transitive package can appear while upstream packages catch up. For air-gapped hosts, use an internal npm registry mirror or a prepared npm cache.
On Linux x64, the installer also prefetches LadybugDB fts and vector extension binaries from the OntoIndex GitHub extension-cache release. On Windows x64, the PowerShell installer prefetches the same binaries from the LadybugDB extension host into the local cache. At runtime, OntoIndex tries that cache before asking LadybugDB to download extensions during INSTALL fts / INSTALL VECTOR.
If a Windows install previously failed partway through and left a broken ontoindex.cmd shim, repair the global install state before retrying:
npm.cmd uninstall -g ontoindex
if (Test-Path "$env:APPDATA\npm\node_modules\ontoindex") { Remove-Item "$env:APPDATA\npm\node_modules\ontoindex" -Recurse -Force }
if (Test-Path "$env:APPDATA\npm\ontoindex.cmd") { Remove-Item "$env:APPDATA\npm\ontoindex.cmd" -Force }
if (Test-Path "$env:APPDATA\npm\ontoindex.ps1") { Remove-Item "$env:APPDATA\npm\ontoindex.ps1" -Force }
Installer configuration:
| Purpose | Linux/macOS | Windows PowerShell |
|---|---|---|
| Use another release repository | ONTOINDEX_GITHUB_REPO=owner/repo ./scripts/install-ontoindex-latest.sh | $env:ONTOINDEX_GITHUB_REPO='owner/repo'; .\scripts\install-ontoindex-latest.ps1 |
| Use a local downloaded tarball | ONTOINDEX_LOCAL_ASSET="$PWD/ontoindex-2.1.4.tgz" ./scripts/install-ontoindex-latest.sh | — |
| Use a user npm prefix | ONTOINDEX_NPM_PREFIX="$HOME/.local" ./scripts/install-ontoindex-latest.sh | $env:ONTOINDEX_NPM_PREFIX="$env:APPDATA\npm"; .\scripts\install-ontoindex-latest.ps1 |
| Force user prefix | ONTOINDEX_NPM_PREFIX="$HOME/.local" ./scripts/install-ontoindex-latest.sh | .\scripts\install-ontoindex-latest.ps1 -ForceUserPrefix |
| Require FTS/vector cache prefetch | ONTOINDEX_REQUIRE_LADYBUG_EXTENSIONS=1 ./scripts/install-ontoindex-latest.sh | $env:ONTOINDEX_REQUIRE_LADYBUG_EXTENSIONS='1'; .\scripts\install-ontoindex-latest.ps1 |
| Skip FTS/vector cache prefetch | ONTOINDEX_SKIP_LADYBUG_EXTENSIONS=1 ./scripts/install-ontoindex-latest.sh | $env:ONTOINDEX_SKIP_LADYBUG_EXTENSIONS='1'; .\scripts\install-ontoindex-latest.ps1 |
Use this path when npm publication is available in your environment.
| Platform | Command |
|---|---|
| Linux/macOS | npm install -g ontoindex@2.1.4 && ontoindex --version |
| Windows PowerShell | npm.cmd install -g ontoindex@2.1.4; ontoindex --version |
Use this when you want an immutable GitHub release asset.
| Platform | Command |
|---|---|
| Linux/macOS | npm install -g https://github.com/ontograph/ontoindex/releases/download/v2.1.4/ontoindex-2.1.4.tgz && ontoindex --version |
| Windows PowerShell | npm.cmd install -g https://github.com/ontograph/ontoindex/releases/download/v2.1.4/ontoindex-2.1.4.tgz; ontoindex --version |
ontoindex setup configures supported MCP clients automatically. Manual examples are useful for debugging or for clients that do not support automatic setup.
| Client | Linux/macOS | Windows PowerShell |
|---|---|---|
| Claude Code | claude mcp add ontoindex -- ontoindex mcp | claude mcp add ontoindex -- ontoindex mcp |
| Codex | codex mcp add ontoindex -- ontoindex mcp | codex mcp add ontoindex -- ontoindex mcp |
| Ontocode | ontocode mcp add ontoindex -- ontoindex mcp | ontocode mcp add ontoindex -- ontoindex mcp |
| Any MCP client | command: ontoindex, args: ["mcp"] | command: ontoindex, args: ["mcp"] |
Cursor example:
{
"mcpServers": {
"ontoindex": {
"command": "ontoindex",
"args": ["mcp"]
}
}
}
OpenCode example:
{
"mcp": {
"ontoindex": {
"type": "local",
"command": ["ontoindex", "mcp"]
}
}
}
| Task | Linux/macOS | Windows PowerShell |
|---|---|---|
| Start stack | docker compose up -d | docker compose up -d |
| Backend URL | http://localhost:4747 | http://localhost:4747 |
| Web UI URL | http://localhost:4173 | http://localhost:4173 |
Images:
| Image | Purpose |
|---|---|
ghcr.io/ontograph/ontoindex:2.1.4 | CLI, MCP server, and ontoindex serve backend |
ghcr.io/ontograph/ontoindex-web:2.1.4 | Web UI |
The hosted UI is optional and can connect to a local backend at http://localhost:4747.
| Task | Linux/macOS | Windows PowerShell |
|---|---|---|
| Start local backend | ontoindex serve | ontoindex serve |
| Open hosted UI | xdg-open https://ontoindex.vercel.app | Start-Process https://ontoindex.vercel.app |
To run the web UI from source:
| Platform | Command |
|---|---|
| Linux/macOS | cd ontoindex-shared && npm install && npm run build && cd ../ontoindex-web && npm install && npm run dev |
| Windows PowerShell | Set-Location ontoindex-shared; npm install; npm run build; Set-Location ..\ontoindex-web; npm install; npm run dev |
The browser-only mode can inspect uploaded ZIPs in memory. For larger repositories, start ontoindex serve and let the UI use the local index.
| Goal | Linux/macOS | Windows PowerShell |
|---|---|---|
| Search for a flow | ontoindex query "authentication flow" | ontoindex query "authentication flow" |
| Inspect symbol context | ontoindex ctx validateUser | ontoindex ctx validateUser |
| Check blast radius | ontoindex impact validateUser --include-tests --depth 2 | ontoindex impact validateUser --include-tests --depth 2 |
| Review current diff | ontoindex review diff | ontoindex review diff |
| Audit before commit | ontoindex detect-changes | ontoindex detect-changes |
| Rebuild from scratch | ontoindex analyze --force | ontoindex analyze --force |
Core MCP surfaces include:
| Tool family | Use |
|---|---|
| Search and context | Find relevant symbols, files, routes, and processes |
| Impact analysis | Estimate upstream and downstream blast radius before edits |
| Diff review | Map changed hunks to graph symbols and execution flows |
| Docs evidence | Check requirements traceability, docs drift, and readiness |
| Refactor support | Use graph-aware rename and safety checks instead of plain find-and-replace |
| Systems audit | Inspect resource flow, path boundaries, error topology, concurrency, and taint-style signals |
The graph build is a typed phase DAG:
scan -> structure -> [markdown, cobol] -> parse -> [routes, tools, orm]
-> crossFile -> mro -> communities -> processes
Key steps:
.ontoindex/.Supported language depth varies, but the shared model covers TypeScript, JavaScript, Python, Java, Kotlin, C#, Go, Rust, PHP, Ruby, Swift, C, C++, Dart, and protobuf-related parser support.
高质量的MCP工具,支持AI智能代理与本体图谱集成
该工具使用 AGPL-3.0 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ AGPL 3.0 — 最严格的 Copyleft,网络服务端使用也需开源,SaaS 使用受限。
AI Skill Hub 点评:本体索引 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | ontoindex |
| 原始描述 | 开源MCP工具:Code Graph mcp solutions for AI agents with ontology and sentence. Supports extr。⭐13 · TypeScript |
| Topics | mcptypescriptai |
| GitHub | https://github.com/ontograph/ontoindex |
| License | AGPL-3.0 |
| 语言 | TypeScript |
收录时间:2026-06-13 · 更新时间:2026-06-16 · License:AGPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端