Content
center">
<img src/public/logo.svg" width="120" alt="IGraph Logo" />
</p>
<h1 align="center">IGraph</h<p align="center">
Code Knowledge Graph Construction Tool — Parsing → Semantic → Vectorization
</p>
<p align="center">
<a href="https://www.npmjs.com/package/igraph-cli"><img src="https://img.shields.io/npm/v/igraph-cli?color=blue&label=npm" alt="npm version" /></a>
<a href="https://github.com/Ychangqing/IGraph/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Ychangqing/IGraph" alt="license" /></a>
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="node version" /></a>
<a href="https://github.com/Ychangqing/IGraph/actions"><imghttps://img.shields.io/github/actions/workflow/status/Ychangqing/IGraph/deploy-docs.yml?label=docs" alt="docs build" /></a>
<a href="https://github.com/Ychangqing/IGraph/issues"><img src="https://img.shields.io/github/issues/Ychangqing/IGraph" alt="issues" /></a>
</p align="center">
<a href="https://ychangqing.github.io/IGraph/">Official Documentation</a> ·
<ahttps://ychangqing.github.io/IGraph/guide/quick-start"></a> ·
<a href="https://ychangqing/IGraph/reference/cli">CLI Reference</a> ·
href="https://ychangqing.github.io/IGraph/features/mcp">MCP Integration</a>
</p>
---
## 🎯 Introductionraph transforms code repositories into knowledge graphs with symbol nodes and call relation edges, augmented with LLM semantic summaries and vector indexes. It supports multimodal resources like PRD and DB Schema, with an integrated MCP Server for seamless AI assistant integration.
## ✨ Core Capabilities
| Capability | Description |
|------------|-------------|
| 🌳 Multi-Language Parsing | Tree-sitter driven 5-pass pipeline, supporting TypeScript, JavaScript, Python, Go, |
| 🧠 Semantic Summ | LLM-generated summaries for files and symbols, with heuristic fallback when `--no-llm` is| -Channel Retrieval | BGE-M3 vector + FTS5 full-text search, fused with RRF |
| 📎 Multimodal Mounting | PRD documents and DB via semantic similarity |
| ⚡ Incremental Building | SHA--based updates, only rebuilding affected files |
| 🤖 MCP Integration | One-command integration with Cursor and Claude Code |
## 📦 Installation
**Requirements:** Node.js >= 18, C/C++ build toolchain (native compilation dependencies)
```bash
# Global installation
npm install -g igraph-cli
# or local installation
npm install igraph-cli
```
<details>
<summary>Build Toolchain Installation</summary>
- **macOS:** `xcode-select --install`
- **Linux:** `sudo apt install build-essential python3`
- **Windows:** Visual Studio Build Tools
</details>
## 🚀 Quick Start
```bash
# 1
igraph init
#. Configure credentials (global shared across projects)
igraph apiKey sk-...
3. Build the graph
igraph build
# 4. Server with AI assistants
igraph register
# 5. querying
igraph query " user authentication implemented?"
```
> Without an API Key, use build --no-llm heuristic fallback, and `query` / `serve` will FTS5 search more usage, see the documentation](https://ychangqing.github.io/IGraph/guide).
## 🤖 MCP Integration
```bash
# Automatically detect and register with installed AI assistants
igraph register
# Specify target
igraph register --target claude
igraph register --target cursor
# Unigraph unregister
```
After registration, AI assistants can directly call 4 read-only retrieval tools:
| Tool | Description |
|------|-------------|
| `igraph_explore` | Natural language search with graph context expansion |
igraph_node` | Retrieve node symbol name |
| `igraph_file` | Get file graph information by file path |
| `igraph_related` | Expand related resources for a symbol |
See [MCP Tool documentation](https://ychangqing.github.io/IGraph/reference/mcp-tools) for details.
## 📋
| Command | Description |
-------------|
| `igraph | Initialize configuration |
| `` | Build the graphal) |
| `igraph | Clear and rebuild from `igraph status` | View graph status |
| `igraph query` | Natural language search |
| `igraph eval` | Evaluate search quality |
| `igraph serve` | Start MCP Server |
| `igraph register` | Register with AI assistants |
| `igraph mount prd` | Mount PRD documents |
| `igraph mount db` | Mount DB Schema |
igraph config` | configuration |
## Languages and Formats
| Category Type | Extensions |
|-----------|-----------------|------------|
| Code | TypeScript | `.ts`,`, `.mts`, `. |
| Code | JavaScriptjs`, `.jsx`,js`, `.cjs` |
| Code | Python | `. `.pyi` |
| Code | Go | `.go` |
| Code | Java | `.java| Multimodal | documents | `.md`,`, `.pdf`, `.docx` |
| Multimodal | | `.sql`, `.json`, `.xlsx` |
## 🛠 Development
```bash
npm run dev # watch mode
npm test # vitest
npm run lint
npm run typecheck checking
npm run build build
```
## 🤝 Contributing
Welcome to submit issues and pull requests! See [CONTRIBUT](CONTRIBUTING.md) for details.
## 📄 License
[MIT](LICENSE) ©4-present IGraph