Rust-native code index MCP server with first-class 1C:Enterprise (BSL) support. Static binary, no runtime. 25 tools — 18 universal + 7 BSL-specific. Tree-sitter AST for 10 languages. Federation across multiple repos. Built for production-scale monorepos.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
claude mcp add code-index-mcp -- npx -y @regsorm/code-index-mcp{
"mcpServers": {
"code-index-mcp": {
"command": "npx",
"args": ["-y", "@regsorm/code-index-mcp"]
}
}
}Resumen de MCP Servers
<a href="https://infostart.ru/1c/tools/2677918/" title="Published on Infostart">
<img src="https://infostart.ru/bitrix/templates/sandbox_empty/assets/tpl/abo/img/logo.svg" alt="Infostart" height="32">
</a>
Published on Infostart: [Code Index — структурный поиск по выгрузке кода 1С через MCP](https://infostart.ru/1c/tools/2677918/)
---
# code-index-mcp
[Русская версия](README_RU.md)
**Rust-native code index for AI agents. Static binary. Production-grade BSL/1C support.**
One static binary for Windows/Linux/macOS — no runtime, no dependencies. Indexes large repositories in seconds, returns results to AI agents over MCP in milliseconds. 25 tools: 18 universal + 7 BSL-specific for 1C:Enterprise configurations.
## What's inside
- **Performance.** 62,000 files indexed in 43 seconds, sub-ms search per query. Production-grade for 100K+ file monorepos.
- **25 MCP tools.** 18 universal (functions, classes, callers/callees, file content, grep) + 7 BSL-tools (object structure, form handlers, event subscriptions, call graph, data links).
- **Native BSL/1C.** Parses XML-exports of 1C:Enterprise 8.3 configurations. Data-link graph (object→object edges via reference types in attributes) — ~60,000 edges in seconds for a typical accounting configuration.
- **Federation.** One MCP server can serve multiple repositories across machines — pass `repo: "alias"` in each tool call.
- **Compressed content storage.** File contents stored in SQLite via zstd, cheap random-access reads for AI agents.
- **Tree-sitter AST.** 10 languages with full parsing (Rust, Python, JavaScript, TypeScript, Java, Kotlin, C#, Go, Objective-C, Zig) + fallback for 50+ formats.
Connects to Claude Code, Cursor, any MCP client over HTTP.
## Problem
AI models waste enormous time on repeated grep/find calls just to locate a single symbol. A real example: finding `RuntimeErrorProcessing` in a Java project required 14 sequential grep/find calls, each scanning thousands of files. With Code Index, that is one query returning results in under a millisecond.
## Solution
A compiled Rust binary with **one-writer / many-readers** architecture:
1. Parses source code into AST via tree-sitter
2. Indexes everything into SQLite with FTS5 full-text search
3. A separate **background daemon** is the sole writer: one process per machine watches a list of folders from its config and keeps `.code-index/index.db` up to date.
4. The **MCP server** is a thin **read-only** client: any number of Claude Code / VS Code / subagent sessions can connect to the same project in parallel — no pidlock conflicts, no per-session re-indexing.
## Supported Languages
| Language | Parser | Extensions |
|----------|--------|------------|
| Python | tree-sitter-python | `.py` |
| JavaScript | tree-sitter-javascript | `.js`, `.jsx` |
| TypeScript | tree-sitter-typescript | `.ts`, `.tsx` |
| Java | tree-sitter-java | `.java` |
| Rust | tree-sitter-rust | `.rs` |
| Go | tree-sitter-go | `.go` |
| 1C (BSL) | tree-sitter-onescript | `.bsl`, `.os` |
| XML (1C) | quick-xml | `.xml` (configuration metadata) |
| HTML | tree-sitter-html | `.html`, `.htm` (v0.7.1, by user request — see HTML-specific mapping below) |
Text files (`.md`, `.json`, `.yaml`, `.toml`, `.xml`, `.sql`, `.env`, etc.) are also indexed for full-text search.
### HTML — entity mapping (v0.7.2)
HTML has no native concept of "function" or "class", so the mapping is conventional. **Dual-indexing**: html files go through both AST parser AND `text_files` (so `search_text` / `grep_text` / `read_file` keep working alongside the new structural queries).
| HTML | → | code-index table | Name |
|------|---|------------------|------|
| `<element id="X">…</element>` | → | `classes` | `X` (body=outerHTML, bases=tag_name) |
| `<form id|name="X">` | → | `classes` | `form_X` (bases=`form`) |
| `<form>` without id/name | → | `classes` | `form_<line>` |
| `<input/select/textarea name="Y">` | → | `variables` | `Y` |
| `<a href="URL">` | → | `imports` | `module=URL`, `kind="link"` |
| `<link href="URL" rel="X">` | → | `imports` | `module=URL`, `kind=X` (or `"stylesheet"`) |
| `<script src="URL">` | → | `imports` | `module=URL`, `kind="script"` |
| `<img/iframe/video/audio/source/embed src="URL">` | → | `imports` | `module=URL`, `kind=tag` |
| `<script>…inline JS…</script>` | → | `functions` | `inline_script_<line>` (body=content) |
| `<style>…inline CSS…</style>` | → | `functions` | `inline_style_<line>` (body=content) |
| Attribute `class="foo bar baz"` | → | `variables` | `class:foo`, `class:bar`, `class:baz` (one record per class) |
All MCP tools that work for HTML files after re-indexing:
```
# === Discovery & metadata ===
list_files(repo="X", pattern="**/*.html") # all html (returns language="html")
list_files(repo="X", path_prefix="src/templates/")
stat_file(repo="X", path="src/templates/base.html") # returns language="html", category="text"
get_stats(repo="X") # totals
# === Structural (AST) — new in 0.7.x ===
# Elements with id, forms, css-classes, links, inline blocks → AST tables
get_class(repo="X", name="cart") # outerHTML of <... id="cart">
get_class(repo="X", name="form_login") # full <form id="login">
search_class(repo="X", query="container", language="html")
get_function(repo="X", name="inline_script_42") # body of <script> at line 42
search_function(repo="X", query="inline_script", language="html")
find_symbol(repo="X", name="form_login") # exact-name lookup across all 4 tables
find_symbol(repo="X", name="class:htmx-indicator") # CSS class usage
get_imports(repo="X", module="https://unpkg.com/htmx.org@1.9.12") # who depends on this CDN
get_file_summary(repo="X", path="src/templates/base.html") # full map (functions/classes/imports/variables)
# === Body-level grep (works on inline_script bodies) ===
grep_body(repo="X", regex="fetch\\(", language="html") # in <script> blocks
grep_body(repo="X", pattern="color:", language="html") # in <style> blocks
grep_body(repo="X", regex="hx-target", language="html", path_glob="src/templates/**", context_lines=2)
# === Text-level (still works via dual-indexing) ===
read_file(repo="X", path="src/templates/base.html", line_start=1, line_end=20)
search_text(repo="X", query="DOCTYPE", language="html")
grep_text(repo="X", regex="\\{%\\s*include", path_glob="**/*.html", context_lines=1) # Jinja includes
```
`get_callers` / `get_callees` are not populated for HTML (the parser does not extract call edges between scripts).
Template engines (Jinja/Django/EJS): `{{ … }}` and `{% … %}` are tolerated as text content; surrounding HTML elements are still parsed normally.
## Quick Start
### Install via npm (easiest)
```bash
npm install -g @regsorm/code-index-mcp
```
The `postinstall` step downloads the prebuilt native binary for your platform (Windows x64, Linux x64, macOS arm64) from GitHub Releases — nothing is compiled. Then run it as an MCP server:
```bash
npx @regsorm/code-index-mcp serve --path /path/to/your/repo
```
Also published to the [official MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.Regsorm/code-index`. This wrapper ships only the public `code-index` binary (no 1C support); for `bsl-indexer` build from source.
### Build from source
```bash
git clone https://github.com/Regsorm/code-index-mcp.git
cd code-index-mcp
cargo build --release -p code-index # public binary for Python/Rust/Go/Java/JS/TS
cargo build --release -p bsl-indexer --features enrichment # extra build with 1C support + LLM enrichment
```
Binaries:
* `target/release/code-index[.exe]` — main binary (no 1C support).
* `target/release/bsl-indexer[.exe]` — full 1C support (XML metadata parsers, BSL call graph, data-links graph, MCP tools `get_object_structure` / `get_form_handlers` / `find_path_bsl` / `search_terms` / `get_data_links` / `find_data_path` / `get_register_writers`, optional LLM enrichment under cargo feature `enrichment`).
GitHub Releases publish 6 ready artifacts per tag: `code-index` × {Win, Linux, macOS} + `bsl-indexer` × {Win, Linux, macOS}.
### Set up the background daemon (v0.5+)
Portable layout: one folder for everything (binary + config + runtime files). Pointed to by `CODE_INDEX_HOME` env var.
1. Create the daemon folder and drop `code-index.exe` into it (e.g. `C:\tools\code-index\`).
2. Set the `CODE_INDEX_HOME` environment variable to point at that folder:
**Windows (persistent, user scope):**
```powershell
setx CODE_INDEX_HOME "C:\tools\code-index"
# Reopen your shell so the variable is visible.
```
**Linux** — add to `~/.bashrc` or `~/.zshrc`:
```bash
export CODE_INDEX_HOME="$HOME/.local/code-index"
```
**macOS** — same as Linux for shells; for launchd agents use `launchctl setenv`.
**Any OS — per-project fallback via `.mcp.json`** (no system env var needed):
```json
{
"mcpServers": {
"code-index": {
"command": "C:\\tools\\code-index\\code-index.exe",
"args": ["serve", "--path", "."],
"env": { "CODE_INDEX_HOME": "C:\\tools\\code-index" }
}
}
}
```
3. Create `daemon.toml` inside that folder and list the paths to watch:
```toml
[daemon]
http_port = 0 # 0 = pick free port automatically
max_concurrent_initial = 1 # folders processed sequentially during initial indexing
[[paths]]
path = "C:\\RepoUT"
[[paths]]
path = "C:\\RepoBP_1"
debounce_ms = 500 # per-folder override: react faster than the default 1500 ms
batch_ms = 1000
```
Per-folder `debounce_ms` / `batch_ms` are **optional**. If omitted, the daemon falls back to `.code-index/config.json` inside that project, and then to built-in defaults (1500 ms / 2000 ms).
4. Start the daemon (foreground):
```bash
code-index daemon run
```
Or install it as a Windows SchedLo que la gente pregunta sobre code-index-mcp
¿Qué es Regsorm/code-index-mcp?
+
Regsorm/code-index-mcp es mcp servers para el ecosistema de Claude AI. Rust-native code index MCP server with first-class 1C:Enterprise (BSL) support. Static binary, no runtime. 25 tools — 18 universal + 7 BSL-specific. Tree-sitter AST for 10 languages. Federation across multiple repos. Built for production-scale monorepos. Tiene 66 estrellas en GitHub y se actualizó por última vez today.
¿Cómo se instala code-index-mcp?
+
Puedes instalar code-index-mcp clonando el repositorio (https://github.com/Regsorm/code-index-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar Regsorm/code-index-mcp?
+
Nuestro agente de seguridad ha analizado Regsorm/code-index-mcp y le ha asignado un Trust Score de 79/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene Regsorm/code-index-mcp?
+
Regsorm/code-index-mcp es mantenido por Regsorm. La última actividad registrada en GitHub es de today, con 0 issues abiertos.
¿Hay alternativas a code-index-mcp?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega code-index-mcp en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/regsorm-code-index-mcp)<a href="https://claudewave.com/repo/regsorm-code-index-mcp"><img src="https://claudewave.com/api/badge/regsorm-code-index-mcp" alt="Featured on ClaudeWave: Regsorm/code-index-mcp" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。