
Docdex
io.github.bekirdag由 GitHub 帳號 bekirdag 發布v0.2.101更新於 Nov 7, 2026
Fast per-repo documentation indexer and full-text search MCP server for codebases.
概覽
本地優先的索引與搜尋常駐服務,讓 AI 助理對程式碼倉庫的文件與原始碼進行排序檢索,並提供持久記憶。
- 可以做什麼
- 對倉庫文件與原始碼做全文檢索,回傳依意圖排序的結構化結果
- 透過 AST 與影響圖查找程式碼定義並追蹤下游相依性,支援多種語言
- 儲存與回想倉庫事實、代理偏好與匯入的對話紀錄,並產生日誌條目與喚醒摘要
- 查詢由封存對話衍生的時序知識圖譜,包含實體、邊與事件
- 由同一個本機常駐服務同時供應 CLI、HTTP 與 MCP 用戶端,可選擇透過本機 LLM 過濾進行網路補充
- 適用情境
- 適合需要針對特定程式碼庫取得可靠且私密的上下文、而不想依賴雜訊多的 grep 結果或把程式碼上傳到託管向量資料庫的情境,也適合希望跨對話記住專案事實與歷史工作階段的情況。
- 執行需求
- 以本機程序執行:安裝 npm 套件(需 Node.js 18 或更新版本),會下載對應作業系統的執行檔;Windows 上須先安裝 Microsoft Visual C++ 2015-2022 可轉散發套件(x64)。需先為倉庫建立索引並啟動常駐服務,再把用戶端指向本機 MCP 端點(預設為 127.0.0.1:28491 的 HTTP/SSE,或本機 IPC)。可選用 Ollama 等本機 LLM 服務做嵌入與過濾。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Docdex,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[Website] [GitHub Actions Workflow Status] [GitHub License] [GitHub Release] [Made with Rust]
Docdex
Turn your repository into fast, private context that humans and AI can trust.
Docdex is a local-first indexer and search daemon for documentation and source code. It sits between your raw files and your AI assistant, providing deterministic search, code intelligence, and persistent memory without ever uploading your code to a cloud vector store.
⚡ Why Docdex?
Most AI tools rely on "grep" (fast but dumb) or hosted RAG (slow and requires uploads). Docdex runs locally, understands code structure, and gives your AI agents a persistent memory.
🚀 Features
- 📚 Document Indexing: Rank and summarize repo documentation instantly.
- 🧠 AST & Impact Graph: Search by function intent and track downstream dependencies (supports Rust, Python, JS/TS, Go, Java, C++, and more).
- 💾 Repo Memory: Stores project facts, decisions, and notes locally.
- 👤 Agent Memory: Remembers user preferences (e.g., "Use concise bullet points") across different repositories.
- 🗂️ Conversation Memory: Imports transcripts, keeps wake-up bundles compact, and derives repo-scoped summaries, diary entries, and working memory.
- 🕸️ Temporal Knowledge Graph: Extracts entities, edges, episodes, and code-facing links from archived conversations for timeline and neighborhood queries.
- 🧭 Wake-Up + Project Map Context: Injects compact wake-up bundles, profile truth, and cached
Project map:context into OpenAI-compatible chat completions. - 🔌 MCP Native: Auto-configures for tools like Claude Desktop, Cursor, and Windsurf.
- 🌐 Web Enrichment: Optional web search with local LLM filtering through detected local LLM services.
📦 Set-and-Forget Install
Install once, point your agent at Docdex, and it keeps working in the background.
1. Install via npm (Recommended)
Requires Node.js >= 18. This will download the correct binary for your OS (macOS, Linux, Windows).
[!WARNING] Windows requirement: Docdex uses the MSVC runtime. Install the Microsoft Visual C++ Redistributable 2015-2022 (x64) before running
docdex/docdexd.
- Winget:
winget install --id Microsoft.VCRedist.2015+.x64- Manual: download
vc_redist.x64.exefrom Microsoft: https://aka.ms/vs/17/release/vc_redist.x64.exe- If
docdexdexits with0xC0000135, the runtime is missing.
2. Auto-Configuration
If you have any of the following clients installed, Docdex automatically configures them to use the local MCP endpoint (daemon HTTP/SSE):
Claude Desktop, Cursor, Windsurf, Cline, Roo Code, Continue, VS Code, PearAI, Void, Zed, Codex.
Note: Restart your AI client after installation.
🛠️ Usage Workflow
1. Index a Repository
Run this once to build the index and graph data.
2. Start the Daemon
Start the shared server. This handles HTTP requests and MCP connections.
3. Ask Questions (CLI)
You can chat directly from the terminal.
🔌 Model Context Protocol (MCP)
Docdex is designed to be the "brain" for your AI agents. It exposes an MCP endpoint that agents connect to.
Architecture
Use the daemon HTTP/SSE endpoint. For sandboxed clients, Docdex can also serve MCP over local IPC (Unix socket or Windows named pipe), while HTTP/SSE remains the default for most MCP clients.
Manual Configuration
If you need to configure your client manually:
JSON (Claude/Cursor/Continue):
Claude Code (CLI) JSON (~/.claude.json or project .mcp.json):
TOML (Codex):
🤖 capabilities & Examples
1. AST & Impact Analysis
Don't just find the string "addressGenerator"; find the definition and what it impacts.
2. Memory System
Docdex allows you to store "facts" that retrieval helps recall later.
Repo Memory (Project specific):
Agent Memory (User preference):
3. Conversation Memory
Conversation memory is repo-scoped by default and optional. Repo-less sessions must use an explicit conversation namespace so they never silently reuse a repo archive. The subsystem imports transcripts, stores episodic summaries and working memory, derives diary entries and temporal KG facts into knowledge.db, and keeps recall under a strict wake-up budget.
The CLI archive, diary, and hook commands are HTTP-backed wrappers, so start docdex start or docdexd daemon first.
4. Local LLM Services
Docdex detects supported local LLM services before it suggests installing anything. It can reuse Ollama, vLLM, llama.cpp-compatible OpenAI endpoints, LM Studio, LocalAI, SGLang, TGI-compatible deployments, and healthy local mcoda agents when they are already present. Ollama remains the recommended fallback because it is the easiest guided setup path.
- Setup: Run
docdex setupfor an interactive wizard that lists detected services, models, embedding candidates, and local delegation agents. - Inspect: Run
docdexd llm detect --jsonordocdexd llm diagnostics --jsonto see why a service/model was selected, skipped, or marked unhealthy. - Manual Ollama fallback: If no usable service is installed, pull the fallback embedding model with
ollama pull nomic-embed-text. - Custom Ollama URL:
⚙️ Configuration & HTTP API
Docdex runs as a local daemon serving:
- CLI Commands:
docdexd chat - HTTP API:
/search,/v1/capabilities,/v1/search/rerank,/v1/search/batch,/v1/chat/completions,/v1/ast,/v1/graph/impact,/v1/conversations/*,/v1/diary/*,/v1/hooks/conversation,/v1/wakeup,/v1/kg/* - MCP Endpoints:
/v1/mcpand/v1/mcp/sse - Capability Negotiation Tools:
docdex_capabilities,docdex_rerank,docdex_batch_search,docdex_conversation_*,docdex_diary_*,docdex_conversation_hook,docdex_wakeup,docdex_kg_*
Multi-Repo Setup
Run a single daemon and mount additional repos on demand.
Notes:
- When more than one repo is mounted (or the daemon starts without a default repo), include
x-docdex-repo-id: <sha256>on HTTP requests. - MCP sessions bind to the repo provided in
initialize.rootUriand reuse that repo automatically.
Security
- Secure Mode: By default, Docdex enforces TLS on non-loopback binds.
- Loopback:
127.0.0.1is accessible without TLS for local agents. - To expose to a network (use with caution), use
--exposeand--auth-token.
📚 Learn More
- Detailed Usage:
docs/usage.md - API Reference:
docs/http_api.md - MCP Specs:
docs/mcp/errors.md
來源:README.md,提交 35a5328
工具
0版本歷史
2- v0.2.101最新Nov 7, 2026
- v0.2.99Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分