Logo di RAG Documentation Search

RAG Documentation Search

Community
sanderkooger

An MCP server that provides tools for retrieving and processing documentation through vector search, both locally or hosted. Enabling AI assistants to augment their responses with relevant documentation context.

Autoresanderkooger
Repositorymcp-server-ragdocs
LinguaTypeScript
Fork
6
Stelle
30
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    RAG Documentation Search mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    30 stelle e 6 fork nel repository collegato.

MCP-server-ragdocs

Node.js Package NPM Downloads Version codecov License: MIT

An MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context.

Table of Contents

Usage

The RAG Documentation tool is designed for:

  • Enhancing AI responses with relevant documentation
  • Building documentation-aware AI assistants
  • Creating context-aware tooling for developers
  • Implementing semantic documentation search
  • Augmenting existing knowledge bases

Features

  • Vector-based documentation search and retrieval
  • Support for multiple documentation sources
  • Support for local (Ollama) embeddings generation or OPENAI
  • Semantic search capabilities
  • Automated documentation processing
  • Real-time context augmentation for LLMs

Configuration

json
{
  "mcpServers": {
    "rag-docs": {
      "command": "npx",
      "args": ["-y", "@sanderkooger/mcp-server-ragdocs"],
      "env": {
        "EMBEDDINGS_PROVIDER": "ollama",
        "QDRANT_URL": "your-qdrant-url",
        "QDRANT_API_KEY": "your-qdrant-key" # if applicable
      }
    }
  }
}

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

OpenAI Configuration

json
{
  "mcpServers": {
    "rag-docs-openai": {
      "command": "npx",
      "args": ["-y", "@sanderkooger/mcp-server-ragdocs"],
      "env": {
        "EMBEDDINGS_PROVIDER": "openai",
        "OPENAI_API_KEY": "your-openai-key-here",
        "QDRANT_URL": "your-qdrant-url",
        "QDRANT_API_KEY": "your-qdrant-key"
      }
    }
  }
}

Ollama Configuration

json
{
  "mcpServers": {
    "rag-docs-ollama": {
      "command": "npx",
      "args": ["-y", "@sanderkooger/mcp-server-ragdocs"],
      "env": {
        "EMBEDDINGS_PROVIDER": "ollama",
        "OLLAMA_BASE_URL": "http://localhost:11434",
        "QDRANT_URL": "your-qdrant-url",
        "QDRANT_API_KEY": "your-qdrant-key"
      }
    }
  }
}

Ollama run from this codebase

"ragdocs-mcp": {
      "command": "node",
      "args": [
        "/home/sander/code/mcp-server-ragdocs/build/index.js"
      ],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDINGS_PROVIDER": "ollama",
        "OLLAMA_URL": "http://localhost:11434"
      },
      "alwaysAllow": [
        "run_queue",
        "list_queue",
        "list_sources",
        "search_documentation",
        "clear_queue",
        "remove_documentation",
        "extract_urls"
      ],
      "timeout": 3600
    }

Environment Variables Reference

VariableRequired ForDefaultremarks
EMBEDDINGS_PROVIDERAllollama"openai" or "ollama"
OPENAI_API_KEYOpenAI-Obtain from OpenAI dashboard
OLLAMA_BASE_URLOllamahttp://localhost:11434Local Ollama server URL
QDRANT_URLAllhttp://localhost:6333Qdrant endpoint URL
QDRANT_API_KEYCloud Qdrant-From Qdrant Cloud console
PLAYWRIGHT_WS_ENDPOINTPlaywright Remote-WebSocket endpoint for remote Playwright server (e.g., ws://localhost:3000/)

Local Deployment

The repository includes Docker Compose configuration for local development:

Docker Compose Download

bash
docker compose up -d

This starts:

  • Qdrant vector database on port 6333
  • Ollama LLM service on port 11434

Access endpoints:

Cloud Deployment

For production deployments:

  1. Use hosted Qdrant Cloud service
  2. Set these environment variables:
bash
QDRANT_URL=your-cloud-cluster-url
QDRANT_API_KEY=your-cloud-api-key

Playwright Integration

This project supports running Playwright either locally or via a Docker container. This provides flexibility for environments where Playwright's dependencies might be challenging to install directly.

How it Works

The src/api-client.ts file automatically detects the presence of the PLAYWRIGHT_WS_ENDPOINT environment variable:

  • If PLAYWRIGHT_WS_ENDPOINT is set: The application will attempt to connect to a remote Playwright server at the specified WebSocket endpoint using chromium.connect(). This is ideal for using a containerized Playwright instance.
  • If PLAYWRIGHT_WS_ENDPOINT is not set: The application will launch a local Playwright browser instance using chromium.launch().

Running Playwright in Docker

A playwright service has been added to the docker-compose.yml file to facilitate running Playwright in a Docker container.

To start the Playwright server in Docker:

bash
docker-compose up playwright

This command will pull the mcr.microsoft.com/playwright:v1.53.0-noble image and start a Playwright server accessible on port 3000 of your host machine.

To configure your application to use this containerized Playwright instance, set the following environment variable:

bash
PLAYWRIGHT_WS_ENDPOINT=ws://localhost:3000/

Tools

search_documentation

Search through stored documentation using natural language queries. Returns matching excerpts with context, ranked by relevance.

Inputs:

  • query (string): The text to search for in the documentation. Can be a natural language query, specific terms, or code snippets.
  • limit (number, optional): Maximum number of results to return (1-20, default: 5). Higher limits provide more comprehensive results but may take longer to process.

list_sources

List all documentation sources currently stored in the system. Returns a comprehensive list of all indexed documentation including source URLs, titles, and last update times. Use this to understand what documentation is available for searching or to verify if specific sources have been indexed.

extract_urls

Extract and analyze all URLs from a given web page. This tool crawls the specified webpage, identifies all hyperlinks, and optionally adds them to the processing queue.

Inputs:

  • url (string): The complete URL of the webpage to analyze (must include protocol, e.g., https://). The page must be publicly accessible.
  • add_to_queue (boolean, optional): If true, automatically add extracted URLs to the processing queue for later indexing. Use with caution on large sites to avoid excessive queuing.

remove_documentation

Remove specific documentation sources from the system by their URLs. The removal is permanent and will affect future search results.

Inputs:

  • urls (string[]): Array of URLs to remove from the database. Each URL must exactly match the URL used when the documentation was added.

list_queue

List all URLs currently waiting in the documentation processing queue. Shows pending documentation sources that will be processed when run_queue is called. Use this to monitor queue status, verify URLs were added correctly, or check processing backlog.

run_queue

Process and index all URLs currently in the documentation queue. Each URL is processed sequentially, with proper error handling and retry logic. Progress updates are provided as processing occurs. Long-running operations will process until the queue is empty or an unrecoverable error occurs.

clear_queue

Remove all pending URLs from the documentation processing queue. Use this to reset the queue when you want to start fresh, remove unwanted URLs, or cancel pending processing. This operation is immediate and permanent - URLs will need to be re-added if you want to process them later.

Project Structure

The package follows a modular architecture with clear separation between core components and MCP protocol handlers. See ARCHITECTURE.md for detailed structural documentation and design decisions.

Using Ollama Embeddings without docker

  1. Install Ollama:
bash
curl -fsSL https://ollama.com/install.sh | sh
  1. Download the nomic-embed-text model:
bash
ollama pull nomic-embed-text
  1. Verify installation:
bash
ollama list

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Contributing

We welcome contributions! Please see our CONTRIBUTING.md for detailed guidelines, but here are the basics:

  1. Fork the repository
  2. Install dependencies: npm install
  3. Create a feature branch: git checkout -b feat/your-feature
  4. Commit changes with npm run commit to ensure compliance with Conventional Commits
  5. Push to your fork and open a PR

Forkception Acknowledgments

This project is based on a fork of hannesrudolph/mcp-ragdocs, which itself was forked from the original work by qpd-v/mcp-ragdocs. The original project provided the foundation for this implementation.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "rag-docs": {
      "command": "npx",
      "args": [
        "-y",
        "@sanderkooger/mcp-server-ragdocs"
      ],
      "env": {
        "EMBEDDINGS_PROVIDER": "ollama",
        "QDRANT_URL": "your-qdrant-url",
        "QDRANT_API_KEY": "your-qdrant-key"
      }
    }
  }
}

Usa MCP RAG Documentation Search con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso RAG Documentation Search, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi RAG Documentation Search come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di RAG Documentation Search.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "rag-documentation-search": {
      "command": "npx",
      "args": [
        "-y",
        "@sanderkooger/mcp-server-ragdocs"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di RAG Documentation Search, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di RAG Documentation Search.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare RAG Documentation Search per aiutarmi con questa attività?
RAG Documentation Search
Certo. Ho letto.
Ecco cosa ho trovato con RAG Documentation Search.

Domande frequenti

A cosa serve il server MCP RAG Documentation Search?

RAG Documentation Search è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare RAG Documentation Search MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare RAG Documentation Search con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP RAG Documentation Search con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando RAG Documentation Search, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego RAG Documentation Search MCP a TypingMind?

RAG Documentation Search funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre RAG Documentation Search MCP in TypingMind?

RAG Documentation Search mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare RAG Documentation Search MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se RAG Documentation Search richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇