
helweg/open-codebase-index 是从 https://github.com/helweg/open-codebase-index. 导入的 MCP 服务器候选
概览
helweg/open-codebase-index 是从 https://github.com/helweg/open-codebase-index. 导入的 MCP 服务器候选
概述(AI 翻译)
按意义搜索代码库,然后根据结果进入定义、调用者和依赖路径。
open-codebase-index 是适用于 OpenCode、Jcode、Pi、Codex、Claude Code 及其他 MCP 客户端的本地语义代码索引。它结合了嵌入、BM25 关键词搜索、分支感知过滤、符号查找以及代理友好工具背后的呼叫图。
新安装应使用 open-codebase-index 和 open-codebase-index-mcp。遗留包 opencode-codebase-index 和 opencode-codebase-index-mcp 仍支持别名。
对于终端用户在MCP客户端外使用,全局安装包并使用简洁的ocbi命令:
cbi 仍可作为兼容别名使用。[ocbi 提供状态、索引、搜索、定义查找以及直接调用者或被调用方检查。完整命令参考请参见安装和主机设置。
精彩片段
- 语义和混合检索,适用于你不知道标识符的问题。
- 低令牌发现通过
codebase_context和codebase_peek。 - 定义和图导航通过
implementation_lookup、call_graph和call_graph_path。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
open-codebase-index
Search a codebase by meaning, then follow the result into definitions, callers, and dependency paths.
open-codebase-index is a local semantic code index for OpenCode, Jcode, Pi, Codex, Claude Code, and other MCP clients. It combines embeddings, BM25 keyword search, branch-aware filtering, symbol lookup, and a call graph behind agent-friendly tools.
New installs should use open-codebase-index and open-codebase-index-mcp. The legacy package opencode-codebase-index and opencode-codebase-index-mcp remain supported aliases.
For terminal use outside an MCP client, install the package globally and use the concise ocbi command:
npm install -g open-codebase-index
ocbi status --project /path/to/repo --host jcode
ocbi search "retry recovery" --project /path/to/repo
cbi remains available as a compatibility alias. ocbi provides status, indexing, search, definition lookup, direct caller/callee inspection, and current indexed working-tree impact. See Installation and host setup for the full command reference.
Highlights
- Semantic and hybrid retrieval for questions where you do not know the identifier.
- Low-token discovery through
codebase_contextandcodebase_peek. - Definition and graph navigation through
implementation_lookup,call_graph, andcall_graph_path. - Incremental, branch-aware indexing with file watching and content-hash reuse.
- Local storage backed by SQLite, usearch vectors, and a BM25 inverted index.
- Multiple embedding providers: Ollama, OpenAI, Google, or a custom OpenAI-compatible endpoint.
- Native parsing for TypeScript/TSX, JavaScript/JSX, Python, Rust, Swift, Go, Kotlin (
.ktand.kts), Java, C#, Ruby, C/C++, Metal, PHP, Apex, Bash, Zig, GDScript, MATLAB, JSON, TOML, YAML, Markdown, HTML, XML, and SVG, plus text fallback for other formats.
Quick start with OpenCode
Requires Node.js 22.22 or newer. Node.js 24 LTS is recommended.
-
Install the package:
npm install open-codebase-indexLegacy installs continue to work with:
npm install opencode-codebase-index -
Add it to
opencode.json:For OpenCode 2.x:
{ "plugins": ["open-codebase-index"] }For OpenCode 1.x (1.3.4 or newer):
{
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →