OmniDocs MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/Yogesh-G-3468/omnidocs-mcp
cd omnidocs-mcp
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add omnidocs-mcp -- python "<FULL_PATH_TO_OMNIDOCS_MCP>/dist/index.js"

Replace <FULL_PATH_TO_OMNIDOCS_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

Intelligent MCP server for local RAG-based framework documentation search

OmniDocs MCP

OmniDocs MCP is an intelligent Model Context Protocol (MCP) server that empowers AI agents to instantly search, index, summarize, and inject live framework documentation directly into their context window.

Stop hallucinating code for outdated framework versions. Let OmniDocs fetch the exact documentation your AI needs, the moment it needs it.

[AI Agent] Calling get_library_docs("react", "useActionState usage")
[OmniDocs] 🔍 Library 'react' not indexed. Crawling react.dev...
[OmniDocs] 🧠 Chunking 150 pages and computing embeddings (ONNX)...
[OmniDocs] ⚡ Returning top 5 semantic chunks (Dense + BM25)
[AI Agent] Receives 1,500 highly-relevant tokens. Writes perfect code.

🤔 Why OmniDocs? (The Comparison)

Approach The Problem The OmniDocs Solution
Context Stuffing (Full URLs) Destroys token limits (50k+ tokens/page); high latency; high API costs. Semantically retrieves only the relevant 512-token chunks to save context.
Web Search Tools (Tavily/Exa) Returns SEO fluff, outdated blog posts, and stack overflow threads. Exclusively targets official, canonical framework documentation.
Cloud RAG / Vector APIs Requires expensive API subscriptions and sends queries to 3rd parties. 100% Local embedding (ONNX + ChromaDB). Zero API keys, completely free.
LLM Internal Knowledge Hallucinates deprecated APIs (e.g., React 17 vs 19, or Next.js App Router). Guarantees up-to-date syntax directly from the live documentation.

✨ Core Features

  • Deep HTML Crawling: Employs an Indexer & Sniper architecture to map deep documentation sites via XML Sitemaps or pure HTML-crawling, returning dense Tables of Contents for agents to navigate.
  • Local RAG & Semantic Search: Embeds documentation locally using ONNX (via fastembed) and chunks it semantically. Exposes a natural language query interface so agents receive precise, high-density excerpts instead of full massive pages.
  • Local Manifest Auto-Discovery: Point OmniDocs at any package.json or requirements.txt. It will seamlessly communicate with the NPM/PyPI registries to auto-discover library documentation URLs and register them in its tracking file.
  • Persistent Disk Caching: Prevents excessive redundant scraping and LLM token usage by storing fetched markdown via diskcache, allowing the user to configure granular TTLs (Time-To-Live).

🏗 Architecture & How it Works

OmniDocs operates as a middleware server between an AI Agent and official documentation websites. Instead of the AI browsing the web blindly, it uses OmniDocs to precisely retrieve, parse, chunk, embed, and cache documentation locally.

Core Modules

  1. Server CLI (server.py): The main entry point. Exposes get_library_docs which agents use to ask natural language questions.
  2. Fetcher (fetcher.py): Handles outbound HTTP requests, crawling Sitemaps and pure HTML. Uses BeautifulSoup to strip away navbars and footers, and markdownify to convert perfectly to Markdown.
  3. Chunker (chunker.py): Splits massive Markdown pages into smaller, semantically coherent 512-token chunks, keeping Markdown headers intact so the context isn't lost.
  4. Vector Store (vector_store.py): Embeds chunks locally using the fastembed ONNX model and stores them persistently in ChromaDB. Uses a hybrid retrieval method (Dense Vector Search + BM25 keyword re-ranking) for maximum accuracy on exact API names.
  5. Cache Layer (cache.py): Uses diskcache to store the raw downloaded Markdown on the local hard drive to prevent redundant network requests.
  6. Auto-Discovery (discovery.py): Parses local package.json or requirements.txt files to auto-register libraries.

🔄 Retrieval Workflow

When an AI encounters a library it doesn't know, it just issues a natural language query, and the following flow occurs:

sequenceDiagram
    participant AI as AI Agent
    participant MCP as OmniDocs
    participant VectorDB as ChromaDB
    participant Web as fetcher.py
    
    AI->>MCP: Call `get_library_docs("react", "useActionState usage")`
    MCP->>VectorDB: Check if 'react' is indexed
    
    alt Not Indexed
        MCP->>Web: Crawl entire doc site & convert to Markdown
        Web-->>MCP: Return Markdown pages
        MCP->>MCP: Chunk pages & compute local embeddings
        MCP->>VectorDB: Store chunks & vectors
    end
    
    MCP->>VectorDB: Perform hybrid search (Dense + BM25) for query
    VectorDB-->>MCP: Top 5 semantic chunks
    MCP-->>AI: Return pure, precise Markdown context

🚀 Quick Start

Prerequisites

  • Python 3.10+ (Required for FastMCP and ChromaDB)
  • OS: Windows, macOS, or Linux
  • Hardware: Runs entirely

Tools (1)

get_library_docsRetrieves semantically relevant documentation excerpts for a specific library and query.

Configuration

claude_desktop_config.json
{"mcpServers": {"omnidocs": {"command": "python", "args": ["path/to/omnidocs-mcp/server.py"]}}}

Try it

Search for the latest usage patterns for useActionState in React.
How do I implement middleware in Next.js App Router?
Find the documentation for the latest version of FastAPI regarding dependency injection.
Explain how to configure the authentication flow using the official library docs.

Frequently Asked Questions

What are the key features of OmniDocs MCP?

Deep HTML crawling of documentation sites via sitemaps or direct scraping. Local RAG using ONNX embeddings and ChromaDB for privacy and zero API costs. Hybrid retrieval combining dense vector search and BM25 keyword re-ranking. Auto-discovery of library documentation from local package.json or requirements.txt. Persistent disk caching of markdown content to reduce redundant network requests.

What can I use OmniDocs MCP for?

Preventing AI hallucinations by providing up-to-date syntax from official docs. Reducing token usage by retrieving only relevant 512-token chunks instead of full pages. Enabling offline-capable documentation lookup for development environments. Automating the retrieval of framework-specific API details during coding tasks.

How do I install OmniDocs MCP?

Install OmniDocs MCP by running: git clone https://github.com/Yogesh-G-3468/omnidocs-mcp && cd omnidocs-mcp && pip install -r requirements.txt

What MCP clients work with OmniDocs MCP?

OmniDocs MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep OmniDocs MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare