Mimir 是一个基于 Go 的代码智能引擎,它将你的仓库索引进知识图谱,并通过 MCP、HTTP API 和交互式网页界面向 AI 代理展示。
概览
Mimir 是将你的仓库索引进知识图谱,并通过 MCP、HTTP API 和交互式网页界面向 AI 代理展示的软件。 Mimir构建了一个可搜索的代码库知识图谱,帮助AI代理(以及人类)更快理解代码库。 纯 Go(零 CGO),支持八种语言(TS、JS、Go、Python、Rust、Java、C、C++),通过 git-diff 进行增量索引,Louvain 社区检测,嵌入式网页界面。 详细安装指南请参见docs/installation.md。 AI代理通过MCP获得了12种工具的访问权限: 1. : 使用 query() 进行语义搜索 2.: 使用 context() 理解符号 3.: 使用 find_referencing() 表示轻量级 1 跳调用列表 4.: 使用 get_symbols_overview() 查看文件定义 5.: 运行 symbol_coordinates() 获取准确位置,然后对应爆炸半径 6 的 impact() 输入。
概述(AI 翻译)
Mimir 是一个基于 Go 的代码智能引擎,它将你的仓库索引到知识图谱中,并通过 MCP、HTTP API 和交互式 Web 界面向 AI 代理展示。
什么是米米尔?
Mimir构建了一个可搜索的代码库知识图谱,帮助AI代理(以及人类)更快理解代码库。
| 使用场景 | 米米尔如何帮助 |
|---|---|
| **AI 代理(MCP)**7 个用于语义搜索、冲击分析和爆炸半径查询的工具 | |
| 人类(Web UI) | 交互式力导图,可视化探索代码结构 |
| Teams(重构) | 编辑前进行影响分析——查看哪些破坏性变更影响 |
为什么是米米尔?
| 公制 | GitNexus(Node.js) | Mimir(Go) |
|---|---|---|
| 冷索引(1000个文件) | ~45秒 | ** ` |
mimir serve |
启动HTTP服务器+网页界面(默认:端口7842) | |
mimir mcp |
启动MCP标准服务器 | |
mimir daemon start/stop/status |
管理背景MCP守护进程 | |
mimir daemon logs [lines] |
查看守护进程日志(默认:30行) | |
mimir list |
列表索引仓库 | |
mimir status [name] |
显示索引状态 | |
mimir clean |
移除仓库索引 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Mimir — Code Intelligence for AI Agents
Mimir is a Go-based code intelligence engine that indexes your repository into a knowledge graph and exposes it to AI agents via MCP, HTTP API, and an interactive web UI.
What is Mimir?
Mimir builds a searchable knowledge graph of your codebase that helps AI agents (and humans) understand it faster.
| Use Case | How Mimir Helps |
|---|---|
| AI Agents (MCP) | 7 tools for semantic search, impact analysis, and blast radius queries |
| Humans (Web UI) | Interactive force-directed graph to explore code structure visually |
| Teams (Refactors) | Impact analysis before editing — see what breaking changes affect |
Why Mimir?
| Metric | GitNexus (Node.js) | Mimir (Go) |
|---|---|---|
| Cold index (1,000 files) | ~45s | < 8s |
| Incremental re-index | ~45s (full) | < 2s |
| Hybrid search latency | ~300ms | < 80ms |
| Binary size | 350 MB | < 20 MB |
| RAM during index | ~800 MB | < 120 MB |
Key improvements: Pure Go (zero CGO), 8-language support (TS, JS, Go, Python, Rust, Java, C, C++), incremental indexing via git-diff, Louvain community detection, embedded web UI.
Quick Start
Step 1: Install
# One-line (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/thuongh2/git-mimir/main/install.sh | sh
# Or via Go
go install github.com/thuongh2/git-mimir/cmd/mimir@latest
# Or download binary from GitHub Releases
Step 2: Index Your Code
# Full index with embeddings (requires ollama or OpenAI)
mimir analyze /path/to/your-project
# Faster — graph + BM25 only (no embeddings)
mimir analyze --skip-embeddings /path/to/your-project
# Skip auto-setup for manual control
mimir analyze --skip-daemon --skip-hooks --skip-skills /path/to/your-project
Step 3: Use It
Option A: Web UI (Humans)
mimir serve
# Open http://localhost:7842
Option B: MCP (AI Agents)
mimir daemon start # Start background MCP server
mimir setup # Auto-configure Claude Code, VS Code, Cursor, etc.
Installation
| Method | Command |
|---|---|
| One-line (Linux/macOS) | `curl -fsSL https://raw.githubusercontent.com/thuongh2/git-mimir/main/install.sh |
| Go Install | go install github.com/thuongh2/git-mimir/cmd/mimir@latest |
| Download Binary | GitHub Releases |
| From Source | git clone && cd git-mimir && make build |
For detailed installation guide, see docs/installation.md.
CLI Reference
| Command | Description |
|---|---|
mimir analyze |
Index repository with auto-setup |
mimir serve |
Start HTTP server + Web UI (default: port 7842) |
mimir mcp |
Start MCP stdio server |
mimir daemon start/stop/status |
Manage background MCP daemon |
mimir daemon logs [lines] |
View daemon logs (default: 30 lines) |
mimir list |
List indexed repositories |
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add thuongh2/git-mimir