home / mcp / docdex mcp server

Docdex MCP Server

Provides a local, private MCP endpoint to index and query repository documentation, code, and agent preferences.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bekirdag-docdex": {
      "url": "http://localhost:28491/v1/mcp/sse",
      "headers": {
        "DOCDEX_OLLAMA_BASE_URL": "http://127.0.0.1:11434"
      }
    }
  }
}

Docdex provides a local-first indexer and search daemon that sits between your raw files and your AI assistant, offering deterministic search, code intelligence, and persistent memory without uploading your code to a cloud vector store. It exposes an MCP endpoint so AI agents can connect to a local, privacy-preserving knowledge base for code and documentation.

How to use

You connect an MCP client to the Docdex daemon to index your repository, start the daemon, and then interact with your AI agents to query, analyze, and recall project information. Use the HTTP/SSE MCP endpoint for standard clients, or run Docdex locally as a stdio service for sandboxed environments. You can query the system to find function definitions, track downstream impacts, and store memory facts that help future queries.

How to install

Prerequisites: Node.js version 18 or newer must be installed on your system.

Install Docdex globally using npm. This downloads the correct binary for your operating system.

npm i -g docdex

Windows users may need to install the Microsoft Visual C++ Redistributable for 2015–2022 to ensure the runtime loads correctly. If you encounter an exit code related to the MSVC runtime, install the required redistributable package before running Docdex commands.

Additional sections

Security and multi-repo setup: Docdex can secure communication by default and supports mounting multiple repositories on a single daemon instance. When more than one repository is mounted, include the repository identifier in HTTP requests to bind the correct context.

Run the index, start the daemon, and interact with the daemon via the MCP endpoints. The typical workflow involves indexing a repository, starting the daemon, and then querying via the MCP interface.

Available tools

index

Builds the index and graph data for a repository by scanning files and extracting structure to enable fast, meaningful queries.

start

Launches the Docdex daemon to serve MCP requests, handling HTTP/SSE MCP connections and local IPC for sandboxed clients.

chat

Opens a command-line chat interface to ask questions directly from the terminal against the indexed repository data.

memory-store

Store a project fact or note in Repo Memory to recall later during queries.

memory-recall

Retrieve remembered facts or notes matching a query across repos.

profile

Set agent preferences (for example, preferred concise bullet points) that influence how responses are generated.

ast

Query the abstract syntax tree to locate definitions and understand code structure by name and path.

graph/impact

Trace downstream impact to understand what might break if a definition changes.

mcp

Expose MCP endpoints for integration with AI agents and editors; supports HTTP/SSE and local IPC.

setup

Configure local LLM tooling (for example, Ollama) and set up embedding components.