经 AI Skill Hub 精选评估,AiDex 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
AiDex 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
AiDex 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/CSCSoftware/AiDex
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"aidex": {
"command": "npx",
"args": ["-y", "aidex"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 AiDex 执行以下任务... Claude: [自动调用 AiDex MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"aidex": {
"command": "npx",
"args": ["-y", "aidex"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
The persistent brain for AI coding agents.
AiDex is an MCP server that gives AI coding assistants a memory, semantic search, and live telemetry — local-first, model-agnostic. Works with any MCP-compatible AI assistant: Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, VS Code Copilot, and more.
| Category | Tools | What it does |
|---|---|---|
| **Semantic Search** 🆕 | search, settings | Hybrid / semantic / exact retrieval over code, docs & workspace. Settings tab to configure embeddings + LLM layer |
| **Index & Identifier Search** | init, query, update, remove, status | Index your project, search identifiers by name (exact/contains/starts_with), time-based filtering |
| **Signatures** | signature, signatures | Get classes + methods of any file without reading it — single file or glob pattern |
| **Project Overview** | summary, tree, describe, files | Entry points, language breakdown, file tree with stats, file listing by type |
| **Cross-Project** | link, unlink, links, scan | Link dependencies, discover indexed projects |
| **Global Search** | global_init, global_query, global_signatures, global_status, global_refresh | Search identifiers across ALL your projects — "Have I ever written X?" |
| **Guidelines** | global_guideline | Persistent AI instructions & coding conventions — shared across all projects |
| **Sessions** | session, note | Track sessions, detect external changes, leave notes for next session (with searchable history) |
| **Task Backlog** | task, tasks | Built-in task management with priorities, tags, auto-logged history, and **scheduled/recurring tasks** |
| **Log Hub** | log | Universal log receiver — any program sends logs via HTTP, queryable by the AI, live in Viewer |
| **Screenshots** | screenshot, windows | Cross-platform screen capture with LLM optimization — scale + color reduction saves up to 95% tokens |
| **Viewer** | viewer | Interactive browser UI with file tree, signatures, tasks, logs, search, and live reload |
12 languages — C#, TypeScript, JavaScript, Rust, Python, C, C++, Java, Go, PHP, Ruby, HCL/Terraform
<details> <summary><strong>Quick Examples</strong> — see it in action</summary>
```
init is calledpersist: true)query with consume: true removes returned entries — ideal for polling.aidex/ needednode --version)brew install node or nvm install 18 && nvm use 18nvm, the repo ships a .nvmrc — nvm use picks the right version automatically.aidex_session({ path: "<project>" }) — detects external changes, auto-reindexes.aidex/ does NOT exist → run aidex_init automatically (don't ask)curl -X POST http://localhost:3335/panel -H "Content-Type: application/json" \ -d '{"id":"mic","type":"plot","value":0.73,"group":"Audio","label":"Mic Level","unit":"dB"}'
// Enable embeddings on a project (one-time, ~30s for AiDex itself, cached afterwards)
aidex_init({ path: ".", embeddings: true })
// Search
aidex_search({ query: "how do we batch requests to the LLM", path: "." })
aidex_search({ query: "retry with backoff", scope: "all" }) // across every embedded project
Or use the Settings tab in the Viewer (aidex_settings({ path: ".", open: true })) — toggles for embeddings, LLM provider, model, and the privacy switch.
npm install -g aidex-mcp
That's it. Setup runs automatically after install — it detects your installed AI clients (Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, VS Code Copilot) and registers AiDex as an MCP server. It also adds usage instructions to your AI's config (~/.claude/CLAUDE.md, ~/.gemini/GEMINI.md).
To re-run setup manually: aidex setup | To unregister: aidex unsetup | To skip auto-setup: AIDEX_NO_SETUP=1 npm install -g aidex-mcp
aidex_global_init({ path: "Q:/develop" }) # Scan & register
aidex_global_init({ path: "Q:/develop", exclude: ["llama.cpp"] }) # Skip external repos
aidex_global_init({ path: "Q:/develop", index_unindexed: true }) # Auto-index all found projects
aidex_global_init({ path: "Q:/develop", index_unindexed: true, show_progress: true }) # With browser progress UI
This scans your project directory, registers all AiDex-indexed projects in a global database (~/.aidex/global.db), and reports any unindexed projects it finds by detecting project markers (.csproj, package.json, Cargo.toml, etc.).
With index_unindexed: true, it also auto-indexes all discovered projects with ≤500 code files. Larger projects are listed separately for user decision. Add show_progress: true to open a live progress UI in your browser (http://localhost:3334).
Store persistent coding conventions, review checklists, and AI instructions in a single place — shared across all projects.
aidex_global_guideline({ action: "set", key: "review", value: "Always check: error handling, null safety, no hardcoded strings" })
aidex_global_guideline({ action: "set", key: "style", value: "Use PascalCase for classes, camelCase for methods, 4-space indent" })
aidex_global_guideline({ action: "get", key: "review" }) # Retrieve a guideline
aidex_global_guideline({ action: "list" }) # Show all guidelines
aidex_global_guideline({ action: "list", filter: "code" }) # Filter by name
aidex_global_guideline({ action: "delete", key: "old-rule" }) # Remove a guideline
Use cases: - Code review checklist: Tell your AI exactly what to look for every time - Coding conventions: Store team style rules once, reference them in any project - Release checklist: Step-by-step process for shipping - Project-agnostic instructions: No more pasting the same context into every session
Guidelines are stored in ~/.aidex/global.db — available across all your projects without aidex_init. Ask your AI: "Load the review guideline and apply it to this file."
aidex_log({ action: "init" })aidex_viewer({ path: "." }) — Logs tab shows live stream// C#
await new HttpClient().PostAsJsonAsync("http://localhost:3335/log",
new { level = "info", source = "MyApp", message = "Player spawned", data = new { x = 10, y = 20 } });
```python
aidex_screenshot() # Full screen (full quality)
aidex_screenshot({ mode: "active_window" }) # Active window
aidex_screenshot({ mode: "window", window_title: "VS Code" }) # Specific window
aidex_screenshot({ scale: 0.5, colors: 2 }) # B&W, half size (best for text)
aidex_screenshot({ scale: 0.5, colors: 16 }) # 16 colors (UI readable)
aidex_screenshot({ colors: 256 }) # 256 colors (good quality)
aidex_screenshot({ mode: "region" }) # Interactive selection
aidex_screenshot({ mode: "rect", x: 100, y: 200, width: 800, height: 600 }) # Coordinates
aidex_windows({ filter: "chrome" }) # Find window titles
aidex scan Q:/develop # Find all indexed projects
aidex init ./myproject # Index a project from command line
aidex-mcpworks as an alias foraidex.
aidex_screenshot() # Full screen
aidex_screenshot({ mode: "active_window" }) # Active window
aidex_screenshot({ mode: "window", window_title: "VS Code" }) # Specific window
aidex_screenshot({ scale: 0.5, colors: 2 }) # B&W, half size (ideal for LLM)
aidex_screenshot({ colors: 16 }) # 16 colors (UI readable)
aidex_windows({ filter: "chrome" }) # Find window titles No index needed. Returns file path → use Read to view immediately.
LLM optimization strategy: Always start with aggressive settings, then retry if unreadable: 1. First try: scale: 0.5, colors: 2 (B&W, half size — smallest possible) 2. If unreadable: retry with colors: 16 (adds shading for UI elements) 3. If still unclear: scale: 0.75 or omit colors for full quality 4. Remember what works for each window/app during the session — don't retry every time. ```
A ready-to-run showcase animates all widget types (audio waveform, GPU gauges drifting through their zones, a signal generator cycling sine → sawtooth → triangle → square, latency spikes):
```bash
node scripts/demo-dashboard.mjs # endless loop, Ctrl+C to stop (clears on exit) ```
Or use the ▷ Demo button on the Debug tab — it copies the run command to your clipboard; paste it into a terminal. (The browser can't spawn a process itself.) scripts/demo-dashboard.ps1 is a one-command launcher that checks the Log Hub first.
Running it twice starts two instances that fight over the same widgets (visible flicker) — stop the old one (Ctrl+C) before starting another.
Take screenshots and reduce them up to 95% for LLM context. A typical screenshot goes from ~100 KB to ~5 KB — that's thousands of tokens saved per image.
When an Anthropic / OpenAI / OpenRouter / Ollama / HuggingFace API key is configured, AiDex can:
Privacy switch llm_send_code defaults to off — only your literal query and metadata (paths, names, anchors) are sent. Code bodies stay local. Per-project, easy to verify in Settings.
Local-first: works fully offline with pure embeddings. The LLM layer is opt-in, never required.
| Endpoint | Method | Body | Description |
|---|---|---|---|
/log | POST | { level, source, message, data? } | Single log entry |
/logs | POST | [{ ... }, ...] | Batch (multiple at once) |
/health | GET | — | Status + buffer usage |
Fields: level (debug/info/warn/error), source (app name), message (text, required), data (optional JSON), timestamp (optional, ms)
| Mode | What it does | When to use |
|---|---|---|
exact | Identifier match (same as aidex_query) | You know the name. PlayerHealth → 3 hits |
semantic | Vector KNN over embedded code+docs+workspace | You know the *concept*. "how do we cache the model" → finds getQueryEmbedder |
hybrid (default) | RRF fusion of both | Mixed queries. Robust by default |
| Question | Tool |
|---|---|
| "Where is X defined?" | aidex_query term="X" |
| "Find anything containing X" | aidex_query term="X" mode="contains" |
| "All functions starting with X" | aidex_query term="X" mode="starts_with" |
| "What methods does file Y have?" | aidex_signature file="Y" |
| "Explore all files in src/" | aidex_signatures pattern="src/**" |
| "Project overview" | aidex_summary + aidex_tree |
| "What changed recently?" | aidex_query term="X" modified_since="2h" |
| "What files changed today?" | aidex_files path="." modified_since="8h" |
| "Have I ever written X?" | aidex_global_query term="X" mode="contains" |
| "Which project has class Y?" | aidex_global_signatures term="Y" kind="class" |
| "All indexed projects?" | aidex_global_status |
AiDex 是一个全能的开发工具,集成了 33 个功能于一身,包括语义搜索、索引和标识符搜索等。它可以帮助开发者快速找到代码中的信息,提高开发效率。
AiDex 提供了多种功能,包括语义搜索、索引和标识符搜索等。语义搜索可以帮助开发者找到与查询相关的代码片段,索引和标识符搜索可以帮助开发者快速找到特定的代码信息。
AiDex 需要 Node.js 18 或更高版本来运行。它还需要 macOS、Linux 或 Windows 等操作系统来安装和运行。
安装 AiDex 可以使用 npm 安装 `aidex-mcp` 包。安装完成后,AiDex 会自动设置并注册为 MCP 服务器。
使用 AiDex 可以通过调用 `aidex_session` 函数来启动一个新的会话。会话中可以使用 `aidex_search` 函数来执行语义搜索,`aidex_query` 函数来执行索引和标识符搜索等功能。
AiDex 可以通过配置文件来设置各种参数,包括 LLM 层、MCP 服务器等。配置文件可以通过 `aidex_settings` 函数来设置。
AiDex 提供了 HTTP API 接口,包括 `/log`、`/logs`、`/health` 等接口。这些接口可以帮助开发者获取 AiDex 的日志信息、批量日志信息和 AiDex 的状态信息等。
AiDex 提供了多种使用模式,包括精确模式、语义模式等。精确模式可以帮助开发者快速找到特定的代码信息,语义模式可以帮助开发者找到与查询相关的代码片段。
AiDex是一个有潜力的开源MCP工具
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:AiDex 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | AiDex |
| 原始描述 | 开源MCP工具:MCP Server for persistent code indexing. Gives AI assistants (Claude, Gemini, Co。⭐34 · TypeScript |
| Topics | mcpai-codingcode-indexingcode-search |
| GitHub | https://github.com/CSCSoftware/AiDex |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-06-06 · 更新时间:2026-06-06 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端