AiDex
AiDex
AI 컨텍스트 창의 80%를 코드 검색에 낭비하지 마세요.
AiDex는 지속적이고 미리 구축된 인덱스를 통해 AI 코딩 어시스턴트가 전체 코드베이스에 즉시 액세스할 수 있도록 하는 MCP 서버입니다. Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, VS Code Copilot 등 모든 MCP 호환 AI 어시스턴트와 함께 작동합니다.


포함된 기능 — 하나의 서버에 30개의 도구
카테고리 | 도구 | 기능 |
검색 및 인덱싱 |
| 프로젝트 인덱싱, 이름별 식별자 검색(정확/포함/시작), 시간 기반 필터링 |
시그니처 |
| 파일을 읽지 않고도 클래스 + 메서드 가져오기 — 단일 파일 또는 glob 패턴 |
프로젝트 개요 |
| 진입점, 언어 분석, 통계가 포함된 파일 트리, 유형별 파일 목록 |
프로젝트 간 연결 |
| 종속성 연결, 인덱싱된 프로젝트 검색 |
전역 검색 |
| 모든 프로젝트를 한 번에 검색 — "X를 작성한 적이 있는가?" |
가이드라인 |
| 지속적인 AI 지침 및 코딩 규칙 — 모든 프로젝트에서 공유 |
세션 |
| 세션 추적, 외부 변경 사항 감지, 다음 세션을 위한 메모 남기기(검색 가능한 기록 포함) |
작업 백로그 |
| 우선순위, 태그, 자동 기록된 이력 및 예약/반복 작업이 포함된 내장 작업 관리 |
로그 허브 |
| 범용 로그 수신기 — 모든 프로그램이 HTTP를 통해 로그를 전송하고, AI가 쿼리하며, 뷰어에서 실시간 확인 |
스크린샷 |
| LLM 최적화가 포함된 크로스 플랫폼 화면 캡처 — 크기 조정 + 색상 감소로 토큰을 최대 95% 절약 |
뷰어 |
| 파일 트리, 시그니처, 작업, 로그 및 실시간 새로고침이 포함된 대화형 브라우저 UI |
11개 언어 — C#, TypeScript, JavaScript, Rust, Python, C, C++, Java, Go, PHP, Ruby
# Find where "PlayerHealth" is defined — 1 call, ~50 tokens
aidex_query({ term: "PlayerHealth" })
→ Engine.cs:45, Player.cs:23, UI.cs:156
# All methods in a file — without reading the whole file
aidex_signature({ file: "src/Engine.cs" })
→ class GameEngine { Update(), Render(), LoadScene(), ... }
# What changed in the last 2 hours?
aidex_query({ term: "render", modified_since: "2h" })
# Search across ALL your projects at once
aidex_global_query({ term: "TransparentWindow", mode: "contains" })
→ Found in: LibWebAppGpu (3 hits), DebugViewer (1 hit)
# Leave a note for your next session
aidex_note({ path: ".", note: "Test the parser fix after restart" })
# Create a task while working
aidex_task({ path: ".", action: "create", title: "Fix edge case in parser", priority: 1, tags: "bug" })목차
문제점
AI 어시스턴트가 코드를 검색할 때마다 발생하는 일:
Grep을 통해 수천 개의 파일을 훑음 → 수백 개의 결과가 컨텍스트를 가득 채움
구조를 이해하기 위해 파일을 하나씩 읽음 → 더 많은 컨텍스트 소비
세션이 끝나면 모든 것을 잊음 → 처음부터 다시 반복
"X가 어디에 정의되어 있는가?"라는 질문 하나가 2,000개 이상의 토큰을 소모할 수 있습니다. 이를 10번만 반복해도 탐색만으로 컨텍스트의 절반을 소모하게 됩니다.
해결책
한 번 인덱싱하고 영원히 쿼리하세요:
# Before: grep flooding your context
AI: grep "PlayerHealth" → 200 hits in 40 files
AI: read File1.cs, File2.cs, File3.cs...
→ 2000+ tokens consumed, 5+ tool calls
# After: precise results, minimal context
AI: aidex_query({ term: "PlayerHealth" })
→ Engine.cs:45, Player.cs:23, UI.cs:156
→ ~50 tokens, 1 tool call결과: 코드 탐색에 사용되는 컨텍스트 50-80% 감소.
왜 그냥 Grep을 쓰지 않을까요?
Grep/Ripgrep | AiDex | |
컨텍스트 사용량 | 검색당 2000+ 토큰 | ~50 토큰 |
결과 | 모든 텍스트 일치 | 식별자만 |
정밀도 |
|
|
지속성 | 매번 새로 시작 | 세션 간 인덱스 유지 |
구조 | 단순 텍스트 검색 | 메서드, 클래스, 유형 인식 |
Grep의 진짜 비용: 모든 grep 결과에는 주변 컨텍스트가 포함됩니다. 대규모 프로젝트에서 User를 검색하면 수백 개의 결과(주석, 문자열, 부분 일치)가 나옵니다. AI는 이 모든 것을 읽으며 노이즈에 컨텍스트 토큰을 낭비합니다.
AiDex는 식별자를 인덱싱합니다: Tree-sitter를 사용하여 코드를 실제로 파싱합니다. User를 검색하면 "user"를 언급하는 모든 주석이 아니라 클래스 정의, 메서드 매개변수, 변수 선언을 얻게 됩니다.
작동 원리
프로젝트를 한 번 인덱싱 (1,000개 파일당 약 1초)
aidex_init({ path: "/path/to/project" })AI가 grep 대신 인덱스를 검색
aidex_query({ term: "Calculate", mode: "starts_with" }) → All functions starting with "Calculate" + exact line numbers aidex_query({ term: "Player", modified_since: "2h" }) → Only matches changed in the last 2 hours전체 파일을 읽지 않고도 파일 개요 확인
aidex_signature({ file: "src/Engine.cs" }) → All classes, methods, and their signatures
인덱스는 .aidex/index.db(SQLite)에 저장되며, 빠르고 이식성이 뛰어나며 외부 종속성이 없습니다.
기능
Tree-sitter 파싱: 정규식이 아닌 실제 코드 파싱 — 식별자를 인덱싱하고 키워드와 노이즈는 무시
검색당 ~50 토큰: grep 사용 시 2000+ 토큰 대비 — AI가 실제 작업을 위한 컨텍스트를 유지
지속적 인덱스: 세션 간 유지 — 재스캔이나 재읽기 불필요
증분 업데이트: 전체 프로젝트가 아닌 변경된 단일 파일만 재인덱싱
시간 기반 필터링: 지난 1시간, 하루, 일주일 동안 변경된 내용 찾기
자동 정리: 제외된 파일(예: 빌드 출력물)은 인덱스에서 자동으로 제거
제로 종속성: WAL 모드의 SQLite — 단일 파일, 빠르고 이식성 높음
지원 언어
언어 | 확장자 |
C# |
|
TypeScript |
|
JavaScript |
|
Rust |
|
Python |
|
C |
|
C++ |
|
Java |
|
Go |
|
PHP |
|
Ruby |
|
빠른 시작
1. 설치
npm install -g aidex-mcp끝입니다. 설치 후 설정이 자동으로 실행됩니다. 설치된 AI 클라이언트(Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, VS Code Copilot)를 감지하고 AiDex를 MCP 서버로 등록합니다. 또한 AI 설정(~/.claude/CLAUDE.md, ~/.gemini/GEMINI.md)에 사용 지침을 추가합니다.
수동으로 설정을 다시 실행하려면: aidex setup | 등록 해제하려면: aidex unsetup | 자동 설정을 건너뛰려면: AIDEX_NO_SETUP=1 npm install -g aidex-mcp
2. 또는 AI 어시스턴트에 수동으로 등록
Claude Code의 경우 (~/.claude/settings.json 또는 ~/.claude.json):
{
"mcpServers": {
"aidex": {
"type": "stdio",
"command": "aidex",
"env": {}
}
}
}Claude Desktop의 경우 (Windows의 경우 %APPDATA%/Claude/claude_desktop_config.json):
{
"mcpServers": {
"aidex": {
"command": "aidex"
}
}
}참고:
aidex와aidex-mcp모두 명령어로 사용할 수 있습니다.
중요: 설정의 서버 이름이 MCP 도구 접두사를 결정합니다. 위와 같이
"aidex"를 사용하세요. 그러면aidex_query,aidex_signature와 같은 도구 이름을 사용할 수 있습니다. 다른 이름(예:"codegraph")을 사용하면 접두사가 그에 따라 변경됩니다.
Gemini CLI의 경우 (~/.gemini/settings.json):
{
"mcpServers": {
"aidex": {
"command": "aidex"
}
}
}VS Code Copilot의 경우 (명령 팔레트에서 MCP: Open User Configuration 실행):
{
"servers": {
"aidex": {
"type": "stdio",
"command": "aidex"
}
}
}기타 MCP 클라이언트의 경우: MCP 서버 구성에 대한 클라이언트 문서를 참조하세요.
3. AI가 실제로 사용하도록 만들기
AI의 지침(예: Claude Code의 경우 ~/.claude/CLAUDE.md 또는 해당 AI 클라이언트의 지침)에 추가하세요. 이는 AI에게 grep 대신 AiDex를 언제 어떻게 사용할지 알려줍니다:
## AiDex - Persistent Code Index (MCP Server)
AiDex provides fast, precise code search through a pre-built index.
**Always prefer AiDex over Grep/Glob for code searches.**
### REQUIRED: Before using Grep/Glob/Read for code searches
코드 검색을 원하나요? ├── .aidex/ 존재 → 중단! 대신 AiDex 사용 ├── .aidex/ 없음 → aidex_init 실행(묻지 말고), 그 후 AiDex 사용 └── Config/Logs/Text → Grep/Read 사용 가능
**NEVER do this when .aidex/ exists:**
- ❌ `Grep pattern="functionName"` → ✅ `aidex_query term="functionName"`
- ❌ `Grep pattern="class.*Name"` → ✅ `aidex_query term="Name" mode="contains"`
- ❌ `Read file.cs` to see methods → ✅ `aidex_signature file="file.cs"`
- ❌ `Glob pattern="**/*.cs"` + Read → ✅ `aidex_signatures pattern="**/*.cs"`
### Session-Start Rule (REQUIRED — every session, no exceptions)
1. Call `aidex_session({ path: "<project>" })` — detects external changes, auto-reindexes
2. If `.aidex/` does NOT exist → run `aidex_init` automatically (don't ask)
3. If a session note exists → **show it to the user** before continuing
4. **Before ending a session:** always leave a note about what to do next
### Question → Right Tool
| 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` |
### Search Modes
- **`exact`** (default): Finds only the exact identifier — `log` won't match `catalog`
- **`contains`**: Finds identifiers containing the term — `render` matches `preRenderSetup`
- **`starts_with`**: Finds identifiers starting with the term — `Update` matches `UpdatePlayer`, `UpdateUI`
### All Tools (30)
| Category | Tools | Purpose |
|----------|-------|---------|
| Search & Index | `aidex_init`, `aidex_query`, `aidex_update`, `aidex_remove`, `aidex_status` | Index project, search identifiers (exact/contains/starts_with), time filter |
| Signatures | `aidex_signature`, `aidex_signatures` | Get classes + methods without reading files |
| Overview | `aidex_summary`, `aidex_tree`, `aidex_describe`, `aidex_files` | Entry points, file tree, file listing by type |
| Cross-Project | `aidex_link`, `aidex_unlink`, `aidex_links`, `aidex_scan` | Link dependencies, discover projects |
| Global Search | `aidex_global_init`, `aidex_global_query`, `aidex_global_signatures`, `aidex_global_status`, `aidex_global_refresh` | Search across ALL projects |
| Guidelines | `aidex_global_guideline` | Persistent AI instructions & conventions (key-value, global) |
| Sessions | `aidex_session`, `aidex_note` | Track sessions, leave notes (with searchable history) |
| Tasks | `aidex_task`, `aidex_tasks` | Built-in backlog with priorities, tags, summaries, auto-logged history, scheduled/recurring tasks |
| Log Hub | `aidex_log` | Universal log receiver — any program sends logs via HTTP, AI queries them, live in Viewer |
| Screenshots | `aidex_screenshot`, `aidex_windows` | Screen capture with LLM optimization (scale + color reduction, no index needed) |
| Viewer | `aidex_viewer` | Interactive browser UI with file tree, signatures, tasks, and live logs |
**11 languages:** C#, TypeScript, JavaScript, Rust, Python, C, C++, Java, Go, PHP, Ruby
### Session Notes
Leave notes for the next session — they persist in the database:aidex_note({ path: ".", note: "재시작 후 수정 사항 테스트" }) # 쓰기 aidex_note({ path: ".", note: "엣지 케이스도 확인", append: true }) # 추가 aidex_note({ path: "." }) # 읽기 aidex_note({ path: ".", search: "parser" }) # 기록 검색 aidex_note({ path: ".", clear: true }) # 지우기
- **Before ending a session:** automatically leave a note about next steps
- **User says "remember for next session: ..."** → write it immediately
### Task Backlog
Track TODOs, bugs, and features right next to your code index:aidex_task({ path: ".", action: "create", title: "버그 수정", priority: 1, tags: "bug" }) aidex_task({ path: ".", action: "update", id: 1, status: "done" }) aidex_task({ path: ".", action: "log", id: 1, note: "근본 원인 발견" }) aidex_tasks({ path: ".", status: "active" })
예약 및 반복 작업
aidex_task({ path: ".", action: "create", title: "PR 상태 확인", due: "3d", interval: "3d", task_action: "gh pr list" })
Priority: 1=high, 2=medium, 3=low | Status: `backlog → active → done | cancelled`
### Global Search (across all projects)
aidex_global_init({ path: "/path/to/all/repos" }) # 스캔 및 등록 aidex_global_init({ path: "...", index_unindexed: true }) # + 소규모 프로젝트 자동 인덱싱 aidex_global_query({ term: "TransparentWindow", mode: "contains" }) # 어디서나 검색 aidex_global_signatures({ term: "Render", kind: "method" }) # 어디서나 메서드 찾기 aidex_global_status({ sort: "recent" }) # 모든 프로젝트 나열
### Screenshots
aidex_screenshot() # 전체 화면 aidex_screenshot({ mode: "active_window" }) # 활성 창 aidex_screenshot({ mode: "window", window_title: "VS Code" }) # 특정 창 aidex_screenshot({ scale: 0.5, colors: 2 }) # 흑백, 절반 크기 (LLM에 최적) aidex_screenshot({ colors: 16 }) # 16색 (UI 읽기 가능) aidex_windows({ filter: "chrome" }) # 창 제목 찾기
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.4. 프로젝트 인덱싱
AI에게 요청하세요: "AiDex로 이 프로젝트를 인덱싱해줘"
또는 AI 채팅에서 수동으로:
aidex_init({ path: "/path/to/your/project" })사용 가능한 도구
도구 | 설명 |
| 프로젝트 인덱싱 (.aidex/ 생성) |
| 용어별 검색 (정확/포함/시작) |
| 단일 파일의 클래스 + 메서드 가져오기 |
| 여러 파일의 시그니처 가져오기 (glob) |
| 변경된 단일 파일 재인덱싱 |
| 삭제된 파일을 인덱스에서 제거 |
| 프로젝트 개요 |
| 통계가 포함된 파일 트리 |
| 요약에 문서 추가 |
| 다른 인덱싱된 프로젝트 연결 |
| 연결된 프로젝트 제거 |
| 연결된 프로젝트 나열 |
| 인덱스 통계 |
| 디렉토리 트리에서 인덱싱된 프로젝트 찾기 |
| 유형별 프로젝트 파일 나열 (코드/설정/문서/자산) |
| 세션 메모 읽기/쓰기 (세션 간 유지) |
| 세션 시작, 외부 변경 사항 감지, 자동 재인덱싱 |
| 브라우저에서 대화형 프로젝트 트리 열기 |
`aid |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CSCSoftware/AiDex'
If you have feedback or need assistance with the MCP directory API, please join our Discord server