Fast per-repo documentation indexer and full-text search MCP server for codebases.
io.github.bekirdag/docdex β MCP Server
The io.github.bekirdag/docdex Model Context Protocol (MCP) server provides fast per-repository documentation indexing and full-text search for codebases. It is described as a local-first indexer and search daemon, focused on turning repository content into private, searchable context.
π οΈ Key Features
Per-repo documentation indexer
Full-text search over codebases
Local-first indexing and search daemon
π Use Cases
Searching documentation within a specific repository
Retrieving relevant documentation context via full-text search
β‘ Developer Benefits
Fast access to indexed documentation
Repository-scoped context for codebase exploration
β οΈ Limitations
Available details are limited: the provided materials do not enumerate specific MCP tools, configuration options, or behavior beyond indexing/search.
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.
Problem
Typical Approach
The Docdex Solution
Finding Context
grep/rg (Noisy, literal matches)
Ranked, structured results based on intent.
Code Privacy
Hosted RAG (Requires uploading code)
Local-only indexing. Your code stays on your machine.
Siloed Search
IDE-only search bars
Shared Daemon serving CLI, HTTP, and MCP clients simultaneously.
Code Awareness
String matching
AST & Impact Graph to understand dependencies and definitions.
π 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.
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.
Don't just find the string "addressGenerator"; find the definition and what it impacts.
bash
# Find definition
curl "http://127.0.0.1:28491/v1/ast?name=addressGenerator&pathPrefix=src"# Track downstream impact (what breaks if I change this?)
curl "http://127.0.0.1:28491/v1/graph/impact?file=src/app.ts&maxDepth=3"
2. Memory System
Docdex allows you to store "facts" that retrieval helps recall later.
Repo Memory (Project specific):
bash
# Teach the repo a fact
docdexd memory-store --repo . --text "Payments retry up to 3 times with backoff."# Recall it later
docdexd memory-recall --repo . --query "payments retry policy"
Agent Memory (User preference):
bash
# Set a style preference
docdexd profile add --agent-id "default" --category style --content "Use concise bullet points."
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.
bash
# Archive and inspect transcripts
docdexd conversations import --repo . ./session.txt --format plain_text --agent-id codex
docdexd conversations list --repo . --agent-id codex
docdexd conversations search --repo . "timeline_index"
docdexd conversations read --repo . <session_id>
# Import into an explicit global conversation namespace instead of a repo archive
docdexd conversations import --conversation-namespace shared-team ./session.txt --format plain_text --agent-id codex
docdexd conversations search --conversation-namespace shared-team "timeline_index"# Keep agent diary notes alongside imported sessions
docdexd diary write --repo . --agent-id codex "Wake-up rollout validated against knowledge.db timeline output."
docdexd diary read --repo . --agent-id codex
# Trigger durable summarization from an external transcript
docdexd hook conversation --repo . \
--action session_close_summarization \
--source codex \
--agent-id codex \
--transcript ./session.txt \
--format plain_text \
--wait-for-processing
# Build a compact wake-up bundle over recent context
curl -X POST http://127.0.0.1:28491/v1/wakeup \
-H "Content-Type: application/json" \
-d '{"agent_id":"codex","query":"timeline_index","max_tokens":96}'# Address the same archive over HTTP without repo_id
curl -X POST http://127.0.0.1:28491/v1/wakeup \
-H "Content-Type: application/json" \
-H "x-docdex-conversation-namespace: shared-team" \
-d '{"agent_id":"codex","query":"timeline_index","max_tokens":96}'# Explore derived repo-scoped knowledge facts and provenance
curl "http://127.0.0.1:28491/v1/kg/query?q=knowledge.db&limit=10"
curl "http://127.0.0.1:28491/v1/kg/search/nodes?q=knowledge&limit=10"
curl "http://127.0.0.1:28491/v1/kg/neighborhood?entity=knowledge.db&limit=10"
curl "http://127.0.0.1:28491/v1/kg/timeline?entity=knowledge.db&limit=10"# Chat with wake-up + project-map context and inspect reasoning trace metadata
curl -X POST http://127.0.0.1:28491/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "fake-model",
"messages": [{"role": "user", "content": "What changed around knowledge.db?"}],
"docdex": {
"agent_id": "codex",
"limit": 6,
"include_libs": true,
"dag_session_id": "session-123"
}
}'
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 setup for an interactive wizard that lists detected services, models, embedding candidates, and local delegation agents.
Inspect: Run docdexd llm detect --json or docdexd llm diagnostics --json to 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.