AI Skill Hub 强烈推荐:CodeDB代码智能服务器 是一款优质的MCP工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
CodeDB代码智能服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
CodeDB代码智能服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/justrach/codedb
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"codedb-------": {
"command": "npx",
"args": ["-y", "codedb"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 CodeDB代码智能服务器 执行以下任务... Claude: [自动调用 CodeDB代码智能服务器 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"codedb_______": {
"command": "npx",
"args": ["-y", "codedb"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<p align="center"> <img src="assets/codedb.png" alt="codedb" width="200" /> </p>
<p align="center"> <a href="https://github.com/justrach/codedb/releases/latest"><img src="https://img.shields.io/github/v/release/justrach/codedb?style=flat-square&label=version" alt="Release" /></a> <a href="https://github.com/justrach/codedb/blob/main/LICENSE"><img src="https://img.shields.io/github/license/justrach/codedb?style=flat-square" alt="License" /></a> <img src="https://img.shields.io/badge/zig-0.16-f7a41d?style=flat-square" alt="Zig 0.16" /> <img src="https://img.shields.io/badge/status-alpha-orange?style=flat-square" alt="Alpha" /> <a href="https://deepwiki.com/justrach/codedb"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" /></a> <br /> <a href="https://trendshift.io/repositories/26207" target="_blank"><img src="https://trendshift.io/api/badge/repositories/26207" alt="justrach%2Fcodedb | Trendshift" width="250" height="55" /></a> </p>
<p align="center"> Structural indexing · Trigram search · Word index · Dependency graph · File watching · MCP + HTTP </p>
<p align="center"> <em><strong>A context engine, not an editor.</strong> codedb helps agents <strong>find and understand</strong> code — search, symbols, callers, dependencies, outlines — and hands editing back to your native tools. <code>codedb_edit</code> is only a fallback.</em> </p>
<p align="center"> <a href="#-status">Status</a> · <a href="#-install">Install</a> · <a href="#-quick-start">Quick Start</a> · <a href="#-mcp-tools">MCP Tools</a> · <a href="#-benchmarks">Benchmarks</a> · <a href="#️-architecture">Architecture</a> · <a href="#-data--privacy">Data & Privacy</a> · <a href="#-building-from-source">Building</a> </p>
---
| Feature | codedb MCP | codedb CLI | ast-grep | ripgrep | grep | ctags |
|---|---|---|---|---|---|---|
| Structural parsing | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| Trigram search index | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Inverted word index | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Dependency graph | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Version tracking | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Multi-agent locking | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Pre-indexed (warm) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| No process startup | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| MCP protocol | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Full-text search | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| Atomic file edits | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| File watcher | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
codedb = tree-sitter + search index + dependency graph + agent runtime. Zero external dependencies. Pure Zig. Single binary.
---
codedb_remote repo="justrach/merjs" action="search" query="handleRequest"
codedb_remote repo="axios/axios" action="cves" scope="runtime"
curl -fsSL https://codedb.codegraff.com/install.sh | bash
Downloads the binary for your platform and auto-registers codedb as an MCP server in Claude Code, Codex, Gemini CLI, Cursor, Windsurf, and Devin — each written directly and additively into that tool's config (only when the tool is present). The installer prints the exact codedb mcp command it registered plus hook setup pointers for Codex and Claude Code.
npx -y codedeebee mcp
Or install globally:
npm install -g codedeebee
codedb mcp
The npm package is named codedeebee (the bare codedb name is restricted on npm); it ships a thin launcher that downloads the matching native binary from GitHub Releases on postinstall and verifies the SHA256 checksum. The installed CLI is still called codedb.
Useful for MCP clients (Claude Code, Cursor, opencode, Claude Desktop) that already use npx:
{
"codedb": {
"type": "local",
"command": ["npx", "-y", "codedeebee"],
"args": ["mcp"],
"enabled": true
}
}
If codedb update fails on an older release, rerun the installer:
curl -fsSL https://codedb.codegraff.com/install.sh | bash
This replaces the codedb binary with the latest GitHub Release and keeps your existing MCP registrations, config, caches, and snapshots. Use this path for any release whose built-in updater cannot fetch release checksums.
codedb mcp /path/to/your/project ```
Requirements: Zig 0.16+
git clone https://github.com/justrach/codedb.git
cd codedb
zig build # debug build
zig build -Doptimize=ReleaseFast # release build
zig build test # run tests
zig build bench # run benchmarks
Binary: zig-out/bin/codedb
```bash
| Metric | v0.2.56 | v0.2.57 | Delta |
|---|---|---|---|
| Steady-state RSS | 1,867 MB | 1,706 MB | −161 MB |
git subprocesses / min (idle) | ~30 | ~0 | **mtime-gated** |
The watcher now stats .git/HEAD mtime before forking git rev-parse HEAD. On an idle repo the subprocess never fires.
| Command | Description |
|---|---|
codedb tree | Show file tree with language and symbol counts |
codedb outline <path> | List all symbols in a file |
codedb find <name> | Find where a symbol is defined |
codedb search <query> | Full-text search (trigram, case-insensitive) |
codedb search --regex <pattern> | Regex search |
codedb word <identifier> | Exact word lookup via inverted index |
codedb read <path> | Read file contents (supports -L FROM-TO, --compact) |
codedb hot | Recently modified files |
codedb snapshot | Write codedb.snapshot to project root |
codedb serve | HTTP daemon on :7719 |
codedb mcp [path] | JSON-RPC/MCP server over stdio |
codedb update | Self-update to the latest release; if it fails on an older build, rerun the curl installer above |
codedb nuke | Uninstall codedb, remove caches/snapshots, and deregister MCP integrations |
codedb --version | Print version |
Options: --no-telemetry (or set CODEDB_NO_TELEMETRY env var)
codedb repo (20 files, 12.6k lines):
| Query | codedb MCP | codedb CLI | ast-grep | ripgrep | grep | MCP speedup |
|---|---|---|---|---|---|---|
| File tree | **0.04 ms** | 52.9 ms | — | — | — | **1,253x** vs CLI |
Symbol search (init) | **0.10 ms** | 54.1 ms | 3.2 ms | 6.3 ms | 6.5 ms | **549x** vs CLI |
Full-text search (allocator) | **0.05 ms** | 60.7 ms | 3.2 ms | 5.3 ms | 6.6 ms | **1,340x** vs CLI |
Word index (self) | **0.04 ms** | 59.7 ms | n/a | 7.2 ms | 6.5 ms | **1,404x** vs CLI |
| Structural outline | **0.05 ms** | 53.5 ms | 3.1 ms | — | 2.4 ms | **1,143x** vs CLI |
| Dependency graph | **0.05 ms** | 2.2 ms | n/a | n/a | n/a | **45x** vs CLI |
merjs repo (100 files, 17.3k lines):
| Query | codedb MCP | codedb CLI | ast-grep | ripgrep | grep | MCP speedup |
|---|---|---|---|---|---|---|
| File tree | **0.05 ms** | 54.0 ms | — | — | — | **1,173x** vs CLI |
Symbol search (init) | **0.07 ms** | 54.4 ms | 3.4 ms | 6.3 ms | 3.6 ms | **758x** vs CLI |
Full-text search (allocator) | **0.03 ms** | 54.1 ms | 2.9 ms | 5.1 ms | 3.7 ms | **1,554x** vs CLI |
Word index (self) | **0.04 ms** | 54.7 ms | n/a | 6.3 ms | 4.2 ms | **1,518x** vs CLI |
| Structural outline | **0.04 ms** | 54.9 ms | 3.4 ms | — | 2.5 ms | **1,243x** vs CLI |
rtk-ai/rtk repo (329 files) — codedb vs rtk vs ripgrep vs grep:
| Tool | Search "agent" | Speedup |
|---|---|---|
| codedb (pre-indexed) | **0.065 ms** | baseline |
| rtk | 37 ms | 569x slower |
| ripgrep | 45 ms | 692x slower |
| grep | 80 ms | 1,231x slower |
高质量MCP实现,针对性强。800星用户认可度高,Zig语言选择创新。代码智能分析功能实用,适合专业开发工具链集成。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ BSD 3-Clause — 宽松协议,可商用修改分发,禁止使用原作者名称进行背书宣传。
总体来看,CodeDB代码智能服务器 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | codedb |
| 原始描述 | 开源MCP工具:Zig code intelligence server and MCP toolset for AI agents. Fast tree, outline, 。⭐800 · Zig |
| Topics | 代码分析MCP协议Zig语言AI代理代码智能 |
| GitHub | https://github.com/justrach/codedb |
| License | BSD-3-Clause |
| 语言 | Zig |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:BSD-3-Clause · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端