Get the FREE Ultimate OpenClaw Setup Guide →

docrag

AI-powered documentation RAG system with MCP server for Claude Code. Search and retrieve technical documentation on-demand with vector embeddings and smart web scraping.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ryan-m-bishop-docrag docrag serve

How to use

DocRAG is a Python-based MCP server that provides Retrieval-Augmented Generation capabilities for technical documentation. It runs as a local MCP server and serves documentation search and indexing capabilities to Claude Code or other MCP clients. Once started, you can initialize a local configuration, add documentation collections (from local directories or scraped sources), and then start the MCP server to enable search and retrieval via the provided tools. The server uses LanceDB for a lightweight vector store and sentence-transformers for embeddings, enabling fast local RAG operations without external dependencies. Use the Claude Code integration example to connect to this MCP server and access two built-in tools: search_docs, which queries indexed collections, and list_collections, which enumerates available documentation collections. The server is designed to work with Claude Code, but you can also use the CLI via docrag for ad-hoc testing and management.

How to install

Prerequisites:

  • Python 3.10+
  • pipx (recommended) or pip
  • git (for updates)

Recommended installation (global, editable mode):

# Install in editable mode so changes reflect immediately
pipx install -e /opt/claude-ops/doc-rag

# Verify installation
docrag --help

# Optional: Install Playwright browsers (for scraping)
pipx runpip docrag install playwright
pipx run --spec docrag playwright install chromium

Alternative: Install from source (development):

# Clone or navigate to the project directory
cd /opt/claude-ops/doc-rag

# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate

# Install in development mode
pip install -e ".[dev]"

# Install Playwright browsers (for scraping)
playwright install chromium

Updating DocRAG (from the README):

cd /opt/claude-ops/doc-rag
./update.sh   # recommended

Or using Make:

cd /opt/claude-ops/doc-rag
make update

Manual update for editable vs regular installs is also described in the README. After updates, verify with:

cd /opt/claude-ops/doc-rag
git log -1 --oneline

# Test the installation
docrag --version
docrag --help

Additional notes

Notes and tips:

  • The recommended installation installs the package globally in editable mode to simplify development and updates.
  • Playwright is optional but required for scraping dynamic web content; install via pipx as shown in the instructions.
  • The MCP server is intended to integrate with Claude Code; configure Claude Code's MCP settings to point to the local docrag server (e.g., command: docrag, args: [serve]).
  • To enable advanced scraping features (smart scraping), you may need to install Crawl4AI and set environment variables such as OPENAI_API_KEY if using LLM-powered extraction.
  • Collections are stored under ~/.docrag/ and the vector store under ~/.docrag/vectordb/; ensure you have enough disk space for embeddings and documents.
  • For updates, editable installs automatically reflect code changes; non-editable installs require reinstalling in editable mode or reinstalling the package.

Related MCP Servers

Sponsor this space

Reach thousands of developers